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
28 AM_CXXFLAGS = -Werror $(BASECXXFLAGS) ${$(*F)_CXXFLAGS}
29 AM_CFLAGS = $(AM_CXXFLAGS) -Wmissing-declarations -Winline \
30 -Wstrict-prototypes -Wmissing-prototypes
34 AM_CPPFLAGS = -DLZMA_API_STATIC -I$(srcdir)/libgetopt++/include -I${srcdir}/regex
36 inilex_CXXFLAGS:=-Wno-sign-compare
38 noinst_PROGRAMS = @SETUP@$(EXEEXT) @INILINT@
40 EXTRA_PROGRAMS = inilint
41 ## noinst_PROGRAMS +=inilint
57 setup64.exe.manifest \
61 # iniparse.hh is generated from iniparse.yy via bison -d, so it needs to be
62 # included here for proper tracking (but not iniparse.cc, since automake
63 # knows about that already)
68 CLEANFILES = setup_version.c
71 libgetopt++/libgetopt++.la
95 PackageSpecification.cc \
96 PackageSpecification.h \
104 libgetopt++/libgetopt++.la -lgcrypt -lgpg-error -llzma -lbz2 -lz \
105 -lshlwapi -lcomctl32 -lole32 -lwsock32 -lpsapi -luuid -lntdll -lwininet -lmingw32
106 @SETUP@_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs
114 archive_tar_file.cc \
125 ConnectionSetting.cc \
126 ConnectionSetting.h \
159 IniDBBuilderPackage.cc \
160 IniDBBuilderPackage.h \
163 IniParseFeedback.cc \
165 IniParseFindVisitor.cc \
166 IniParseFindVisitor.h \
170 io_stream_cygfile.cc \
171 io_stream_cygfile.h \
174 io_stream_memory.cc \
214 PackageSpecification.cc \
215 PackageSpecification.h \
217 PickCategoryLine.cc \
225 postinstallresults.cc \
226 postinstallresults.h \
272 csu_util/rfc1738.cc \
274 csu_util/version_compare.cc \
275 csu_util/version_compare.h \
278 VER := $(shell sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
281 setup_version.c : $(srcdir)/ChangeLog Makefile
282 $(AM_V_GEN)(echo '#define VERSION_PREFIX "%%% setup-version"';\
283 echo 'static const char version_store[] = VERSION_PREFIX " '${VER}'";';\
284 echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp && \
285 mv version.tmp setup_version.c
287 # setup.exe.manifest is included in res.rc
288 res.o: @SETUP@.exe.manifest
291 $(AM_V_GEN)$(WINDRES) --include-dir $(srcdir) -o $@ $<
293 # static const char version_store[] = VERSION_PREFIX " 2.686";
295 @ver=setup-$$(sed -n 's/^static const char version_store.* VERSION_PREFIX " \([^"]*\)".*$$/\1/p' setup_version.c);\
299 cvs status -R | sed -n "s%^ *Repository revision:.*/cvs/cygwin-apps/setup/\(.*\),v%$$ver/\1%p" |\
300 sort | tar -T - -cjf ${CURDIR}/$$ver-src.tar.bz2;\
301 echo $$ver-src.tar.bz2; exec rm -f $$ver
303 # optional: strip and compress executable
307 $(STRIP) -s setup$(EXEEXT)
309 @if [ -e `which upx` ]; then\
310 upx --best --lzma setup$(EXEEXT) ;\
312 echo "UPX doesn't seem to be installed, cannot compress setup$(EXEEXT)." ;\