]>
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 | GUIDELINES \ | |
47 | check-na.bmp \ | |
48 | check-no.bmp \ | |
49 | check-yes.bmp \ | |
50 | choose-rtarrow.bmp \ | |
51 | choose-spin.bmp \ | |
52 | cygwin.ico \ | |
53 | inilex.l \ | |
54 | iniparse.y | |
55 | ||
56 | BUILT_SOURCES = setup_version.c \ | |
57 | inilex.cc \ | |
58 | iniparse.cc | |
59 | ||
60 | if MINGWTARGET | |
61 | inilint_extras = \ | |
62 | autoload.c \ | |
63 | mklink2.cc | |
64 | else | |
65 | inilint_extras = | |
66 | endif | |
67 | ||
68 | inilint_LDADD = libgetopt++/libgetopt++.la -luser32 -lkernel32 | |
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.cc \ | |
79 | IniDBBuilder.h \ | |
80 | inilex.cc \ | |
81 | inilintmain.cc \ | |
82 | iniparse.cc \ | |
83 | iniparse.h \ | |
84 | IniParseFeedback.cc \ | |
85 | IniParseFeedback.h \ | |
86 | io_stream.h \ | |
87 | io_stream.cc \ | |
88 | io_stream_file.h \ | |
89 | io_stream_file.cc \ | |
90 | IOStreamProvider.h \ | |
91 | mkdir.cc \ | |
92 | mkdir.h \ | |
93 | PackageSpecification.cc \ | |
94 | PackageSpecification.h \ | |
95 | PackageTrust.h \ | |
96 | rfc1738.cc \ | |
97 | rfc1738.h \ | |
98 | String++.cc \ | |
99 | String++.h \ | |
100 | $(inilint_extras) | |
101 | ||
102 | # Obviously we are not really building a program called warnonly | |
103 | # However, this dance was the most non-invasive way I could find | |
104 | # of varying CFLAGS for a single file | |
105 | EXTRA_PROGRAMS += warnonly | |
106 | warnonly_CXXFLAGS = $(BASECXXFLAGS) | |
107 | warnonly_SOURCES = inilex.cc | |
108 | EXTRA_setup_SOURCES = $(warnonly_SOURCES) | |
109 | ||
110 | setup_LDADD = warnonly-inilex.o res.o \ | |
111 | libgetopt++/libgetopt++.la \ | |
112 | /usr/lib/mingw/libbz2.a \ | |
113 | /usr/lib/mingw/libz.a \ | |
114 | -luser32 -lkernel32 \ | |
115 | -lcomctl32 -lole32 -lwsock32 -lnetapi32 -ladvapi32 -luuid | |
116 | setup_LDFLAGS = -mwindows | |
117 | setup_SOURCES = \ | |
118 | AntiVirus.cc \ | |
119 | AntiVirus.h \ | |
120 | archive.cc \ | |
121 | archive.h \ | |
122 | archive_tar.cc \ | |
123 | archive_tar.h \ | |
124 | archive_tar_file.cc \ | |
125 | autoload.c \ | |
126 | category.cc \ | |
127 | category.h \ | |
128 | choose.cc \ | |
129 | choose.h \ | |
130 | compress.cc \ | |
131 | compress.h \ | |
132 | compress_bz.cc \ | |
133 | compress_bz.h \ | |
134 | compress_gz.cc \ | |
135 | compress_gz.h \ | |
136 | ConnectionSetting.cc \ | |
137 | ConnectionSetting.h \ | |
138 | ControlAdjuster.cc \ | |
139 | ControlAdjuster.h \ | |
140 | cygpackage.cc \ | |
141 | cygpackage.h \ | |
142 | desktop.cc \ | |
143 | desktop.h \ | |
144 | dialog.cc \ | |
145 | dialog.h \ | |
146 | diskfull.cc \ | |
147 | diskfull.h \ | |
148 | download.cc \ | |
149 | download.h \ | |
150 | Exception.cc \ | |
151 | Exception.h \ | |
152 | find.cc \ | |
153 | find.h \ | |
154 | FindVisitor.cc \ | |
155 | FindVisitor.h \ | |
156 | filemanip.cc \ | |
157 | filemanip.h \ | |
158 | fromcwd.cc \ | |
159 | Generic.h \ | |
160 | geturl.cc \ | |
161 | geturl.h \ | |
162 | ini.cc \ | |
163 | ini.h \ | |
164 | IniDBBuilder.cc \ | |
165 | IniDBBuilder.h \ | |
166 | IniDBBuilderPackage.cc \ | |
167 | IniDBBuilderPackage.h \ | |
168 | iniparse.cc \ | |
169 | iniparse.h \ | |
170 | IniParseFeedback.cc \ | |
171 | IniParseFeedback.h \ | |
172 | IniParseFindVisitor.cc \ | |
173 | IniParseFindVisitor.h \ | |
174 | install.cc \ | |
175 | io_stream.cc \ | |
176 | io_stream.h \ | |
177 | io_stream_cygfile.cc \ | |
178 | io_stream_cygfile.h \ | |
179 | io_stream_file.cc \ | |
180 | io_stream_file.h \ | |
181 | io_stream_memory.cc \ | |
182 | io_stream_memory.h \ | |
183 | IOStreamProvider.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 | nio-file.cc \ | |
206 | nio-file.h \ | |
207 | nio-ftp.cc \ | |
208 | nio-ftp.h \ | |
209 | nio-http.cc \ | |
210 | nio-http.h \ | |
211 | package_db.cc \ | |
212 | package_db.h \ | |
213 | package_meta.cc \ | |
214 | package_meta.h \ | |
215 | package_source.cc \ | |
216 | package_source.h \ | |
217 | package_version.cc \ | |
218 | package_version.h \ | |
219 | PackageSpecification.cc \ | |
220 | PackageSpecification.h \ | |
221 | PackageTrust.h \ | |
222 | PickCategoryLine.cc \ | |
223 | PickCategoryLine.h \ | |
224 | PickLine.cc \ | |
225 | PickLine.h \ | |
226 | PickPackageLine.cc \ | |
227 | PickPackageLine.h \ | |
228 | PickView.cc \ | |
229 | PickView.h \ | |
230 | postinstall.cc \ | |
231 | proppage.cc \ | |
232 | proppage.h \ | |
233 | propsheet.cc \ | |
234 | propsheet.h \ | |
235 | RECTWrapper.h \ | |
236 | res.rc \ | |
237 | resource.h \ | |
238 | rfc1738.cc \ | |
239 | rfc1738.h \ | |
240 | root.cc \ | |
241 | root.h \ | |
242 | ScanFindVisitor.cc \ | |
243 | ScanFindVisitor.h \ | |
244 | script.cc \ | |
245 | script.h \ | |
246 | setup_version.h \ | |
247 | setup_version.c \ | |
248 | simpsock.cc \ | |
249 | simpsock.h \ | |
250 | site.cc \ | |
251 | site.h \ | |
252 | source.cc \ | |
253 | source.h \ | |
254 | SourceSetting.cc \ | |
255 | SourceSetting.h \ | |
256 | splash.cc \ | |
257 | splash.h \ | |
258 | state.cc \ | |
259 | state.h \ | |
260 | String++.cc \ | |
261 | String++.h \ | |
262 | threebar.cc \ | |
263 | threebar.h \ | |
264 | UserSetting.cc \ | |
265 | UserSetting.h \ | |
266 | UserSettings.cc \ | |
267 | UserSettings.h \ | |
268 | win32.h \ | |
269 | window.cc \ | |
270 | window.h \ | |
271 | csu_util/MD5Sum.cc \ | |
272 | csu_util/MD5Sum.h \ | |
273 | csu_util/version_compare.cc \ | |
274 | csu_util/version_compare.h \ | |
275 | libmd5-rfc/md5.c \ | |
276 | libmd5-rfc/md5.h | |
277 | ||
278 | setup_version.c : $(srcdir)/ChangeLog Makefile | |
279 | V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \ | |
280 | $(srcdir)/ChangeLog` ;\ | |
281 | (echo '#define VERSION_PREFIX "%%% setup-version"';\ | |
282 | echo 'static const char version_store[] = VERSION_PREFIX " '$$V'";';\ | |
283 | echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp;\ | |
284 | mv version.tmp setup_version.c | |
285 | ||
286 | %.o: %.rc | |
287 | $(WINDRES) --preprocessor "$(CC) -E -xc-header -DRC_INVOKED" --include-dir $(srcdir) -o $@ $< | |
288 | ||
289 | iniparse.cc iniparse.h : iniparse.y | |
290 | bison -d -o iniparse.cc $(srcdir)/iniparse.y | |
291 | @mv iniparse.cc.h iniparse.h 2>/dev/null || mv iniparse.hh iniparse.h | |
292 | ||
293 | inilex.cc : inilex.l iniparse.h | |
294 | flex -8 $(srcdir)/inilex.l | |
295 | mv lex.yy.c inilex.cc | |
296 | ||
297 | # Make a distribution package and tarball | |
298 | release: setup$(EXEEXT) dist-all $(srcdir)/ChangeLog Makefile | |
299 | $(STRIP) setup.exe && \ | |
300 | upx --best setup.exe && \ | |
301 | V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \ | |
302 | $(srcdir)/ChangeLog` ;\ | |
303 | mv setup.exe setup-$${V}.exe && \ | |
304 | mv setup-0.tar.bz2 setup-$${V}.tar.bz2 && \ | |
305 | tar cjf setup-$${V}-1-src.tar.bz2 setup-$${V}.tar.bz2 | |
306 | ||
307 | # Create a snapshot and upload it (requires write access) | |
308 | snapshot: release | |
309 | V=`sed -ne 's/^\$$Revi[s]ion: *\([^ ]*\) *$$.*/\1/p' \ | |
310 | $(srcdir)/ChangeLog` ;\ | |
311 | scp -C setup-$${V}.exe setup-$${V}.tar.bz2 $${cygwinsite}:setup-snapshots/ |