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 # Written by Christopher Faylor <cgf@redhat.com>
17 # and Robert Collins <rbtcollins@hotmail.com>
19 # Makefile for Cygwin installer
21 INST_SUBDIRS:=@subdirs@
22 DIST_SUBDIRS:=${INST_SUBDIRS} tests
25 ## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
27 # We would like to use -Winline for C++ as well, but some STL code triggers
28 # this warning. (Bug verified present in gcc-3.3)
29 # -Wno-uninitialized added to deal with g++ 3.4.4's spurious STL warnings
30 # (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22207)
31 BASECXXFLAGS = -Wall -Wno-uninitialized -Wpointer-arith -Wcomments \
32 -Wcast-align -Wwrite-strings
33 AM_CXXFLAGS = -Werror $(BASECXXFLAGS)
34 AM_CFLAGS = $(AM_CXXFLAGS) -Wmissing-declarations -Winline \
35 -Wstrict-prototypes -Wmissing-prototypes
39 AM_CPPFLAGS = -DLZMA_API_STATIC -I$(srcdir)/libgetopt++/include
41 noinst_PROGRAMS = setup @INILINT@
43 EXTRA_PROGRAMS = inilint
44 ## noinst_PROGRAMS +=inilint
59 libmd5-rfc/md5main.c \
64 # iniparse.h is generated from iniparse.yy via bison -d, so it needs to be
65 # included here for proper tracking (but not iniparse.cc, since automake
66 # knows about that already)
72 CLEANFILES = setup_version.c
83 libinilex.a libgetopt++/libgetopt++.la
105 PackageSpecification.cc \
106 PackageSpecification.h \
108 csu_util/rfc1738.cc \
114 # workaround to allow omitting -Werror on inilex.cc.
115 noinst_LIBRARIES = libinilex.a
116 libinilex_a_SOURCES = inilex.ll
117 libinilex_a_CXXFLAGS = $(BASECXXFLAGS)
121 -Linst/lib -lgetopt++ -lgcrypt -lgpg-error \
122 -lshlwapi -lcomctl32 -lole32 -lwsock32 -lnetapi32 -luuid -llzma -lbz2 -lz
123 setup_LDFLAGS = -mwindows -Wl,-static -static-libtool-libs
131 archive_tar_file.cc \
143 ConnectionSetting.cc \
144 ConnectionSetting.h \
177 IniDBBuilderPackage.cc \
178 IniDBBuilderPackage.h \
180 IniParseFeedback.cc \
182 IniParseFindVisitor.cc \
183 IniParseFindVisitor.h \
187 io_stream_cygfile.cc \
188 io_stream_cygfile.h \
191 io_stream_memory.cc \
231 PackageSpecification.cc \
232 PackageSpecification.h \
234 PickCategoryLine.cc \
283 csu_util/rfc1738.cc \
285 csu_util/version_compare.cc \
286 csu_util/version_compare.h \
290 VER := $(shell sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \
293 setup_version.c : $(srcdir)/ChangeLog Makefile
294 (echo '#define VERSION_PREFIX "%%% setup-version"';\
295 echo 'static const char version_store[] = VERSION_PREFIX " '${VER}'";';\
296 echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp
297 mv version.tmp setup_version.c
300 $(WINDRES) --include-dir $(srcdir) -o $@ $<
302 # this target creates:
303 # setup-x.yyy.exe (UPXed stripped exe)
304 # setup-debug-x.yyy.exe.gz (gzipped unstripped exe)
305 # setup-x.yyy.tar.bz2 (source)
306 release: setup.exe $(srcdir)/ChangeLog Makefile
307 $(MAKE) dist-bzip2 distdir=setup-${VER}
308 cp -pf setup.exe setup-debug-${VER}.exe
309 gzip -f9 setup-debug-${VER}.exe
310 cp -pf setup.exe setup-${VER}.exe
311 $(STRIP) setup-${VER}.exe
312 upx --best setup-${VER}.exe
314 # Create a snapshot and upload it (requires write access)
316 scp -C setup-${VER}.exe setup-debug-${VER}.exe.gz setup-${VER}.tar.bz2 \
317 $${cygwinsite:-cygwin.com}:setup-snapshots/
319 # static const char version_store[] = VERSION_PREFIX " 2.686";
321 @ver=setup-$$(sed -n 's/^static const char version_store.* VERSION_PREFIX " \([^"]*\)".*$$/\1/p' setup_version.c);\
325 cvs status -R | sed -n "s%^ *Repository revision:.*/cvs/cygwin-apps/setup/\(.*\),v%$$ver/\1%p" |\
326 sort | tar -T - -cjf ${CURDIR}/$$ver.tar.bz2;\
329 .PHONY: ${INST_SUBDIRS}
331 ${MAKE} -C $@ install