]> cygwin.com Git - cygwin-apps/setup.git/blob - Makefile.am
Add Makefile rule to rename build products to form used when uploading
[cygwin-apps/setup.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 #
3 # $Id$
4 #
5 # Copyright (c) 2000, Red Hat, Inc.
6 # Copyright (c) 2002, Robert Collins
7 #
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.
12 #
13 # A copy of the GNU General Public License can be found at
14 # http://www.gnu.org/
15 #
16 # Makefile for Cygwin installer
17
18 SUBDIRS := @subdirs@ tests
19
20 ## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
21
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 BASECXXFLAGS = -Werror -Wall -Wpointer-arith -Wcomments \
25 -Wcast-align -Wwrite-strings -fno-builtin-sscanf \
26 -Wno-attributes
27 AM_CXXFLAGS = $(BASECXXFLAGS) -std=gnu++11 ${$(*F)_CXXFLAGS}
28 AM_CFLAGS = $(BASECXXFLAGS) -Wmissing-declarations -Winline \
29 -Wstrict-prototypes -Wmissing-prototypes
30 AM_YFLAGS = -d
31 AM_LFLAGS = -8
32 WINDRES = @WINDRES@
33 AM_CPPFLAGS = -DLZMA_API_STATIC -I$(srcdir)/libgetopt++/include
34
35 inilex_CXXFLAGS:=-Wno-sign-compare
36
37 noinst_PROGRAMS = @SETUP@$(EXEEXT) @INILINT@
38
39 EXTRA_PROGRAMS = inilint
40 ## noinst_PROGRAMS +=inilint
41
42 EXTRA_DIST = \
43 CHANGES \
44 CONTRIBUTORS \
45 COPYING \
46 bootstrap.sh \
47 check-na.bmp \
48 check-no.bmp \
49 check-yes.bmp \
50 choose-rtarrow.bmp \
51 choose-spin.bmp \
52 cygwin.ico \
53 cygwin-setup.ico \
54 cygwin-terminal.ico \
55 setup.exe.manifest \
56 setup64.exe.manifest \
57 tree-minus.bmp \
58 tree-plus.bmp
59
60 # iniparse.hh is generated from iniparse.yy via bison -d, so it needs to be
61 # included here for proper tracking (but not iniparse.cc, since automake
62 # knows about that already)
63 BUILT_SOURCES = \
64 setup_version.c \
65 iniparse.hh
66
67 CLEANFILES = setup_version.c
68
69 inilint_LDADD = \
70 libgetopt++/libgetopt++.la
71 inilint_SOURCES = \
72 filemanip.cc \
73 filemanip.h \
74 find.cc \
75 find.h \
76 FindVisitor.cc \
77 FindVisitor.h \
78 LogSingleton.cc \
79 LogSingleton.h \
80 IniDBBuilder.h \
81 inilintmain.cc \
82 inilex.ll \
83 iniparse.yy \
84 IniParseFeedback.cc \
85 IniParseFeedback.h \
86 io_stream.h \
87 io_stream.cc \
88 io_stream_file.h \
89 io_stream_file.cc \
90 IOStreamProvider.h \
91 mkdir.cc \
92 mkdir.h \
93 mklink2.cc \
94 PackageSpecification.cc \
95 PackageSpecification.h \
96 PackageTrust.h \
97 csu_util/rfc1738.cc \
98 csu_util/rfc1738.h \
99 String++.cc \
100 String++.h
101
102 @SETUP@_LDADD = \
103 libgetopt++/libgetopt++.la -lgcrypt -lgpg-error -llzma -lbz2 -lz \
104 -lshlwapi -lcomctl32 -lole32 -lws2_32 -lpsapi -luuid -lntdll -lwininet -lmingw32
105 @SETUP@_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs
106 @SETUP@_SOURCES = \
107 AntiVirus.cc \
108 AntiVirus.h \
109 archive.cc \
110 archive.h \
111 archive_tar.cc \
112 archive_tar.h \
113 archive_tar_file.cc \
114 choose.cc \
115 choose.h \
116 compress.cc \
117 compress.h \
118 compress_bz.cc \
119 compress_bz.h \
120 compress_gz.cc \
121 compress_gz.h \
122 compress_xz.cc \
123 compress_xz.h \
124 ConnectionSetting.cc \
125 ConnectionSetting.h \
126 ControlAdjuster.cc \
127 ControlAdjuster.h \
128 crypto.cc \
129 crypto.h \
130 cyg-pubkey.h \
131 cygpackage.cc \
132 cygpackage.h \
133 desktop.cc \
134 desktop.h \
135 dialog.cc \
136 dialog.h \
137 diskfull.cc \
138 diskfull.h \
139 download.cc \
140 download.h \
141 Exception.cc \
142 Exception.h \
143 find.cc \
144 find.h \
145 FindVisitor.cc \
146 FindVisitor.h \
147 filemanip.cc \
148 filemanip.h \
149 fromcwd.cc \
150 Generic.h \
151 geturl.cc \
152 geturl.h \
153 gpg-packet.cc \
154 gpg-packet.h \
155 ini.cc \
156 ini.h \
157 IniDBBuilder.h \
158 IniDBBuilderPackage.cc \
159 IniDBBuilderPackage.h \
160 inilex.ll \
161 iniparse.yy \
162 IniParseFeedback.cc \
163 IniParseFeedback.h \
164 install.cc \
165 io_stream.cc \
166 io_stream.h \
167 io_stream_cygfile.cc \
168 io_stream_cygfile.h \
169 io_stream_file.cc \
170 io_stream_file.h \
171 io_stream_memory.cc \
172 io_stream_memory.h \
173 IOStreamProvider.h \
174 KeysSetting.cc \
175 KeysSetting.h \
176 localdir.cc \
177 localdir.h \
178 LogFile.cc \
179 LogFile.h \
180 LogSingleton.cc \
181 LogSingleton.h \
182 main.cc \
183 mkdir.cc \
184 mkdir.h \
185 mklink2.cc \
186 mklink2.h \
187 mount.cc \
188 mount.h \
189 msg.cc \
190 msg.h \
191 net.cc \
192 net.h \
193 netio.cc \
194 netio.h \
195 nio-ie5.cc \
196 nio-ie5.h \
197 nio-file.cc \
198 nio-file.h \
199 nio-ftp.cc \
200 nio-ftp.h \
201 nio-http.cc \
202 nio-http.h \
203 package_db.cc \
204 package_db.h \
205 package_meta.cc \
206 package_meta.h \
207 package_source.cc \
208 package_source.h \
209 package_version.cc \
210 package_version.h \
211 PackageSpecification.cc \
212 PackageSpecification.h \
213 PackageTrust.h \
214 PickCategoryLine.cc \
215 PickCategoryLine.h \
216 PickLine.h \
217 PickPackageLine.cc \
218 PickPackageLine.h \
219 PickView.cc \
220 PickView.h \
221 postinstall.cc \
222 postinstallresults.cc \
223 postinstallresults.h \
224 prereq.cc \
225 prereq.h \
226 processlist.cc \
227 processlist.h \
228 proppage.cc \
229 proppage.h \
230 propsheet.cc \
231 propsheet.h \
232 RECTWrapper.h \
233 res.rc \
234 resource.h \
235 root.cc \
236 root.h \
237 ScanFindVisitor.cc \
238 ScanFindVisitor.h \
239 script.cc \
240 script.h \
241 setup_version.h \
242 setup_version.c \
243 sha2.h \
244 sha2.c \
245 simpsock.cc \
246 simpsock.h \
247 site.cc \
248 site.h \
249 source.cc \
250 source.h \
251 SourceSetting.cc \
252 SourceSetting.h \
253 splash.cc \
254 splash.h \
255 state.cc \
256 state.h \
257 String++.cc \
258 String++.h \
259 threebar.cc \
260 threebar.h \
261 UserSettings.cc \
262 UserSettings.h \
263 win32.cc \
264 win32.h \
265 window.cc \
266 window.h \
267 csu_util/MD5Sum.cc \
268 csu_util/MD5Sum.h \
269 csu_util/rfc1738.cc \
270 csu_util/rfc1738.h \
271 csu_util/version_compare.cc \
272 csu_util/version_compare.h
273
274 GITVER := $(shell cd $(srcdir) && git describe --match release_\* --abbrev=6 --dirty || "N/A")
275 VER := $(subst release_,,$(GITVER))
276 ARCH := @ARCH@
277
278 setup_version.c : Makefile
279 @echo "Setup version: " $(VER)
280 $(AM_V_GEN)(echo '#define VERSION_PREFIX "%%% setup-version"';\
281 echo 'static const char version_store[] = VERSION_PREFIX " '$(VER)'";';\
282 echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp && \
283 mv version.tmp setup_version.c
284
285 # setup.exe.manifest is included in res.rc
286 res.o: @SETUP@.exe.manifest
287
288 .rc.o:
289 $(AM_V_GEN)$(WINDRES) --include-dir $(srcdir) -o $@ $<
290
291 setup-src:
292 @ver=setup-$(VER);\
293 cd ${srcdir}; rm -f $$ver; ln -sf . $$ver;\
294 git ls-files | tar -T - -cJf ${CURDIR}/$$ver-src.tar.xz;\
295 echo $$ver-src.tar.xz; exec rm -f $$ver
296
297 # optional: strip and compress executable
298 .PHONY: strip upx
299
300 strip: all
301 $(OBJCOPY) --add-gnu-debuglink=/dev/null --only-keep-debug setup$(EXEEXT) setup.dbg
302 $(OBJCOPY) --strip-all setup$(EXEEXT)
303 $(OBJCOPY) --add-gnu-debuglink=setup.dbg setup$(EXEEXT) setup$(EXEEXT)
304
305 CLEANFILES += setup.dbg
306
307 upx: strip
308 @if [ -e `which upx` ]; then\
309 upx --best --lzma setup$(EXEEXT) ;\
310 else \
311 echo "UPX doesn't seem to be installed, cannot compress setup$(EXEEXT)." ;\
312 fi
313
314 release: upx
315 cp setup.dbg setup-${VER}.${ARCH}.dbg
316 cp setup${EXEEXT} setup-${VER}.${ARCH}${EXEEXT}
317
318 clean-local:
319 rm -f setup*${EXEEXT} setup*.dbg
This page took 0.048741 seconds and 5 git commands to generate.