]>
Commit | Line | Data |
---|---|---|
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_depends.h \ | |
206 | package_meta.cc \ | |
207 | package_meta.h \ | |
208 | package_source.cc \ | |
209 | package_source.h \ | |
210 | package_version.cc \ | |
211 | package_version.h \ | |
212 | PackageSpecification.cc \ | |
213 | PackageSpecification.h \ | |
214 | PackageTrust.h \ | |
215 | PickCategoryLine.cc \ | |
216 | PickCategoryLine.h \ | |
217 | PickLine.h \ | |
218 | PickPackageLine.cc \ | |
219 | PickPackageLine.h \ | |
220 | PickView.cc \ | |
221 | PickView.h \ | |
222 | postinstall.cc \ | |
223 | postinstallresults.cc \ | |
224 | postinstallresults.h \ | |
225 | prereq.cc \ | |
226 | prereq.h \ | |
227 | processlist.cc \ | |
228 | processlist.h \ | |
229 | proppage.cc \ | |
230 | proppage.h \ | |
231 | propsheet.cc \ | |
232 | propsheet.h \ | |
233 | RECTWrapper.h \ | |
234 | res.rc \ | |
235 | resource.h \ | |
236 | root.cc \ | |
237 | root.h \ | |
238 | ScanFindVisitor.cc \ | |
239 | ScanFindVisitor.h \ | |
240 | script.cc \ | |
241 | script.h \ | |
242 | setup_version.h \ | |
243 | setup_version.c \ | |
244 | sha2.h \ | |
245 | sha2.c \ | |
246 | simpsock.cc \ | |
247 | simpsock.h \ | |
248 | site.cc \ | |
249 | site.h \ | |
250 | source.cc \ | |
251 | source.h \ | |
252 | SourceSetting.cc \ | |
253 | SourceSetting.h \ | |
254 | splash.cc \ | |
255 | splash.h \ | |
256 | state.cc \ | |
257 | state.h \ | |
258 | String++.cc \ | |
259 | String++.h \ | |
260 | threebar.cc \ | |
261 | threebar.h \ | |
262 | UserSettings.cc \ | |
263 | UserSettings.h \ | |
264 | win32.cc \ | |
265 | win32.h \ | |
266 | window.cc \ | |
267 | window.h \ | |
268 | csu_util/MD5Sum.cc \ | |
269 | csu_util/MD5Sum.h \ | |
270 | csu_util/rfc1738.cc \ | |
271 | csu_util/rfc1738.h \ | |
272 | csu_util/version_compare.cc \ | |
273 | csu_util/version_compare.h | |
274 | ||
275 | GITVER := $(shell cd $(srcdir) && git describe --match release_\* --abbrev=6 --dirty || "N/A") | |
276 | VER := $(subst release_,,$(GITVER)) | |
277 | ARCH := @ARCH@ | |
278 | ||
279 | setup_version.c : 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 | |
285 | ||
286 | # setup.exe.manifest is included in res.rc | |
287 | res.o: @SETUP@.exe.manifest | |
288 | ||
289 | .rc.o: | |
290 | $(AM_V_GEN)$(WINDRES) --include-dir $(srcdir) -o $@ $< | |
291 | ||
292 | setup-src: | |
293 | @ver=setup-$(VER);\ | |
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 | |
297 | ||
298 | # optional: strip and compress executable | |
299 | .PHONY: strip upx | |
300 | ||
301 | strip: all | |
302 | $(OBJCOPY) --add-gnu-debuglink=/dev/null --only-keep-debug setup$(EXEEXT) setup.dbg | |
303 | $(OBJCOPY) --strip-all setup$(EXEEXT) | |
304 | $(OBJCOPY) --add-gnu-debuglink=setup.dbg setup$(EXEEXT) setup$(EXEEXT) | |
305 | ||
306 | CLEANFILES += setup.dbg | |
307 | ||
308 | upx: strip | |
309 | @if [ -e `which upx` ]; then\ | |
310 | upx --best --lzma setup$(EXEEXT) ;\ | |
311 | else \ | |
312 | echo "UPX doesn't seem to be installed, cannot compress setup$(EXEEXT)." ;\ | |
313 | fi | |
314 | ||
315 | release: upx | |
316 | cp setup.dbg setup-${VER}.${ARCH}.dbg | |
317 | cp setup${EXEEXT} setup-${VER}.${ARCH}${EXEEXT} | |
318 | ||
319 | clean-local: | |
320 | rm -f setup*${EXEEXT} setup*.dbg |