]> cygwin.com Git - cygwin-apps/setup.git/blame - Makefile.am
Fix scope problem when using the return value of get_root_dir()
[cygwin-apps/setup.git] / Makefile.am
CommitLineData
f6100b6f
RC
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#
f6100b6f
RC
16# Makefile for Cygwin installer
17
fe434e30 18SUBDIRS := @subdirs@ tests
f6100b6f
RC
19
20## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
21
8b726ef6
MB
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)
abad8c0c 24BASECXXFLAGS = -Werror -Wall -Wpointer-arith -Wcomments \
99f33a3b
CV
25 -Wcast-align -Wwrite-strings -fno-builtin-sscanf \
26 -Wno-attributes
abad8c0c
JT
27AM_CXXFLAGS = $(BASECXXFLAGS) -std=gnu++11 -Wno-deprecated-declarations \
28 ${$(*F)_CXXFLAGS}
29AM_CFLAGS = $(BASECXXFLAGS) -Wmissing-declarations -Winline \
43fe4376 30 -Wstrict-prototypes -Wmissing-prototypes
dacb1ebd
BD
31AM_YFLAGS = -d
32AM_LFLAGS = -8
92ef6cf8 33WINDRES = @WINDRES@
d88dca4a 34AM_CPPFLAGS = -DLZMA_API_STATIC -I$(srcdir)/libgetopt++/include
f6100b6f 35
6a03d5cd
CV
36inilex_CXXFLAGS:=-Wno-sign-compare
37
e49fef4d 38noinst_PROGRAMS = @SETUP@$(EXEEXT) @INILINT@
58ee6135
RC
39
40EXTRA_PROGRAMS = inilint
19911586 41## noinst_PROGRAMS +=inilint
f6100b6f 42
45e01f23 43EXTRA_DIST = \
89fc4ceb
MB
44 CHANGES \
45 CONTRIBUTORS \
46 COPYING \
47 bootstrap.sh \
48 check-na.bmp \
49 check-no.bmp \
50 check-yes.bmp \
51 choose-rtarrow.bmp \
52 choose-spin.bmp \
53 cygwin.ico \
c0342e37
CV
54 cygwin-setup.ico \
55 cygwin-terminal.ico \
89fc4ceb 56 setup.exe.manifest \
2258d2a1 57 setup64.exe.manifest \
89fc4ceb
MB
58 tree-minus.bmp \
59 tree-plus.bmp
45e01f23 60
443b9db6 61# iniparse.hh is generated from iniparse.yy via bison -d, so it needs to be
dacb1ebd
BD
62# included here for proper tracking (but not iniparse.cc, since automake
63# knows about that already)
89fc4ceb
MB
64BUILT_SOURCES = \
65 setup_version.c \
443b9db6 66 iniparse.hh
f6100b6f 67
92ef6cf8
BD
68CLEANFILES = setup_version.c
69
89fc4ceb 70inilint_LDADD = \
c63e8b4a 71 libgetopt++/libgetopt++.la
58ee6135 72inilint_SOURCES = \
89fc4ceb
MB
73 filemanip.cc \
74 filemanip.h \
75 find.cc \
76 find.h \
77 FindVisitor.cc \
78 FindVisitor.h \
79 LogSingleton.cc \
80 LogSingleton.h \
81 IniDBBuilder.h \
82 inilintmain.cc \
c63e8b4a 83 inilex.ll \
dacb1ebd 84 iniparse.yy \
89fc4ceb
MB
85 IniParseFeedback.cc \
86 IniParseFeedback.h \
87 io_stream.h \
88 io_stream.cc \
89 io_stream_file.h \
90 io_stream_file.cc \
91 IOStreamProvider.h \
92 mkdir.cc \
93 mkdir.h \
e49fef4d 94 mklink2.cc \
89fc4ceb
MB
95 PackageSpecification.cc \
96 PackageSpecification.h \
97 PackageTrust.h \
98 csu_util/rfc1738.cc \
99 csu_util/rfc1738.h \
100 String++.cc \
e49fef4d 101 String++.h
58ee6135 102
e49fef4d 103@SETUP@_LDADD = \
e581419c 104 libgetopt++/libgetopt++.la -lgcrypt -lgpg-error -llzma -lbz2 -lz \
22819fa1 105 -lshlwapi -lcomctl32 -lole32 -lws2_32 -lpsapi -luuid -lntdll -lwininet -lmingw32
e49fef4d
YS
106@SETUP@_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs
107@SETUP@_SOURCES = \
f9e903a3
RC
108 AntiVirus.cc \
109 AntiVirus.h \
f6100b6f 110 archive.cc \
45e01f23 111 archive.h \
f6100b6f 112 archive_tar.cc \
45e01f23 113 archive_tar.h \
f6100b6f 114 archive_tar_file.cc \
f6100b6f 115 choose.cc \
45e01f23 116 choose.h \
f6100b6f 117 compress.cc \
45e01f23 118 compress.h \
f6100b6f 119 compress_bz.cc \
45e01f23 120 compress_bz.h \
f6100b6f 121 compress_gz.cc \
45e01f23 122 compress_gz.h \
671140f9
CW
123 compress_xz.cc \
124 compress_xz.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 cygpackage.cc \
45e01f23 133 cygpackage.h \
f6100b6f 134 desktop.cc \
45e01f23 135 desktop.h \
f6100b6f 136 dialog.cc \
45e01f23 137 dialog.h \
f6100b6f 138 diskfull.cc \
45e01f23 139 diskfull.h \
f6100b6f 140 download.cc \
58ee6135
RC
141 download.h \
142 Exception.cc \
143 Exception.h \
f6100b6f 144 find.cc \
45e01f23 145 find.h \
b401ef47
RC
146 FindVisitor.cc \
147 FindVisitor.h \
f6100b6f 148 filemanip.cc \
45e01f23 149 filemanip.h \
f6100b6f 150 fromcwd.cc \
31f0ccce 151 Generic.h \
f6100b6f 152 geturl.cc \
45e01f23 153 geturl.h \
dbfe3c19
DK
154 gpg-packet.cc \
155 gpg-packet.h \
f6100b6f 156 ini.cc \
45e01f23 157 ini.h \
076654e7
RC
158 IniDBBuilder.h \
159 IniDBBuilderPackage.cc \
160 IniDBBuilderPackage.h \
c63e8b4a 161 inilex.ll \
dacb1ebd 162 iniparse.yy \
67829ce0
RC
163 IniParseFeedback.cc \
164 IniParseFeedback.h \
f6100b6f
RC
165 install.cc \
166 io_stream.cc \
45e01f23 167 io_stream.h \
f6100b6f 168 io_stream_cygfile.cc \
45e01f23 169 io_stream_cygfile.h \
f6100b6f 170 io_stream_file.cc \
45e01f23 171 io_stream_file.h \
f6100b6f 172 io_stream_memory.cc \
45e01f23 173 io_stream_memory.h \
19911586 174 IOStreamProvider.h \
dbfe3c19
DK
175 KeysSetting.cc \
176 KeysSetting.h \
f6100b6f 177 localdir.cc \
45e01f23 178 localdir.h \
9f4a0c62
RC
179 LogFile.cc \
180 LogFile.h \
181 LogSingleton.cc \
182 LogSingleton.h \
f6100b6f 183 main.cc \
f6100b6f 184 mkdir.cc \
45e01f23 185 mkdir.h \
f6100b6f 186 mklink2.cc \
45e01f23 187 mklink2.h \
f6100b6f 188 mount.cc \
45e01f23 189 mount.h \
f6100b6f 190 msg.cc \
45e01f23 191 msg.h \
f6100b6f 192 net.cc \
45e01f23 193 net.h \
f6100b6f 194 netio.cc \
45e01f23 195 netio.h \
f6100b6f 196 nio-ie5.cc \
45e01f23 197 nio-ie5.h \
f6100b6f 198 nio-file.cc \
45e01f23 199 nio-file.h \
f6100b6f 200 nio-ftp.cc \
45e01f23 201 nio-ftp.h \
f6100b6f 202 nio-http.cc \
45e01f23 203 nio-http.h \
f6100b6f 204 package_db.cc \
45e01f23 205 package_db.h \
f6100b6f 206 package_meta.cc \
45e01f23 207 package_meta.h \
f6100b6f 208 package_source.cc \
45e01f23 209 package_source.h \
f6100b6f 210 package_version.cc \
45e01f23 211 package_version.h \
aa1e3b4d
RC
212 PackageSpecification.cc \
213 PackageSpecification.h \
076654e7 214 PackageTrust.h \
f6100b6f 215 PickCategoryLine.cc \
45e01f23 216 PickCategoryLine.h \
45e01f23 217 PickLine.h \
f6100b6f 218 PickPackageLine.cc \
45e01f23 219 PickPackageLine.h \
f6100b6f 220 PickView.cc \
45e01f23 221 PickView.h \
f6100b6f 222 postinstall.cc \
018b960d
JT
223 postinstallresults.cc \
224 postinstallresults.h \
82306ac2
BD
225 prereq.cc \
226 prereq.h \
ec366f61
JT
227 processlist.cc \
228 processlist.h \
f6100b6f 229 proppage.cc \
45e01f23 230 proppage.h \
f6100b6f 231 propsheet.cc \
45e01f23 232 propsheet.h \
8a264069 233 RECTWrapper.h \
f6100b6f 234 res.rc \
45e01f23 235 resource.h \
f6100b6f 236 root.cc \
45e01f23 237 root.h \
b401ef47
RC
238 ScanFindVisitor.cc \
239 ScanFindVisitor.h \
f6100b6f 240 script.cc \
45e01f23 241 script.h \
2b734ec7 242 setup_version.h \
f6100b6f 243 setup_version.c \
be13ef43
CV
244 sha2.h \
245 sha2.c \
f6100b6f 246 simpsock.cc \
45e01f23 247 simpsock.h \
f6100b6f 248 site.cc \
45e01f23 249 site.h \
f6100b6f 250 source.cc \
45e01f23 251 source.h \
6ff96351
RC
252 SourceSetting.cc \
253 SourceSetting.h \
f6100b6f 254 splash.cc \
45e01f23 255 splash.h \
f6100b6f 256 state.cc \
45e01f23 257 state.h \
f6100b6f 258 String++.cc \
45e01f23 259 String++.h \
f6100b6f 260 threebar.cc \
45e01f23 261 threebar.h \
ead15931
RC
262 UserSettings.cc \
263 UserSettings.h \
5072c0bb 264 win32.cc \
45e01f23
RC
265 win32.h \
266 window.cc \
f4d80c3f 267 window.h \
0229b1d7
MB
268 csu_util/MD5Sum.cc \
269 csu_util/MD5Sum.h \
946198be
MB
270 csu_util/rfc1738.cc \
271 csu_util/rfc1738.h \
2b734ec7 272 csu_util/version_compare.cc \
d88dca4a 273 csu_util/version_compare.h
89fc4ceb 274
679f6a2e 275GITVER := $(shell cd $(srcdir) && git describe --match release_\* --abbrev=6 --dirty || "N/A")
ba3279e3 276VER := $(subst release_,,$(GITVER))
b941c8be 277
f6100b6f 278setup_version.c : $(srcdir)/ChangeLog Makefile
ba3279e3 279 @echo "Setup version: " $(VER)
e07b6f3d 280 $(AM_V_GEN)(echo '#define VERSION_PREFIX "%%% setup-version"';\
ba3279e3 281 echo 'static const char version_store[] = VERSION_PREFIX " '$(VER)'";';\
e07b6f3d 282 echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp && \
f6100b6f
RC
283 mv version.tmp setup_version.c
284
2ae3cf4e 285# setup.exe.manifest is included in res.rc
2258d2a1 286res.o: @SETUP@.exe.manifest
2ae3cf4e 287
92ef6cf8 288.rc.o:
e07b6f3d 289 $(AM_V_GEN)$(WINDRES) --include-dir $(srcdir) -o $@ $<
f6100b6f 290
a3cc7986 291setup-src:
06eb6617
AG
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
a3cc7986 296
07f1b4a8
CV
297# optional: strip and compress executable
298.PHONY: strip upx
299
300strip: all
301 $(STRIP) -s setup$(EXEEXT)
302upx: strip
303 @if [ -e `which upx` ]; then\
304 upx --best --lzma setup$(EXEEXT) ;\
305 else \
306 echo "UPX doesn't seem to be installed, cannot compress setup$(EXEEXT)." ;\
307 fi
This page took 0.093742 seconds and 5 git commands to generate.