#
# 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]*
-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@
setup_version.c \
iniparse.h
+CLEANFILES = setup_version.c
+
if MINGWTARGET
inilint_extras = \
autoload.c \
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 \
ConnectionSetting.h \
ControlAdjuster.cc \
ControlAdjuster.h \
+ crypto.cc \
+ crypto.h \
+ cyg-pubkey.h \
cygpackage.cc \
cygpackage.h \
desktop.cc \
Generic.h \
geturl.cc \
geturl.h \
+ gpg-packet.cc \
+ gpg-packet.h \
ini.cc \
ini.h \
IniDBBuilder.h \
io_stream_memory.cc \
io_stream_memory.h \
IOStreamProvider.h \
+ KeysSetting.cc \
+ KeysSetting.h \
localdir.cc \
localdir.h \
LogFile.cc \
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/