1 ## Process this file with automake to produce Makefile.in
3 # Copyright (c) 2000, Red Hat, Inc.
4 # Copyright (c) 2002, Robert Collins
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # A copy of the GNU General Public License can be found at
14 # Makefile for Cygwin installer
16 SUBDIRS := @subdirs@ tests
18 ## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
20 # We would like to use -Winline for C++ as well, but some STL code triggers
21 # this warning. (Bug verified present in gcc-3.3)
22 BASECXXFLAGS = -Werror -Wall -Wpointer-arith -Wcomments \
23 -Wcast-align -Wwrite-strings -fno-builtin-sscanf \
25 AM_CXXFLAGS = $(BASECXXFLAGS) -std=gnu++11 ${$(*F)_CXXFLAGS}
26 AM_CFLAGS = $(BASECXXFLAGS) -Wmissing-declarations -Winline \
27 -Wstrict-prototypes -Wmissing-prototypes
31 AM_CPPFLAGS = -DLZMA_API_STATIC -I$(srcdir)/libgetopt++/include
33 inilex_CXXFLAGS:=-Wno-sign-compare
35 noinst_PROGRAMS = @SETUP@$(EXEEXT) @INILINT@
37 EXTRA_PROGRAMS = inilint
38 ## noinst_PROGRAMS +=inilint
54 setup64.exe.manifest \
58 # iniparse.hh is generated from iniparse.yy via bison -d, so it needs to be
59 # included here for proper tracking (but not iniparse.cc, since automake
60 # knows about that already)
65 CLEANFILES = setup_version.c
68 libgetopt++/libgetopt++.la
92 PackageSpecification.cc \
93 PackageSpecification.h \
101 libgetopt++/libgetopt++.la -lgcrypt -lgpg-error -llzma -lbz2 -lz -lsolv -lregex \
102 -lshlwapi -lcomctl32 -lole32 -lws2_32 -lpsapi -luuid -lntdll -lwininet -lmingw32
103 @SETUP@_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs
111 archive_tar_file.cc \
124 ConnectionSetting.cc \
125 ConnectionSetting.h \
156 IniDBBuilderPackage.cc \
157 IniDBBuilderPackage.h \
160 IniParseFeedback.cc \
165 io_stream_cygfile.cc \
166 io_stream_cygfile.h \
169 io_stream_memory.cc \
208 PackageSpecification.cc \
209 PackageSpecification.h \
211 PickCategoryLine.cc \
219 postinstallresults.cc \
220 postinstallresults.h \
264 csu_util/rfc1738.cc \
266 csu_util/version_compare.cc \
267 csu_util/version_compare.h
269 GITVER := $(shell cd $(srcdir) && git describe --match release_\* --abbrev=6 --dirty || "N/A")
270 VER := $(subst release_,,$(GITVER))
273 setup_version.c : Makefile
274 @echo "Setup version: " $(VER)
275 $(AM_V_GEN)(echo '#define VERSION_PREFIX "%%% setup-version"';\
276 echo 'static const char version_store[] = VERSION_PREFIX " '$(VER)'";';\
277 echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp && \
278 mv version.tmp setup_version.c
280 # setup.exe.manifest is included in res.rc
281 res.o: @SETUP@.exe.manifest
284 $(AM_V_GEN)$(WINDRES) --include-dir $(srcdir) -o $@ $<
288 cd ${srcdir}; rm -f $$ver; ln -sf . $$ver;\
289 git ls-files | tar -T - -cJf ${CURDIR}/$$ver-src.tar.xz;\
290 echo $$ver-src.tar.xz; exec rm -f $$ver
292 # optional: strip and compress executable
296 $(OBJCOPY) --add-gnu-debuglink=/dev/null --only-keep-debug setup$(EXEEXT) setup.dbg
297 $(OBJCOPY) --strip-all setup$(EXEEXT)
298 $(OBJCOPY) --add-gnu-debuglink=setup.dbg setup$(EXEEXT) setup$(EXEEXT)
300 CLEANFILES += setup.dbg
303 @if [ -e `which upx` ]; then\
304 upx --best --lzma setup$(EXEEXT) ;\
306 echo "UPX doesn't seem to be installed, cannot compress setup$(EXEEXT)." ;\
310 cp setup.dbg setup-${VER}.${ARCH}.dbg
311 cp setup${EXEEXT} setup-${VER}.${ARCH}${EXEEXT}
313 UPLOAD_HOST=cygwin-admin@cygwin.com
314 UPLOAD_PATH=/www/sourceware/htdocs/cygwin/setup
317 scp setup-${VER}.$(ARCH).exe setup-${VER}.$(ARCH).dbg ${UPLOAD_HOST}:${UPLOAD_PATH}
318 ssh ${UPLOAD_HOST} gpg --detach-sign ${UPLOAD_PATH}/setup-${VER}.$(ARCH).exe
321 rm -f setup*${EXEEXT} setup*.dbg