]>
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 | # Written by Christopher Faylor <cgf@redhat.com> | |
17 | # and Robert Collins <rbtcollins@hotmail.com> | |
18 | # | |
19 | # Makefile for Cygwin installer | |
20 | ||
21 | AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.6 foreign | |
22 | DIST_SUBDIRS = libgetopt++ tests | |
23 | SUBDIRS = libgetopt++ tests | |
24 | ||
25 | ## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]* | |
26 | ||
27 | # We would like to use -Winline for C++ as well, but some STL code triggers | |
28 | # this warning. (Bug verified present in gcc-3.3) | |
29 | BASECXXFLAGS = -Wall -Wpointer-arith -Wcomments -Wcast-align -Wwrite-strings | |
30 | AM_CXXFLAGS = -Werror $(BASECXXFLAGS) | |
31 | AM_CFLAGS = $(AM_CXXFLAGS) -Wmissing-declarations -Winline \ | |
32 | -Wstrict-prototypes -Wmissing-prototypes | |
33 | ||
34 | WINDRES := @WINDRES@ | |
35 | ||
36 | INCLUDES = -I$(srcdir)/libgetopt++/include -I/usr/include/mingw | |
37 | ||
38 | noinst_PROGRAMS = \ | |
39 | setup \ | |
40 | @INILINT@ | |
41 | ||
42 | EXTRA_PROGRAMS = inilint | |
43 | ## noinst_PROGRAMS +=inilint | |
44 | ||
45 | EXTRA_DIST = \ | |
46 | CHANGES \ | |
47 | CONTRIBUTORS \ | |
48 | bootstrap.sh \ | |
49 | check-na.bmp \ | |
50 | check-no.bmp \ | |
51 | check-yes.bmp \ | |
52 | choose-rtarrow.bmp \ | |
53 | choose-spin.bmp \ | |
54 | cygwin.ico \ | |
55 | inilex.l \ | |
56 | iniparse.y \ | |
57 | libmd5-rfc/README \ | |
58 | libmd5-rfc/md5main.c \ | |
59 | setup.exe.manifest | |
60 | ||
61 | BUILT_SOURCES = setup_version.c \ | |
62 | inilex.cc \ | |
63 | iniparse.cc | |
64 | ||
65 | if MINGWTARGET | |
66 | inilint_extras = \ | |
67 | autoload.c \ | |
68 | mklink2.cc | |
69 | else | |
70 | inilint_extras = | |
71 | endif | |
72 | ||
73 | inilint_LDADD = libgetopt++/libgetopt++.la -luser32 -lkernel32 | |
74 | inilint_SOURCES = \ | |
75 | filemanip.cc \ | |
76 | filemanip.h \ | |
77 | find.cc \ | |
78 | find.h \ | |
79 | FindVisitor.cc \ | |
80 | FindVisitor.h \ | |
81 | LogSingleton.cc \ | |
82 | LogSingleton.h \ | |
83 | IniDBBuilder.cc \ | |
84 | IniDBBuilder.h \ | |
85 | inilex.cc \ | |
86 | inilintmain.cc \ | |
87 | iniparse.cc \ | |
88 | iniparse.h \ | |
89 | IniParseFeedback.cc \ | |
90 | IniParseFeedback.h \ | |
91 | io_stream.h \ | |
92 | io_stream.cc \ | |
93 | io_stream_file.h \ | |
94 | io_stream_file.cc \ | |
95 | IOStreamProvider.h \ | |
96 | mkdir.cc \ | |
97 | mkdir.h \ | |
98 | PackageSpecification.cc \ | |
99 | PackageSpecification.h \ | |
100 | PackageTrust.h \ | |
101 | csu_util/rfc1738.cc \ | |
102 | csu_util/rfc1738.h \ | |
103 | String++.cc \ | |
104 | String++.h \ | |
105 | $(inilint_extras) | |
106 | ||
107 | # Obviously we are not really building a program called warnonly | |
108 | # However, this dance was the most non-invasive way I could find | |
109 | # of varying CFLAGS for a single file | |
110 | EXTRA_PROGRAMS += warnonly | |
111 | warnonly_CXXFLAGS = $(BASECXXFLAGS) | |
112 | warnonly_SOURCES = inilex.cc | |
113 | EXTRA_setup_SOURCES = $(warnonly_SOURCES) | |
114 | ||
115 | setup_LDADD = warnonly-inilex.o res.o \ | |
116 | libgetopt++/libgetopt++.la \ | |
117 | /usr/lib/mingw/libbz2.a \ | |
118 | /usr/lib/mingw/libz.a \ | |
119 | -luser32 -lkernel32 \ | |
120 | -lcomctl32 -lole32 -lwsock32 -lnetapi32 -ladvapi32 -luuid | |
121 | setup_LDFLAGS = -mwindows | |
122 | setup_SOURCES = \ | |
123 | AntiVirus.cc \ | |
124 | AntiVirus.h \ | |
125 | archive.cc \ | |
126 | archive.h \ | |
127 | archive_tar.cc \ | |
128 | archive_tar.h \ | |
129 | archive_tar_file.cc \ | |
130 | autoload.c \ | |
131 | category.cc \ | |
132 | category.h \ | |
133 | choose.cc \ | |
134 | choose.h \ | |
135 | compress.cc \ | |
136 | compress.h \ | |
137 | compress_bz.cc \ | |
138 | compress_bz.h \ | |
139 | compress_gz.cc \ | |
140 | compress_gz.h \ | |
141 | ConnectionSetting.cc \ | |
142 | ConnectionSetting.h \ | |
143 | ControlAdjuster.cc \ | |
144 | ControlAdjuster.h \ | |
145 | cygpackage.cc \ | |
146 | cygpackage.h \ | |
147 | desktop.cc \ | |
148 | desktop.h \ | |
149 | dialog.cc \ | |
150 | dialog.h \ | |
151 | diskfull.cc \ | |
152 | diskfull.h \ | |
153 | download.cc \ | |
154 | download.h \ | |
155 | Exception.cc \ | |
156 | Exception.h \ | |
157 | find.cc \ | |
158 | find.h \ | |
159 | FindVisitor.cc \ | |
160 | FindVisitor.h \ | |
161 | filemanip.cc \ | |
162 | filemanip.h \ | |
163 | fromcwd.cc \ | |
164 | Generic.h \ | |
165 | geturl.cc \ | |
166 | geturl.h \ | |
167 | ini.cc \ | |
168 | ini.h \ | |
169 | IniDBBuilder.cc \ | |
170 | IniDBBuilder.h \ | |
171 | IniDBBuilderPackage.cc \ | |
172 | IniDBBuilderPackage.h \ | |
173 | iniparse.cc \ | |
174 | iniparse.h \ | |
175 | IniParseFeedback.cc \ | |
176 | IniParseFeedback.h \ | |
177 | IniParseFindVisitor.cc \ | |
178 | IniParseFindVisitor.h \ | |
179 | install.cc \ | |
180 | io_stream.cc \ | |
181 | io_stream.h \ | |
182 | io_stream_cygfile.cc \ | |
183 | io_stream_cygfile.h \ | |
184 | io_stream_file.cc \ | |
185 | io_stream_file.h \ | |
186 | io_stream_memory.cc \ | |
187 | io_stream_memory.h \ | |
188 | IOStreamProvider.h \ | |
189 | localdir.cc \ | |
190 | localdir.h \ | |
191 | LogFile.cc \ | |
192 | LogFile.h \ | |
193 | LogSingleton.cc \ | |
194 | LogSingleton.h \ | |
195 | main.cc \ | |
196 | mkdir.cc \ | |
197 | mkdir.h \ | |
198 | mklink2.cc \ | |
199 | mklink2.h \ | |
200 | mount.cc \ | |
201 | mount.h \ | |
202 | msg.cc \ | |
203 | msg.h \ | |
204 | net.cc \ | |
205 | net.h \ | |
206 | netio.cc \ | |
207 | netio.h \ | |
208 | nio-ie5.cc \ | |
209 | nio-ie5.h \ | |
210 | nio-file.cc \ | |
211 | nio-file.h \ | |
212 | nio-ftp.cc \ | |
213 | nio-ftp.h \ | |
214 | nio-http.cc \ | |
215 | nio-http.h \ | |
216 | package_db.cc \ | |
217 | package_db.h \ | |
218 | package_meta.cc \ | |
219 | package_meta.h \ | |
220 | package_source.cc \ | |
221 | package_source.h \ | |
222 | package_version.cc \ | |
223 | package_version.h \ | |
224 | PackageSpecification.cc \ | |
225 | PackageSpecification.h \ | |
226 | PackageTrust.h \ | |
227 | PickCategoryLine.cc \ | |
228 | PickCategoryLine.h \ | |
229 | PickLine.h \ | |
230 | PickPackageLine.cc \ | |
231 | PickPackageLine.h \ | |
232 | PickView.cc \ | |
233 | PickView.h \ | |
234 | postinstall.cc \ | |
235 | proppage.cc \ | |
236 | proppage.h \ | |
237 | propsheet.cc \ | |
238 | propsheet.h \ | |
239 | RECTWrapper.h \ | |
240 | res.rc \ | |
241 | resource.h \ | |
242 | root.cc \ | |
243 | root.h \ | |
244 | ScanFindVisitor.cc \ | |
245 | ScanFindVisitor.h \ | |
246 | script.cc \ | |
247 | script.h \ | |
248 | setup_version.h \ | |
249 | setup_version.c \ | |
250 | simpsock.cc \ | |
251 | simpsock.h \ | |
252 | site.cc \ | |
253 | site.h \ | |
254 | source.cc \ | |
255 | source.h \ | |
256 | SourceSetting.cc \ | |
257 | SourceSetting.h \ | |
258 | splash.cc \ | |
259 | splash.h \ | |
260 | state.cc \ | |
261 | state.h \ | |
262 | String++.cc \ | |
263 | String++.h \ | |
264 | threebar.cc \ | |
265 | threebar.h \ | |
266 | UserSetting.cc \ | |
267 | UserSetting.h \ | |
268 | UserSettings.cc \ | |
269 | UserSettings.h \ | |
270 | win32.h \ | |
271 | window.cc \ | |
272 | window.h \ | |
273 | csu_util/MD5Sum.cc \ | |
274 | csu_util/MD5Sum.h \ | |
275 | csu_util/rfc1738.cc \ | |
276 | csu_util/rfc1738.h \ | |
277 | csu_util/version_compare.cc \ | |
278 | csu_util/version_compare.h \ | |
279 | libmd5-rfc/md5.c \ | |
280 | libmd5-rfc/md5.h | |
281 | ||
282 | setup_version.c : $(srcdir)/ChangeLog Makefile | |
283 | V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \ | |
284 | $(srcdir)/ChangeLog` ;\ | |
285 | (echo '#define VERSION_PREFIX "%%% setup-version"';\ | |
286 | echo 'static const char version_store[] = VERSION_PREFIX " '$$V'";';\ | |
287 | echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp;\ | |
288 | mv version.tmp setup_version.c | |
289 | ||
290 | %.o: %.rc | |
291 | $(WINDRES) --preprocessor "$(CC) -E -xc-header -DRC_INVOKED" --include-dir $(srcdir) -o $@ $< | |
292 | ||
293 | iniparse.cc iniparse.h : iniparse.y | |
294 | bison -d -o iniparse.cc $(srcdir)/iniparse.y | |
295 | @mv iniparse.cc.h iniparse.h 2>/dev/null || mv iniparse.hh iniparse.h | |
296 | ||
297 | inilex.cc : inilex.l iniparse.h | |
298 | flex -8 $(srcdir)/inilex.l | |
299 | mv lex.yy.c inilex.cc | |
300 | ||
301 | # Make a distribution package and tarball | |
302 | release: setup$(EXEEXT) dist-all $(srcdir)/ChangeLog Makefile | |
303 | $(STRIP) setup.exe && \ | |
304 | upx --best setup.exe && \ | |
305 | V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \ | |
306 | $(srcdir)/ChangeLog` ;\ | |
307 | mv setup.exe setup-$${V}.exe && \ | |
308 | mv setup-0.tar.bz2 setup-$${V}.tar.bz2 && \ | |
309 | tar cjf setup-$${V}-1-src.tar.bz2 setup-$${V}.tar.bz2 | |
310 | ||
311 | # Create a snapshot and upload it (requires write access) | |
312 | snapshot: release | |
313 | V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \ | |
314 | $(srcdir)/ChangeLog` ;\ | |
315 | scp -C setup-$${V}.exe setup-$${V}.tar.bz2 $${cygwinsite}:setup-snapshots/ |