]> cygwin.com Git - cygwin-apps/setup.git/blobdiff - Makefile.am
Merged across diffs between setup_crypto_branch_branchpoint and
[cygwin-apps/setup.git] / Makefile.am
index 8f29b6528f5cf7c5ebb402512bbe65fd7769d738..58186af2d25218bb27bc95608b0d80baf74dbbba 100644 (file)
@@ -18,8 +18,8 @@
 #
 # Makefile for Cygwin installer
 
-DIST_SUBDIRS = libgetopt++ tests
-SUBDIRS = libgetopt++ tests
+DIST_SUBDIRS = libgetopt++ tests libgpg-error libgcrypt
+SUBDIRS = libgetopt++ tests libgpg-error libgcrypt
 
 ## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
 
@@ -34,8 +34,8 @@ AM_CFLAGS = $(AM_CXXFLAGS) -Wmissing-declarations -Winline \
             -Wstrict-prototypes -Wmissing-prototypes
 AM_YFLAGS = -d
 AM_LFLAGS = -8
-WINDRES := @WINDRES@
-INCLUDES = -I$(srcdir)/libgetopt++/include
+WINDRES = @WINDRES@
+AM_CPPFLAGS = -I$(srcdir)/libgetopt++/include -I$(top_builddir)/libgpg-error/src -I$(top_builddir)/libgcrypt/src -I$(srcdir)/libgcrypt/src
 
 noinst_PROGRAMS = setup @INILINT@
 
@@ -67,6 +67,8 @@ BUILT_SOURCES = \
        setup_version.c \
        iniparse.h
 
+CLEANFILES = setup_version.c
+
 if MINGWTARGET
 inilint_extras = \
        autoload.c \
@@ -113,11 +115,11 @@ libinilex_a_SOURCES = inilex.ll
 libinilex_a_CXXFLAGS = $(BASECXXFLAGS)
 
 setup_LDADD = \
-       libinilex.a libgetopt++/libgetopt++.la \
-       res.o \
-       /usr/lib/mingw/libbz2.a /usr/lib/mingw/libz.a \
-       -lcomctl32 -lole32 -lwsock32 -lnetapi32 -luuid
-setup_LDFLAGS = -mwindows
+       libinilex.a libgetopt++/libgetopt++.la res.o \
+       libgcrypt/src/.libs/libgcrypt.a \
+       libgpg-error/src/.libs/libgpg-error.a \
+       -lcomctl32 -lole32 -lwsock32 -lnetapi32 -luuid -lbz2 -lz 
+setup_LDFLAGS = -mwindows -Wl,-static
 setup_SOURCES = \
        AntiVirus.cc \
        AntiVirus.h \
@@ -139,6 +141,9 @@ setup_SOURCES = \
        ConnectionSetting.h \
        ControlAdjuster.cc \
        ControlAdjuster.h \
+       crypto.cc \
+       crypto.h \
+       cyg-pubkey.h \
        cygpackage.cc \
        cygpackage.h \
        desktop.cc \
@@ -161,6 +166,8 @@ setup_SOURCES = \
        Generic.h \
        geturl.cc \
        geturl.h \
+       gpg-packet.cc \
+       gpg-packet.h \
        ini.cc \
        ini.h \
        IniDBBuilder.h \
@@ -181,6 +188,8 @@ setup_SOURCES = \
        io_stream_memory.cc \
        io_stream_memory.h \
        IOStreamProvider.h \
+       KeysSetting.cc \
+       KeysSetting.h \
        localdir.cc \
        localdir.h \
        LogFile.cc \
@@ -277,29 +286,31 @@ setup_SOURCES = \
        libmd5-rfc/md5.c \
        libmd5-rfc/md5.h
 
+VER := $(shell sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
+               $(srcdir)/ChangeLog)
+
 setup_version.c : $(srcdir)/ChangeLog Makefile
-       V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
-         $(srcdir)/ChangeLog` ;\
        (echo '#define VERSION_PREFIX "%%% setup-version"';\
-       echo 'static const char version_store[] = VERSION_PREFIX " '$$V'";';\
-       echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp;\
+       echo 'static const char version_store[] = VERSION_PREFIX " '${VER}'";';\
+       echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp
        mv version.tmp setup_version.c
 
-%.o: %.rc
-       $(WINDRES) --preprocessor "$(CC) -E -xc-header -DRC_INVOKED" --include-dir $(srcdir) -o $@ $<
+.rc.o:
+       $(WINDRES) --include-dir $(srcdir) -o $@ $<
 
-# Make a distribution package and tarball
-release: setup$(EXEEXT) dist-all $(srcdir)/ChangeLog Makefile
-       $(STRIP) setup.exe && \
-       upx --best setup.exe && \
-       V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
-         $(srcdir)/ChangeLog` ;\
-       mv setup.exe setup-$${V}.exe && \
-       mv setup-0.tar.bz2 setup-$${V}.tar.bz2 && \
-       tar cjf setup-$${V}-1-src.tar.bz2 setup-$${V}.tar.bz2
+# this target creates:
+#   setup-x.yyy.exe             (UPXed stripped exe)
+#   setup-debug-x.yyy.exe.gz    (gzipped unstripped exe)
+#   setup-x.yyy.tar.bz2         (source)
+release: setup.exe $(srcdir)/ChangeLog Makefile
+       $(MAKE) dist-bzip2 distdir=setup-${VER}
+       cp -pf setup.exe setup-debug-${VER}.exe
+       gzip -f9 setup-debug-${VER}.exe
+       cp -pf setup.exe setup-${VER}.exe
+       $(STRIP) setup-${VER}.exe
+       upx --best setup-${VER}.exe
 
 # Create a snapshot and upload it (requires write access)
 snapshot: release
-       V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
-         $(srcdir)/ChangeLog` ;\
-       scp -C setup-$${V}.exe setup-$${V}.tar.bz2 $${cygwinsite}:setup-snapshots/
+       scp -C setup-${VER}.exe setup-debug-${VER}.exe.gz setup-${VER}.tar.bz2 \
+           $${cygwinsite:-cygwin.com}:setup-snapshots/
This page took 0.028309 seconds and 5 git commands to generate.