]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/g95.t
removed include/wx/mac/setup.h from filelist.txt
[wxWidgets.git] / distrib / msw / tmake / g95.t
1 #!#############################################################################
2 #! File: g95.t
3 #! Purpose: tmake template file from which makefile.g95 is generated by running
4 #! tmake -t g95 wxwin.pro -o makefile.g95
5 #! Author: Vadim Zeitlin, Robert Roebling, Julian Smart
6 #! Created: 14.07.99
7 #! Version: $Id$
8 #!#############################################################################
9 #${
10 #! include the code which parses filelist.txt file and initializes
11 #! %wxCommon, %wxGeneric and %wxMSW hashes.
12 IncludeTemplate("filelist.t");
13
14 #! now transform these hashes into $project tags
15 foreach $file (sort keys %wxGeneric) {
16 #! native wxDirDlg can't be compiled due to GnuWin32/OLE limitations,
17 #! so take the generic version
18 if ( $wxGeneric{$file} =~ /\b(PS|G|U|16)\b/ ) {
19 next #! unless $file =~ /^dirdlgg\./;
20 }
21
22 $file =~ s/cp?p?$/\$(OBJSUFF)/;
23 $project{"WXGENERICOBJS"} .= '$(GENDIR)/' . $file . " "
24 }
25
26 foreach $file (sort keys %wxCommon) {
27 next if $wxCommon{$file} =~ /\b(16)\b/;
28
29 #! needs extra files (sql*.h) so not compiled by default.
30 #! next if $file =~ /^odbc\./;
31
32 if ( $file =~ /^odbc\./ )
33 {
34 $file =~ s/cp?p?$/\$(OBJSUFF)/;
35 $project{"ADVANCEDOBJS"} .= '$(COMMDIR)/' . $file . " "
36 }
37 else
38 {
39 $file =~ s/cp?p?$/\$(OBJSUFF)/;
40 $project{"WXCOMMONOBJS"} .= '$(COMMDIR)/' . $file . " "
41 }
42 }
43
44 foreach $file (sort keys %wxMSW) {
45 #! native wxDirDlg can't be compiled due to GnuWin32/OLE limitations,
46 next if $file =~ /^dirdlg\./;
47
48 next if $wxMSW{$file} =~ /\b(16)\b/;
49
50 #! Mingw32 doesn't have the OLE headers and has some troubles with
51 #! socket code, so put in ADVANCEDOBJS
52 if ( $wxMSW{$file} =~ /\b(O)\b/ )
53 {
54 $file =~ s/cp?p?$/\$(OBJSUFF)/;
55 $project{"ADVANCEDOBJS"} .= '$(MSWDIR)/ole/' . $file . " "
56 }
57 else
58 {
59 $file =~ s/cp?p?$/\$(OBJSUFF)/;
60 $project{"WXMSWOBJS"} .= '$(MSWDIR)/' . $file . " "
61 }
62
63 }
64
65 foreach $file (sort keys %wxHTML) {
66 $file =~ s/cp?p?$/\$(OBJSUFF)/;
67 $project{"WXHTMLOBJS"} .= '$(HTMLDIR)/' . $file . " "
68 }
69
70 #$}
71 # This file was automatically generated by tmake at #$ Now()
72 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
73
74 #
75 # File: makefile.g95
76 # Author: Julian Smart, Robert Roebling, Vadim Zeitlin
77 # Created: 1993
78 # Updated: 1999
79 # Copyright:(c) 1993, AIAI, University of Edinburgh,
80 # Copyright:(c) 1999, Vadim Zeitlin
81 # Copyright:(c) 1999, Robert Roebling
82 #
83 # Makefile for libwx.a
84
85 # Replace this with your own path if necessary
86 WXDIR = ../..
87
88 # All common compiler flags and options are now in
89 # this central makefile.
90 include $(WXDIR)/src/makeg95.env
91
92 # DLL Name, if building wxWindows as a DLL.
93 ifdef WXMAKINGDLL
94 WXDLL = $(WXDIR)/lib/wxmsw$(WXVERSION)$(UNIEXT).dll
95 WXDEF = wxmsw$(WXVERSION)$(UNIEXT).def
96 DLL_EXTRA_LIBS = $(WXDIR)/lib/libzlib.a \
97 $(WXDIR)/lib/libpng.a $(WXDIR)/lib/libjpeg.a \
98 $(WXDIR)/lib/libtiff.a $(WXDIR)/lib/libregex.a
99 DLL_LDFLAGS = -L$(WXDIR)/lib
100 DLL_LDLIBS = -mwindows -lcomctl32 -lctl3d32 -lole32 -loleaut32 \
101 -luuid -lrpcrt4 -lodbc32 -lwinmm -lopengl32 \
102 -lwsock32 $(DLL_EXTRA_LIBS) \
103 -lstdc++
104 endif
105
106 # Subordinate library possibilities
107
108 EXTRAOBJS=
109
110 GENDIR = $(WXDIR)/src/generic
111 COMMDIR = $(WXDIR)/src/common
112 HTMLDIR = $(WXDIR)/src/html
113 ZLIBDIR = $(WXDIR)/src/zlib
114 PNGDIR = $(WXDIR)/src/png
115 JPEGDIR = $(WXDIR)/src/jpeg
116 TIFFDIR = $(WXDIR)/src/tiff
117 OLEDIR = $(WXDIR)/src/msw/ole
118 MSWDIR = $(WXDIR)/src/msw
119 REGEXDIR= $(WXDIR)/src/regex
120
121 ZLIBLIB = $(WXDIR)/lib/libzlib.a
122 PNGLIB = $(WXDIR)/lib/libpng.a
123 JPEGLIB = $(WXDIR)/lib/libjpeg.a
124 TIFFLIB = $(WXDIR)/lib/libtiff.a
125 REGEXLIB= $(WXDIR)/lib/libregex.a
126
127 DOCDIR = $(WXDIR)/docs
128
129 # Only use the WIN32 wxDirDialog if we have a recent
130 # version of Mingw32
131 ifeq ($(MINGW32),1)
132 ifneq "$(findstring 2.95, $(MINGW32VERSION))" ""
133 DIRDLGOBJ = $(MSWDIR)/dirdlg.$(OBJSUFF)
134 else
135 DIRDLGOBJ = $(GENDIR)/dirdlgg.$(OBJSUFF)
136 endif
137 else
138 DIRDLGOBJ = $(GENDIR)/dirdlgg.$(OBJSUFF)
139 endif
140
141 GENERICOBJS = \
142 #$ ExpandList("WXGENERICOBJS");
143
144 COMMONOBJS = \
145 $(COMMDIR)/y_tab.$(OBJSUFF) \
146 #$ ExpandList("WXCOMMONOBJS");
147
148 HTMLOBJS = \
149 #$ ExpandList("WXHTMLOBJS");
150
151 MSWOBJS = \
152 #$ ExpandList("WXMSWOBJS");
153
154 ADVANCEDOBJS = \
155 #$ ExpandList("ADVANCEDOBJS");
156
157 ZLIBOBJS = \
158 $(ZLIBDIR)/adler32.$(OBJSUFF) \
159 $(ZLIBDIR)/compress.$(OBJSUFF) \
160 $(ZLIBDIR)/crc32.$(OBJSUFF) \
161 $(ZLIBDIR)/gzio.$(OBJSUFF) \
162 $(ZLIBDIR)/uncompr.$(OBJSUFF) \
163 $(ZLIBDIR)/deflate.$(OBJSUFF) \
164 $(ZLIBDIR)/trees.$(OBJSUFF) \
165 $(ZLIBDIR)/zutil.$(OBJSUFF) \
166 $(ZLIBDIR)/inflate.$(OBJSUFF) \
167 $(ZLIBDIR)/infblock.$(OBJSUFF) \
168 $(ZLIBDIR)/inftrees.$(OBJSUFF) \
169 $(ZLIBDIR)/infcodes.$(OBJSUFF) \
170 $(ZLIBDIR)/infutil.$(OBJSUFF) \
171 $(ZLIBDIR)/inffast.$(OBJSUFF)
172
173 PNGOBJS = \
174 $(PNGDIR)/png.$(OBJSUFF) \
175 $(PNGDIR)/pngread.$(OBJSUFF) \
176 $(PNGDIR)/pngrtran.$(OBJSUFF) \
177 $(PNGDIR)/pngrutil.$(OBJSUFF) \
178 $(PNGDIR)/pngpread.$(OBJSUFF) \
179 $(PNGDIR)/pngtrans.$(OBJSUFF) \
180 $(PNGDIR)/pngwrite.$(OBJSUFF) \
181 $(PNGDIR)/pngwtran.$(OBJSUFF) \
182 $(PNGDIR)/pngwutil.$(OBJSUFF) \
183 $(PNGDIR)/pngerror.$(OBJSUFF) \
184 $(PNGDIR)/pngmem.$(OBJSUFF) \
185 $(PNGDIR)/pngwio.$(OBJSUFF) \
186 $(PNGDIR)/pngrio.$(OBJSUFF) \
187 $(PNGDIR)/pngget.$(OBJSUFF) \
188 $(PNGDIR)/pngset.$(OBJSUFF)
189
190
191 JPEGOBJS = \
192 $(JPEGDIR)/jcomapi.$(OBJSUFF) \
193 $(JPEGDIR)/jutils.$(OBJSUFF) \
194 $(JPEGDIR)/jerror.$(OBJSUFF) \
195 $(JPEGDIR)/jmemmgr.$(OBJSUFF) \
196 $(JPEGDIR)/jmemnobs.$(OBJSUFF) \
197 $(JPEGDIR)/jcapimin.$(OBJSUFF) \
198 $(JPEGDIR)/jcapistd.$(OBJSUFF) \
199 $(JPEGDIR)/jctrans.$(OBJSUFF) \
200 $(JPEGDIR)/jcparam.$(OBJSUFF) \
201 $(JPEGDIR)/jdatadst.$(OBJSUFF) \
202 $(JPEGDIR)/jcinit.$(OBJSUFF) \
203 $(JPEGDIR)/jcmaster.$(OBJSUFF) \
204 $(JPEGDIR)/jcmarker.$(OBJSUFF) \
205 $(JPEGDIR)/jcmainct.$(OBJSUFF) \
206 $(JPEGDIR)/jcprepct.$(OBJSUFF) \
207 $(JPEGDIR)/jccoefct.$(OBJSUFF) \
208 $(JPEGDIR)/jccolor.$(OBJSUFF) \
209 $(JPEGDIR)/jcsample.$(OBJSUFF) \
210 $(JPEGDIR)/jchuff.$(OBJSUFF) \
211 $(JPEGDIR)/jcphuff.$(OBJSUFF) \
212 $(JPEGDIR)/jcdctmgr.$(OBJSUFF) \
213 $(JPEGDIR)/jfdctfst.$(OBJSUFF) \
214 $(JPEGDIR)/jfdctflt.$(OBJSUFF) \
215 $(JPEGDIR)/jfdctint.$(OBJSUFF) \
216 $(JPEGDIR)/jdapimin.$(OBJSUFF) \
217 $(JPEGDIR)/jdapistd.$(OBJSUFF) \
218 $(JPEGDIR)/jdtrans.$(OBJSUFF) \
219 $(JPEGDIR)/jdatasrc.$(OBJSUFF) \
220 $(JPEGDIR)/jdmaster.$(OBJSUFF) \
221 $(JPEGDIR)/jdinput.$(OBJSUFF) \
222 $(JPEGDIR)/jdmarker.$(OBJSUFF) \
223 $(JPEGDIR)/jdhuff.$(OBJSUFF) \
224 $(JPEGDIR)/jdphuff.$(OBJSUFF) \
225 $(JPEGDIR)/jdmainct.$(OBJSUFF) \
226 $(JPEGDIR)/jdcoefct.$(OBJSUFF) \
227 $(JPEGDIR)/jdpostct.$(OBJSUFF) \
228 $(JPEGDIR)/jddctmgr.$(OBJSUFF) \
229 $(JPEGDIR)/jidctfst.$(OBJSUFF) \
230 $(JPEGDIR)/jidctflt.$(OBJSUFF) \
231 $(JPEGDIR)/jidctint.$(OBJSUFF) \
232 $(JPEGDIR)/jidctred.$(OBJSUFF) \
233 $(JPEGDIR)/jdsample.$(OBJSUFF) \
234 $(JPEGDIR)/jdcolor.$(OBJSUFF) \
235 $(JPEGDIR)/jquant1.$(OBJSUFF) \
236 $(JPEGDIR)/jquant2.$(OBJSUFF) \
237 $(JPEGDIR)/jdmerge.$(OBJSUFF)
238
239 TIFFOBJS = $(TIFFDIR)/tif_aux.o \
240 $(TIFFDIR)/tif_close.o \
241 $(TIFFDIR)/tif_codec.o \
242 $(TIFFDIR)/tif_compress.o \
243 $(TIFFDIR)/tif_dir.o \
244 $(TIFFDIR)/tif_dirinfo.o \
245 $(TIFFDIR)/tif_dirread.o \
246 $(TIFFDIR)/tif_dirwrite.o \
247 $(TIFFDIR)/tif_dumpmode.o \
248 $(TIFFDIR)/tif_error.o \
249 $(TIFFDIR)/tif_fax3.o \
250 $(TIFFDIR)/tif_fax3sm.o \
251 $(TIFFDIR)/tif_flush.o \
252 $(TIFFDIR)/tif_getimage.o \
253 $(TIFFDIR)/tif_jpeg.o \
254 $(TIFFDIR)/tif_luv.o \
255 $(TIFFDIR)/tif_lzw.o \
256 $(TIFFDIR)/tif_next.o \
257 $(TIFFDIR)/tif_open.o \
258 $(TIFFDIR)/tif_packbits.o \
259 $(TIFFDIR)/tif_pixarlog.o \
260 $(TIFFDIR)/tif_predict.o \
261 $(TIFFDIR)/tif_print.o \
262 $(TIFFDIR)/tif_read.o \
263 $(TIFFDIR)/tif_strip.o \
264 $(TIFFDIR)/tif_swab.o \
265 $(TIFFDIR)/tif_thunder.o \
266 $(TIFFDIR)/tif_tile.o \
267 $(TIFFDIR)/tif_version.o \
268 $(TIFFDIR)/tif_warning.o \
269 $(TIFFDIR)/tif_win32.o \
270 $(TIFFDIR)/tif_write.o \
271 $(TIFFDIR)/tif_zip.o
272
273 ifeq ($(MINGW32),1)
274 ifneq "$(findstring 2.95, $(MINGW32VERSION))" ""
275 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ) $(ADVANCEDOBJS)
276 else
277 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ)
278 endif
279 else
280 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ)
281 endif
282
283 # MBN: if anyone has a better solution for this kludge, step
284 # forward, *please*
285 # this tests is we are on cygwin or not ( will _not_ work if you are using
286 # ZSH on plain Win32, tought ); it uses the presence of "/"
287 # in the PATH variable
288
289 # how do you do "VAR=\" ? BLEAGH!
290 BACKSLASH=$(subst a,\,a)
291 ifeq (,$(findstring /,$(PATH)))
292 IS_CYGWIN=0
293 PATH_SEPARATOR:=$(BACKSLASH)
294 PATH_SUBST=/
295 else
296 IS_CYGWIN=1
297 PATH_SEPARATOR=/
298 PATH_SUBST:=$(BACKSLASH)
299 endif
300
301 ARCHINCDIR=$(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/lib/msw$(INCEXT))
302
303 SETUP_H=$(ARCHINCDIR)/wx/setup.h
304
305 ifndef WXMAKINGDLL
306 all: $(SETUP_H) $(OBJECTS) $(WXLIB) $(ZLIBLIB) $(PNGLIB) $(JPEGLIB) $(TIFFLIB) $(REGEXLIB)
307 else
308 all: $(SETUP_H) $(OBJECTS) $(ZLIBLIB) $(PNGLIB) $(JPEGLIB) $(TIFFLIB) $(REGEXLIB) $(WXDLL)
309 endif
310
311 $(ARCHINCDIR)/wx:
312 mkdir $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(ARCHINCDIR))
313 mkdir $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(ARCHINCDIR)/wx)
314
315 $(SETUP_H): $(ARCHINCDIR)/wx
316 $(COPY) $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/include/wx/msw/setup.h) $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$@)
317
318 ifndef WXMAKINGDLL
319
320 $(WXLIB): $(OBJECTS) $(EXTRAOBJS)
321 ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS)
322 $(RANLIB) $@
323
324 else
325
326 # The new linker is a few orders of magnitude faster than the old way
327 # of creating DLLs.
328 ifeq "$(strip $(LD_SUPPORTS_SHARED))" "yes"
329
330 $(WXDLL): $(OBJECTS) $(EXTRAOBJS)
331 $(CC) -shared -o $@ \
332 -Wl,--output-def,$(WXDEF) \
333 -Wl,--out-implib,$(WXLIB) \
334 $(OBJECTS) $(EXTRAOBJS) \
335 $(DLL_LDFLAGS) $(DLL_LDLIBS)
336 else
337
338 ifeq ($(MINGW32),1)
339 DLL_ENTRY = _DllMainCRTStartup@12
340 else
341 DLL_ENTRY = __cygwin_dll_entry@12
342 endif
343 LD_STUFF = $(OBJECTS) $(EXTRAOBJS) -Wl,-e,$(DLL_ENTRY) \
344 $(DLL_LDFLAGS) $(DLL_LDLIBS) #-Wl,--image-base=0x66000000
345
346 DLL_STUFF = --as=$(AS) --dllname $(notdir $(WXDLL)) \
347 --def $(WXDEF) \
348 --base-file wx.base --output-exp wx.exp
349
350 $(WXDEF) $(WXLIB): $(OBJECTS) $(EXTRAOBJS)
351 $(DLLTOOL) --output-def $@ --output-lib $(WXLIB) \
352 --dllname $(notdir $(WXDLL)) \
353 $(OBJECTS) $(EXTRAOBJS) $(DLL_EXTRA_LIBS)
354
355 $(WXDLL): $(OBJECTS) $(EXTRAOBJS) $(WXDEF)
356 $(CC) -mdll -Wl,--base-file,wx.base -s -o $@ $(LD_STUFF)
357 $(DLLTOOL) $(DLL_STUFF)
358 $(CC) -mdll -Wl,--base-file,wx.base wx.exp -s -o $@ $(LD_STUFF)
359 $(DLLTOOL) $(DLL_STUFF)
360 $(CC) -mdll wx.exp -o $@ $(LD_STUFF)
361 -$(RM) wx.base
362 -$(RM) wx.exp
363
364 endif
365
366 endif
367
368
369 $(ZLIBLIB): $(ZLIBOBJS)
370 $(AR) $(AROPTIONS) $@ $(ZLIBOBJS)
371 $(RANLIB) $@
372
373 $(PNGLIB): $(PNGOBJS)
374 $(AR) $(AROPTIONS) $@ $(PNGOBJS)
375 $(RANLIB) $@
376
377 $(JPEGLIB): $(JPEGOBJS)
378 $(AR) $(AROPTIONS) $@ $(JPEGOBJS)
379 $(RANLIB) $@
380
381 $(TIFFLIB): $(TIFFOBJS)
382 $(AR) $(AROPTIONS) $@ $(TIFFOBJS)
383 $(RANLIB) $@
384
385 $(REGEXLIB):
386 $(MAKE) -C $(REGEXDIR) -f makefile.g95 WXDIR=$(WXDIR)
387
388 $(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(ARCHINCDIR)/wx/setup.h
389
390 $(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c
391 $(CCLEX) -c $(CPPFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS -o $@ $(COMMDIR)/y_tab.c
392
393 $(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c
394 $(COPY) ../common/dosyacc.c ../common/y_tab.c
395
396 $(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c
397 $(COPY) ../common/doslex.c ../common/lex_yy.c
398
399 # Replace lex with flex if you run into compilation
400 # problems with lex_yy.c. See also note about LEX_SCANNER
401 # above.
402 # $(COMMDIR)/lex_yy.c: $(COMMDIR)/lexer.l
403 # $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
404 #
405 # Try one of these if the above line doesn't work.
406 # Alternative syntax (1)
407 # $(LEX) -t -L $(COMMDIR)/lexer.l > $(COMMDIR)/lex_yy.c
408 # Alternative syntax (2)
409 # $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
410 #
411 # sed -e "s/BUFSIZ/5000/g" < lex.yy.c | \
412 # sed -e "s/yyoutput(c)/void yyoutput(c)/g" | \
413 # sed -e "s/YYLMAX 200/YYLMAX 5000/g" > lex_yy.c
414 # rm -f lex.yy.c
415 #
416 # Replace yacc with bison if you run into compilation
417 # problems with y_tab.c.
418 #
419 # $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
420 # $(YACC) -o $(COMMDIR)/y_tab.c $(COMMDIR)/parser.y
421 #
422 # If you use e.g. gcc on Unix, uncomment these lines
423 # and comment out the above.
424 #
425 # $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
426 # $(YACC) $(COMMDIR)/parser.y
427 # mv y.tab.c $(COMMDIR)/y_tab.c
428
429 clean:
430 -$(RM) *.o
431 -$(RM) ole/*.o
432 -$(RM) *.bak
433 -$(RM) core
434 -$(RM) ../common/y_tab.c
435 -$(RM) ../common/lex_yy.c
436 -$(RM) ../common/*.o
437 -$(RM) ../common/*.bak
438 -$(RM) ../generic/*.o
439 -$(RM) ../generic/*.bak
440 -$(RM) ../html/*.o
441 -$(RM) ../zlib/*.o
442 -$(RM) ../zlib/*.bak
443 -$(RM) ../png/*.o
444 -$(RM) ../png/*.bak
445 -$(RM) ../jpeg/*.o
446 -$(RM) ../jpeg/*.bak
447 -$(RM) ../tiff/*.o
448 -$(RM) ../tiff/*.bak
449 -$(RM) ../regex/*.o
450 -$(RM) ../regex/*.bak
451
452 cleanall: clean
453 -$(RM) $(WXLIB)
454 -$(RM) $(ZLIBLIB)
455 -$(RM) $(PNGLIB)
456 -$(RM) $(JPEGLIB)
457 -$(RM) $(TIFFLIB)
458 -$(RM) $(REGEXLIB)
459
460 ifdef WXMAKINGDLL
461 -$(RM) $(WXDLL)
462 -$(RM) $(WXDEF)
463 ifneq "$(strip $(LD_SUPPORTS_SHARED))" "yes"
464 -$(RM) wx.base
465 -$(RM) wx.exp
466 endif
467 endif
468