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