1 ## Process this file with automake to produce Makefile.in
5 # Copyright (c) 2000, Red Hat, Inc.
6 # Copyright (c) 2002, Robert Collins
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # A copy of the GNU General Public License can be found at
16 # Makefile for Cygwin installer
18 SUBDIRS := @subdirs@ tests
20 ## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
22 # We would like to use -Winline for C++ as well, but some STL code triggers
23 # this warning. (Bug verified present in gcc-3.3)
24 # -Wno-uninitialized added to deal with g++ 3.4.4's spurious STL warnings
25 # (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22207)
26 BASECXXFLAGS = -Wall -Wno-uninitialized -Wpointer-arith -Wcomments \
27 -Wcast-align -Wwrite-strings -fno-builtin-sscanf \
29 AM_CXXFLAGS = -Werror $(BASECXXFLAGS) ${$(*F)_CXXFLAGS}
30 AM_CFLAGS = $(AM_CXXFLAGS) -Wmissing-declarations -Winline \
31 -Wstrict-prototypes -Wmissing-prototypes
35 AM_CPPFLAGS = -DLZMA_API_STATIC -I$(srcdir)/libgetopt++/include
37 inilex_CXXFLAGS:=-Wno-sign-compare
39 noinst_PROGRAMS = @SETUP@$(EXEEXT) @INILINT@
41 EXTRA_PROGRAMS = inilint
42 ## noinst_PROGRAMS +=inilint
58 setup64.exe.manifest \
62 # iniparse.hh is generated from iniparse.yy via bison -d, so it needs to be
63 # included here for proper tracking (but not iniparse.cc, since automake
64 # knows about that already)
69 CLEANFILES = setup_version.c
72 libgetopt++/libgetopt++.la
96 PackageSpecification.cc \
97 PackageSpecification.h \
105 libgetopt++/libgetopt++.la -lgcrypt -lgpg-error -llzma -lbz2 -lz \
106 -lshlwapi -lcomctl32 -lole32 -lws2_32 -lpsapi -luuid -lntdll -lwininet -lmingw32
107 @SETUP@_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs
115 archive_tar_file.cc \
126 ConnectionSetting.cc \
127 ConnectionSetting.h \
160 IniDBBuilderPackage.cc \
161 IniDBBuilderPackage.h \
164 IniParseFeedback.cc \
169 io_stream_cygfile.cc \
170 io_stream_cygfile.h \
173 io_stream_memory.cc \
213 PackageSpecification.cc \
214 PackageSpecification.h \
216 PickCategoryLine.cc \
224 postinstallresults.cc \
225 postinstallresults.h \
271 csu_util/rfc1738.cc \
273 csu_util/version_compare.cc \
274 csu_util/version_compare.h
276 GITVER := $(shell cd $(srcdir) && git describe --match release_\* --abbrev=6 --dirty || "N/A")
277 VER := $(subst release_,,$(GITVER))
279 setup_version.c : $(srcdir)/ChangeLog Makefile
280 @echo "Setup version: " $(VER)
281 $(AM_V_GEN)(echo '#define VERSION_PREFIX "%%% setup-version"';\
282 echo 'static const char version_store[] = VERSION_PREFIX " '$(VER)'";';\
283 echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp && \
284 mv version.tmp setup_version.c
286 # setup.exe.manifest is included in res.rc
287 res.o: @SETUP@.exe.manifest
290 $(AM_V_GEN)$(WINDRES) --include-dir $(srcdir) -o $@ $<
294 cd ${srcdir}; rm -f $$ver; ln -sf . $$ver;\
295 git ls-files | tar -T - -cJf ${CURDIR}/$$ver-src.tar.xz;\
296 echo $$ver-src.tar.xz; exec rm -f $$ver
298 # optional: strip and compress executable
302 $(STRIP) -s setup$(EXEEXT)
304 @if [ -e `which upx` ]; then\
305 upx --best --lzma setup$(EXEEXT) ;\
307 echo "UPX doesn't seem to be installed, cannot compress setup$(EXEEXT)." ;\