]>
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 = bz2lib zlib libgetopt++ tests | |
23 | SUBDIRS = bz2lib zlib libgetopt++ @RSYNC@ 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 | AM_CXXFLAGS = -Werror -Wall -Wpointer-arith -Wcomments \ | |
30 | -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes | |
31 | AM_CFLAGS = $(AM_CXXFLAGS) -Wmissing-declarations -Winline | |
32 | ||
33 | WINDRES := @WINDRES@ | |
34 | ||
35 | INCLUDES = -I$(srcdir)/bz2lib -I$(srcdir)/libgetopt++/include | |
36 | ||
37 | noinst_PROGRAMS = \ | |
38 | setup \ | |
39 | @INILINT@ | |
40 | ||
41 | EXTRA_PROGRAMS = inilint | |
42 | ## noinst_PROGRAMS +=inilint | |
43 | ||
44 | # to avoid false errors that assembly generates | |
45 | WARNONLY_CFLAGS = -Winline -Wall -Wpointer-arith -Wcast-align \ | |
46 | -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \ | |
47 | -Wmissing-declarations -Wcomments $(INCLUDES) | |
48 | ||
49 | EXTRA_DIST = \ | |
50 | GUIDELINES \ | |
51 | check-na.bmp \ | |
52 | check-no.bmp \ | |
53 | check-yes.bmp \ | |
54 | choose-rtarrow.bmp \ | |
55 | choose-spin.bmp \ | |
56 | cygwin.ico \ | |
57 | inilex.l \ | |
58 | iniparse.y | |
59 | ||
60 | BUILT_SOURCES = setup_version.c \ | |
61 | inilex.cc \ | |
62 | iniparse.cc | |
63 | ||
64 | if MINGWTARGET | |
65 | inilint_extras = \ | |
66 | autoload.c \ | |
67 | mklink2.cc | |
68 | else | |
69 | inilint_extras = | |
70 | endif | |
71 | ||
72 | if ENABLERSYNC | |
73 | rsync_source = \ | |
74 | io_stream_rsync.cc \ | |
75 | io_stream_rsync.h | |
76 | else | |
77 | rsync_source = | |
78 | endif | |
79 | ||
80 | inilint_LDADD = libgetopt++/libgetopt++.la -luser32 -lkernel32 | |
81 | inilint_SOURCES = \ | |
82 | filemanip.cc \ | |
83 | filemanip.h \ | |
84 | find.cc \ | |
85 | find.h \ | |
86 | FindVisitor.cc \ | |
87 | FindVisitor.h \ | |
88 | LogSingleton.cc \ | |
89 | LogSingleton.h \ | |
90 | IniDBBuilder.cc \ | |
91 | IniDBBuilder.h \ | |
92 | inilex.cc \ | |
93 | inilintmain.cc \ | |
94 | iniparse.cc \ | |
95 | iniparse.h \ | |
96 | IniParseFeedback.cc \ | |
97 | IniParseFeedback.h \ | |
98 | io_stream.h \ | |
99 | io_stream.cc \ | |
100 | io_stream_file.h \ | |
101 | io_stream_file.cc \ | |
102 | IOStreamProvider.h \ | |
103 | mkdir.cc \ | |
104 | mkdir.h \ | |
105 | PackageSpecification.cc \ | |
106 | PackageSpecification.h \ | |
107 | PackageTrust.h \ | |
108 | rfc1738.cc \ | |
109 | rfc1738.h \ | |
110 | String++.cc \ | |
111 | String++.h \ | |
112 | $(inilint_extras) | |
113 | ||
114 | setup_LDADD = res.o zlib/libzcygw.a bz2lib/libbz2.a \ | |
115 | libgetopt++/libgetopt++.la \ | |
116 | @RSYNCLIB@ \ | |
117 | -luser32 -lkernel32 \ | |
118 | -lcomctl32 -lole32 -lwsock32 -lnetapi32 -ladvapi32 -luuid | |
119 | setup_LDFLAGS = -mwindows | |
120 | setup_SOURCES = \ | |
121 | AntiVirus.cc \ | |
122 | AntiVirus.h \ | |
123 | archive.cc \ | |
124 | archive.h \ | |
125 | archive_tar.cc \ | |
126 | archive_tar.h \ | |
127 | archive_tar_file.cc \ | |
128 | autoload.c \ | |
129 | category.cc \ | |
130 | category.h \ | |
131 | choose.cc \ | |
132 | choose.h \ | |
133 | cistring.cc \ | |
134 | cistring.h \ | |
135 | compress.cc \ | |
136 | compress.h \ | |
137 | compress_bz.cc \ | |
138 | compress_bz.h \ | |
139 | compress_gz.cc \ | |
140 | compress_gz.h \ | |
141 | cygpackage.cc \ | |
142 | cygpackage.h \ | |
143 | desktop.cc \ | |
144 | desktop.h \ | |
145 | dialog.cc \ | |
146 | dialog.h \ | |
147 | diskfull.cc \ | |
148 | diskfull.h \ | |
149 | download.cc \ | |
150 | download.h \ | |
151 | Exception.cc \ | |
152 | Exception.h \ | |
153 | find.cc \ | |
154 | find.h \ | |
155 | FindVisitor.cc \ | |
156 | FindVisitor.h \ | |
157 | FilterVisitor.cc \ | |
158 | FilterVisitor.h \ | |
159 | filemanip.cc \ | |
160 | filemanip.h \ | |
161 | fromcwd.cc \ | |
162 | geturl.cc \ | |
163 | geturl.h \ | |
164 | hash.cc \ | |
165 | hash.h \ | |
166 | ini.cc \ | |
167 | ini.h \ | |
168 | IniDBBuilder.cc \ | |
169 | IniDBBuilder.h \ | |
170 | IniDBBuilderPackage.cc \ | |
171 | IniDBBuilderPackage.h \ | |
172 | inilex.cc \ | |
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 | log.cc \ | |
192 | log.h \ | |
193 | LogFile.cc \ | |
194 | LogFile.h \ | |
195 | LogSingleton.cc \ | |
196 | LogSingleton.h \ | |
197 | main.cc \ | |
198 | md5.c \ | |
199 | md5.h \ | |
200 | MD5++.cc \ | |
201 | MD5++.h \ | |
202 | mkdir.cc \ | |
203 | mkdir.h \ | |
204 | mklink2.cc \ | |
205 | mklink2.h \ | |
206 | mount.cc \ | |
207 | mount.h \ | |
208 | msg.cc \ | |
209 | msg.h \ | |
210 | net.cc \ | |
211 | net.h \ | |
212 | netio.cc \ | |
213 | netio.h \ | |
214 | nio-ie5.cc \ | |
215 | nio-ie5.h \ | |
216 | nio-file.cc \ | |
217 | nio-file.h \ | |
218 | nio-ftp.cc \ | |
219 | nio-ftp.h \ | |
220 | nio-http.cc \ | |
221 | nio-http.h \ | |
222 | package_db.cc \ | |
223 | package_db.h \ | |
224 | package_meta.cc \ | |
225 | package_meta.h \ | |
226 | package_source.cc \ | |
227 | package_source.h \ | |
228 | package_version.cc \ | |
229 | package_version.h \ | |
230 | PackageSpecification.cc \ | |
231 | PackageSpecification.h \ | |
232 | PackageTrust.h \ | |
233 | PickCategoryLine.cc \ | |
234 | PickCategoryLine.h \ | |
235 | PickLine.cc \ | |
236 | PickLine.h \ | |
237 | PickPackageLine.cc \ | |
238 | PickPackageLine.h \ | |
239 | PickView.cc \ | |
240 | PickView.h \ | |
241 | port.h \ | |
242 | postinstall.cc \ | |
243 | proppage.cc \ | |
244 | proppage.h \ | |
245 | propsheet.cc \ | |
246 | propsheet.h \ | |
247 | res.rc \ | |
248 | resource.h \ | |
249 | rfc1738.cc \ | |
250 | rfc1738.h \ | |
251 | root.cc \ | |
252 | root.h \ | |
253 | ScanFindVisitor.cc \ | |
254 | ScanFindVisitor.h \ | |
255 | script.cc \ | |
256 | script.h \ | |
257 | setup_version.c \ | |
258 | simpsock.cc \ | |
259 | simpsock.h \ | |
260 | site.cc \ | |
261 | site.h \ | |
262 | source.cc \ | |
263 | source.h \ | |
264 | splash.cc \ | |
265 | splash.h \ | |
266 | state.cc \ | |
267 | state.h \ | |
268 | String++.cc \ | |
269 | String++.h \ | |
270 | threebar.cc \ | |
271 | threebar.h \ | |
272 | UserSetting.cc \ | |
273 | UserSetting.h \ | |
274 | UserSettings.cc \ | |
275 | UserSettings.h \ | |
276 | version.cc \ | |
277 | version.h \ | |
278 | win32.cc \ | |
279 | win32.h \ | |
280 | window.cc \ | |
281 | window.h \ | |
282 | $(rsync_source) | |
283 | ||
284 | setup_version.c : $(srcdir)/ChangeLog Makefile | |
285 | V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \ | |
286 | | sed -e 's/\$$Revision:* *//' \ | |
287 | -e 's/ *$$.*//'` ;\ | |
288 | (echo '#define VERSION_PREFIX "%%% setup-version"';\ | |
289 | echo 'static const char version_store[] = VERSION_PREFIX " '$$V'";';\ | |
290 | echo 'const char *version = version_store + sizeof (VERSION_PREFIX);') > version.tmp;\ | |
291 | mv version.tmp setup_version.c | |
292 | ||
293 | %.o: %.rc | |
294 | $(WINDRES) --preprocessor "$(CC) -E -xc-header -DRC_INVOKED" --include-dir $(srcdir) -o $@ $< | |
295 | ||
296 | autoload.o: autoload.c | |
297 | @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | |
298 | @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ | |
299 | @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
300 | $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(WARNONLY_CFLAGS) $(CFLAGS) -c -o $@ $< -fno-inline-functions | |
301 | ||
302 | inilex.o: inilex.cc | |
303 | @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | |
304 | @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ | |
305 | @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
306 | $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | |
307 | $(AM_CPPFLAGS) $(CPPFLAGS) $(WARNONLY_CFLAGS) $(CXXFLAGS) -c -o $@ $< | |
308 | ||
309 | iniparse.cc iniparse.h : iniparse.y | |
310 | bison -d -o iniparse.cc $(srcdir)/iniparse.y | |
311 | @mv iniparse.cc.h iniparse.h 2>/dev/null || mv iniparse.hh iniparse.h | |
312 | ||
313 | inilex.cc : inilex.l iniparse.h | |
314 | flex -8 $(srcdir)/inilex.l | |
315 | mv lex.yy.c inilex.cc | |
316 | ||
317 | # Make a distribution package and tarball | |
318 | release: setup$(EXEEXT) dist-all $(srcdir)/ChangeLog Makefile | |
319 | $(STRIP) setup.exe && \ | |
320 | upx --best setup.exe && \ | |
321 | V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \ | |
322 | | sed -e 's/\$$Revision:* *//' \ | |
323 | -e 's/ *$$.*//'` ;\ | |
324 | mv setup.exe setup-$${V}.exe && \ | |
325 | mv setup-0.tar.bz2 setup-$${V}.tar.bz2 && \ | |
326 | tar cjf setup-$${V}-1-src.tar.bz2 setup-$${V}.tar.bz2 | |
327 | ||
328 | # Create a snapshot and upload it (requires write access) | |
329 | snapshot: release | |
330 | V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \ | |
331 | | sed -e 's/\$$Revision:* *//' \ | |
332 | -e 's/ *$$.*//'` ;\ | |
333 | scp -C setup-$${V}.exe setup-$${V}.tar.bz2 $${cygwinsite}:setup-snapshots/ |