]>
Commit | Line | Data |
---|---|---|
f6100b6f RC |
1 | ## Process this file with automake to produce Makefile.in |
2 | # | |
f6100b6f RC |
3 | # Copyright (c) 2000, Red Hat, Inc. |
4 | # Copyright (c) 2002, Robert Collins | |
5 | # | |
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. | |
10 | # | |
11 | # A copy of the GNU General Public License can be found at | |
12 | # http://www.gnu.org/ | |
13 | # | |
f6100b6f RC |
14 | # Makefile for Cygwin installer |
15 | ||
fe434e30 | 16 | SUBDIRS := @subdirs@ tests |
f6100b6f RC |
17 | |
18 | ## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]* | |
19 | ||
8b726ef6 MB |
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) | |
abad8c0c | 22 | BASECXXFLAGS = -Werror -Wall -Wpointer-arith -Wcomments \ |
99f33a3b CV |
23 | -Wcast-align -Wwrite-strings -fno-builtin-sscanf \ |
24 | -Wno-attributes | |
1c6add37 | 25 | AM_CXXFLAGS = $(BASECXXFLAGS) -std=gnu++11 ${$(*F)_CXXFLAGS} |
abad8c0c | 26 | AM_CFLAGS = $(BASECXXFLAGS) -Wmissing-declarations -Winline \ |
43fe4376 | 27 | -Wstrict-prototypes -Wmissing-prototypes |
dacb1ebd BD |
28 | AM_YFLAGS = -d |
29 | AM_LFLAGS = -8 | |
92ef6cf8 | 30 | WINDRES = @WINDRES@ |
2752cfd1 JT |
31 | AM_CPPFLAGS = -D__USE_MINGW_ANSI_STDIO=1 -DLZMA_API_STATIC\ |
32 | -I$(srcdir)/libgetopt++/include \ | |
c9641752 | 33 | $(ZLIB_CFLAGS) $(LZMA_CFLAGS) $(ZSTD_CFLAGS) $(LIBCRYPT_CFLAGS) $(LIBSOLV_CFLAGS) |
f6100b6f | 34 | |
6a03d5cd CV |
35 | inilex_CXXFLAGS:=-Wno-sign-compare |
36 | ||
a99dd611 | 37 | noinst_PROGRAMS = @SETUP@$(EXEEXT) inilint |
f6100b6f | 38 | |
45e01f23 | 39 | EXTRA_DIST = \ |
89fc4ceb MB |
40 | CHANGES \ |
41 | CONTRIBUTORS \ | |
42 | COPYING \ | |
43 | bootstrap.sh \ | |
89fc4ceb | 44 | cygwin.ico \ |
c0342e37 CV |
45 | cygwin-setup.ico \ |
46 | cygwin-terminal.ico \ | |
89fc4ceb | 47 | setup.exe.manifest \ |
db1c5abc JT |
48 | tree-minus.ico \ |
49 | tree-plus.ico | |
45e01f23 | 50 | |
443b9db6 | 51 | # iniparse.hh is generated from iniparse.yy via bison -d, so it needs to be |
dacb1ebd BD |
52 | # included here for proper tracking (but not iniparse.cc, since automake |
53 | # knows about that already) | |
89fc4ceb MB |
54 | BUILT_SOURCES = \ |
55 | setup_version.c \ | |
443b9db6 | 56 | iniparse.hh |
f6100b6f | 57 | |
92ef6cf8 BD |
58 | CLEANFILES = setup_version.c |
59 | ||
89fc4ceb | 60 | inilint_LDADD = \ |
0b90765c JT |
61 | libgetopt++/libgetopt++.la \ |
62 | -lntdll -luuid | |
a99dd611 | 63 | |
58ee6135 | 64 | inilint_SOURCES = \ |
0b90765c JT |
65 | filemanip.cc \ |
66 | filemanip.h \ | |
4b81d7a1 JT |
67 | CliParseFeedback.cc \ |
68 | CliParseFeedback.h \ | |
89fc4ceb MB |
69 | LogSingleton.cc \ |
70 | LogSingleton.h \ | |
71 | IniDBBuilder.h \ | |
72 | inilintmain.cc \ | |
c63e8b4a | 73 | inilex.ll \ |
dacb1ebd | 74 | iniparse.yy \ |
0b90765c JT |
75 | io_stream.cc \ |
76 | io_stream.h \ | |
77 | io_stream_file.cc \ | |
78 | io_stream_file.h \ | |
79 | mkdir.cc \ | |
80 | mkdir.h \ | |
81 | mklink2.cc \ | |
82 | mklink2.h \ | |
89fc4ceb | 83 | PackageTrust.h \ |
89fc4ceb | 84 | String++.cc \ |
0b90765c JT |
85 | String++.h \ |
86 | win32.cc \ | |
87 | win32.h | |
58ee6135 | 88 | |
e49fef4d | 89 | @SETUP@_LDADD = \ |
4221a216 JT |
90 | libgetopt++/libgetopt++.la \ |
91 | $(LIBGCRYPT_LIBS) \ | |
c9641752 | 92 | $(ZSTD_LIBS) \ |
4221a216 JT |
93 | $(LZMA_LIBS) \ |
94 | $(BZ2_LIBS) \ | |
95 | $(ZLIB_LIBS) \ | |
96 | $(LIBSOLV_LIBS) -lregex \ | |
ca68262f JT |
97 | -lshlwapi -lcomctl32 -lole32 -lpsapi -luuid -lntdll -lwininet -lws2_32 \ |
98 | -lmingw32 -lssp | |
e49fef4d YS |
99 | @SETUP@_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs |
100 | @SETUP@_SOURCES = \ | |
8ba85a54 | 101 | actionlist.h \ |
f9e903a3 RC |
102 | AntiVirus.cc \ |
103 | AntiVirus.h \ | |
f6100b6f | 104 | archive.cc \ |
45e01f23 | 105 | archive.h \ |
f6100b6f | 106 | archive_tar.cc \ |
45e01f23 | 107 | archive_tar.h \ |
f6100b6f | 108 | archive_tar_file.cc \ |
f6100b6f | 109 | choose.cc \ |
45e01f23 | 110 | choose.h \ |
b6dab3ea CF |
111 | compactos.cc \ |
112 | compactos.h \ | |
f6100b6f | 113 | compress.cc \ |
45e01f23 | 114 | compress.h \ |
f6100b6f | 115 | compress_bz.cc \ |
45e01f23 | 116 | compress_bz.h \ |
f6100b6f | 117 | compress_gz.cc \ |
45e01f23 | 118 | compress_gz.h \ |
671140f9 CW |
119 | compress_xz.cc \ |
120 | compress_xz.h \ | |
c9641752 AG |
121 | compress_zstd.cc \ |
122 | compress_zstd.h \ | |
b1902cbc JT |
123 | confirm.cc \ |
124 | confirm.h \ | |
39b42ff3 RC |
125 | ConnectionSetting.cc \ |
126 | ConnectionSetting.h \ | |
ee91d9be RC |
127 | ControlAdjuster.cc \ |
128 | ControlAdjuster.h \ | |
dbfe3c19 DK |
129 | crypto.cc \ |
130 | crypto.h \ | |
131 | cyg-pubkey.h \ | |
f6100b6f | 132 | desktop.cc \ |
45e01f23 | 133 | desktop.h \ |
f6100b6f | 134 | dialog.cc \ |
45e01f23 | 135 | dialog.h \ |
f6100b6f | 136 | diskfull.cc \ |
45e01f23 | 137 | diskfull.h \ |
f6100b6f | 138 | download.cc \ |
58ee6135 RC |
139 | download.h \ |
140 | Exception.cc \ | |
141 | Exception.h \ | |
f6100b6f | 142 | find.cc \ |
45e01f23 | 143 | find.h \ |
b401ef47 RC |
144 | FindVisitor.cc \ |
145 | FindVisitor.h \ | |
f6100b6f | 146 | filemanip.cc \ |
45e01f23 | 147 | filemanip.h \ |
f6100b6f | 148 | fromcwd.cc \ |
31f0ccce | 149 | Generic.h \ |
f6100b6f | 150 | geturl.cc \ |
45e01f23 | 151 | geturl.h \ |
dbfe3c19 DK |
152 | gpg-packet.cc \ |
153 | gpg-packet.h \ | |
f6100b6f | 154 | ini.cc \ |
45e01f23 | 155 | ini.h \ |
076654e7 RC |
156 | IniDBBuilder.h \ |
157 | IniDBBuilderPackage.cc \ | |
158 | IniDBBuilderPackage.h \ | |
c63e8b4a | 159 | inilex.ll \ |
dacb1ebd | 160 | iniparse.yy \ |
67829ce0 | 161 | IniParseFeedback.h \ |
f6100b6f RC |
162 | install.cc \ |
163 | io_stream.cc \ | |
45e01f23 | 164 | io_stream.h \ |
f6100b6f | 165 | io_stream_cygfile.cc \ |
45e01f23 | 166 | io_stream_cygfile.h \ |
f6100b6f | 167 | io_stream_file.cc \ |
45e01f23 | 168 | io_stream_file.h \ |
f6100b6f | 169 | io_stream_memory.cc \ |
45e01f23 | 170 | io_stream_memory.h \ |
19911586 | 171 | IOStreamProvider.h \ |
dbfe3c19 DK |
172 | KeysSetting.cc \ |
173 | KeysSetting.h \ | |
1c159e0a JT |
174 | libsolv.cc \ |
175 | libsolv.h \ | |
ce9f6dd0 JT |
176 | ListView.cc \ |
177 | ListView.h \ | |
f6100b6f | 178 | localdir.cc \ |
45e01f23 | 179 | localdir.h \ |
9f4a0c62 RC |
180 | LogFile.cc \ |
181 | LogFile.h \ | |
182 | LogSingleton.cc \ | |
183 | LogSingleton.h \ | |
f6100b6f | 184 | main.cc \ |
f6100b6f | 185 | mkdir.cc \ |
45e01f23 | 186 | mkdir.h \ |
f6100b6f | 187 | mklink2.cc \ |
45e01f23 | 188 | mklink2.h \ |
f6100b6f | 189 | mount.cc \ |
45e01f23 | 190 | mount.h \ |
f6100b6f | 191 | msg.cc \ |
45e01f23 | 192 | msg.h \ |
f6100b6f | 193 | net.cc \ |
45e01f23 | 194 | net.h \ |
f6100b6f | 195 | netio.cc \ |
45e01f23 | 196 | netio.h \ |
f6100b6f | 197 | nio-ie5.cc \ |
45e01f23 | 198 | nio-ie5.h \ |
f6100b6f | 199 | package_db.cc \ |
45e01f23 | 200 | package_db.h \ |
711d8346 | 201 | package_depends.h \ |
4cd71131 | 202 | package_depends.cc \ |
f6100b6f | 203 | package_meta.cc \ |
45e01f23 | 204 | package_meta.h \ |
f6100b6f | 205 | package_source.cc \ |
45e01f23 | 206 | package_source.h \ |
f3992588 | 207 | package_version.h \ |
aa1e3b4d RC |
208 | PackageSpecification.cc \ |
209 | PackageSpecification.h \ | |
076654e7 | 210 | PackageTrust.h \ |
f6100b6f | 211 | PickCategoryLine.cc \ |
45e01f23 | 212 | PickCategoryLine.h \ |
f6100b6f | 213 | PickPackageLine.cc \ |
45e01f23 | 214 | PickPackageLine.h \ |
f6100b6f | 215 | PickView.cc \ |
45e01f23 | 216 | PickView.h \ |
f6100b6f | 217 | postinstall.cc \ |
018b960d JT |
218 | postinstallresults.cc \ |
219 | postinstallresults.h \ | |
82306ac2 BD |
220 | prereq.cc \ |
221 | prereq.h \ | |
ec366f61 JT |
222 | processlist.cc \ |
223 | processlist.h \ | |
f6100b6f | 224 | proppage.cc \ |
45e01f23 | 225 | proppage.h \ |
f6100b6f | 226 | propsheet.cc \ |
45e01f23 | 227 | propsheet.h \ |
8a264069 | 228 | RECTWrapper.h \ |
f6100b6f | 229 | res.rc \ |
45e01f23 | 230 | resource.h \ |
f6100b6f | 231 | root.cc \ |
45e01f23 | 232 | root.h \ |
f6100b6f | 233 | script.cc \ |
45e01f23 | 234 | script.h \ |
2b734ec7 | 235 | setup_version.h \ |
f6100b6f | 236 | setup_version.c \ |
be13ef43 CV |
237 | sha2.h \ |
238 | sha2.c \ | |
f6100b6f | 239 | site.cc \ |
45e01f23 | 240 | site.h \ |
f6100b6f | 241 | source.cc \ |
45e01f23 | 242 | source.h \ |
6ff96351 RC |
243 | SourceSetting.cc \ |
244 | SourceSetting.h \ | |
f6100b6f | 245 | splash.cc \ |
45e01f23 | 246 | splash.h \ |
f6100b6f | 247 | state.cc \ |
45e01f23 | 248 | state.h \ |
f6100b6f | 249 | String++.cc \ |
45e01f23 | 250 | String++.h \ |
f6100b6f | 251 | threebar.cc \ |
45e01f23 | 252 | threebar.h \ |
ead15931 RC |
253 | UserSettings.cc \ |
254 | UserSettings.h \ | |
5072c0bb | 255 | win32.cc \ |
45e01f23 RC |
256 | win32.h \ |
257 | window.cc \ | |
f4d80c3f | 258 | window.h \ |
0229b1d7 MB |
259 | csu_util/MD5Sum.cc \ |
260 | csu_util/MD5Sum.h \ | |
946198be MB |
261 | csu_util/rfc1738.cc \ |
262 | csu_util/rfc1738.h \ | |
2b734ec7 | 263 | csu_util/version_compare.cc \ |
d88dca4a | 264 | csu_util/version_compare.h |
89fc4ceb | 265 | |
0a416c48 | 266 | GITVER := $(shell cd $(srcdir) && git describe --match release_\* --abbrev=6 --dirty || echo "N/A") |
ba3279e3 | 267 | VER := $(subst release_,,$(GITVER)) |
b9d154a2 | 268 | ARCH := @ARCH@ |
b941c8be | 269 | |
451e2119 | 270 | setup_version.c : Makefile |
ba3279e3 | 271 | @echo "Setup version: " $(VER) |
e07b6f3d | 272 | $(AM_V_GEN)(echo '#define VERSION_PREFIX "%%% setup-version"';\ |
ba3279e3 | 273 | echo 'static const char version_store[] = VERSION_PREFIX " '$(VER)'";';\ |
e07b6f3d | 274 | echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp && \ |
f6100b6f RC |
275 | mv version.tmp setup_version.c |
276 | ||
2ae3cf4e | 277 | # setup.exe.manifest is included in res.rc |
ab7f62bf | 278 | res.o: setup.exe.manifest |
2ae3cf4e | 279 | |
92ef6cf8 | 280 | .rc.o: |
5e9eb131 | 281 | $(AM_V_GEN)$(WINDRES) --codepage 65001 --include-dir $(srcdir) -o $@ $< |
f6100b6f | 282 | |
a3cc7986 | 283 | setup-src: |
06eb6617 AG |
284 | @ver=setup-$(VER);\ |
285 | cd ${srcdir}; rm -f $$ver; ln -sf . $$ver;\ | |
286 | git ls-files | tar -T - -cJf ${CURDIR}/$$ver-src.tar.xz;\ | |
287 | echo $$ver-src.tar.xz; exec rm -f $$ver | |
a3cc7986 | 288 | |
07f1b4a8 CV |
289 | # optional: strip and compress executable |
290 | .PHONY: strip upx | |
291 | ||
292 | strip: all | |
77ddbf45 JT |
293 | $(OBJCOPY) --add-gnu-debuglink=/dev/null --only-keep-debug setup$(EXEEXT) setup.dbg |
294 | $(OBJCOPY) --strip-all setup$(EXEEXT) | |
295 | $(OBJCOPY) --add-gnu-debuglink=setup.dbg setup$(EXEEXT) setup$(EXEEXT) | |
296 | ||
b9d154a2 JT |
297 | CLEANFILES += setup.dbg |
298 | ||
07f1b4a8 CV |
299 | upx: strip |
300 | @if [ -e `which upx` ]; then\ | |
301 | upx --best --lzma setup$(EXEEXT) ;\ | |
302 | else \ | |
303 | echo "UPX doesn't seem to be installed, cannot compress setup$(EXEEXT)." ;\ | |
304 | fi | |
b9d154a2 JT |
305 | |
306 | release: upx | |
307 | cp setup.dbg setup-${VER}.${ARCH}.dbg | |
308 | cp setup${EXEEXT} setup-${VER}.${ARCH}${EXEEXT} | |
309 | ||
71c57a35 JT |
310 | UPLOAD_HOST=cygwin-admin@cygwin.com |
311 | UPLOAD_PATH=/www/sourceware/htdocs/cygwin/setup | |
f681d72f | 312 | SIGN_KEYS="--enable-dsa2 --personal-digest-preferences=sha256 -u 676041BA -u 1A698DE9E2E56300" |
71c57a35 JT |
313 | |
314 | upload: release | |
7a80c6d2 | 315 | scp setup-${VER}.$(ARCH).exe setup-${VER}.$(ARCH).dbg ${UPLOAD_HOST}:${UPLOAD_PATH} |
f681d72f | 316 | ssh ${UPLOAD_HOST} gpg ${SIGN_KEYS} --detach-sign ${UPLOAD_PATH}/setup-${VER}.$(ARCH).exe |
71c57a35 | 317 | |
b9d154a2 JT |
318 | clean-local: |
319 | rm -f setup*${EXEEXT} setup*.dbg |