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