1 #!#############################################################################
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
8 #!#############################################################################
10 #! include the code which parses filelist.txt file and initializes
11 #! %wxCommon, %wxGeneric and %wxMSW hashes.
12 IncludeTemplate("filelist.t");
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 $base = ( $wxGeneric{$file} =~ /\bB\b/ ) ? '_BASE' : '';
20 if ( $wxGeneric{$file} =~ /\b(PS|G|U|16)\b/ ) {
21 next #! unless $file =~ /^dirdlgg\./;
24 $file =~ s/cp?p?$/\$(OBJSUFF)/;
25 $project{"WXGENERICOBJS$base"} .= '$(GENDIR)/' . $file . " "
28 foreach $file (sort keys %wxCommon) {
29 next if $wxCommon{$file} =~ /\b(16|U)\b/;
31 #! needs extra files (sql*.h) so not compiled by default.
32 #! next if $file =~ /^odbc\./;
34 $base = ( $wxCommon{$file} =~ /\bB\b/ ) ? '_BASE' : '';
35 if ( $file =~ /^odbc\./ )
37 $file =~ s/cp?p?$/\$(OBJSUFF)/;
38 $project{"ADVANCEDOBJS$base"} .= '$(COMMDIR)/' . $file . " "
42 $file =~ s/cp?p?$/\$(OBJSUFF)/;
43 $project{"WXCOMMONOBJS$base"} .= '$(COMMDIR)/' . $file . " "
47 foreach $file (sort keys %wxBase) {
48 $file =~ s/cp?p?$/\$(OBJSUFF)/;
49 $project{"WXCOMMONOBJS_BASEONLY"} .= '$(COMMDIR)/' . $file . " "
52 foreach $file (sort keys %wxMSW) {
53 #! native wxDirDlg can't be compiled due to GnuWin32/OLE limitations,
54 next if $file =~ /^dirdlg\./;
56 next if $wxMSW{$file} =~ /\b(16)\b/;
57 $base = ( $wxMSW{$file} =~ /\bB\b/ ) ? '_BASE' : '';
59 #! Mingw32 doesn't have the OLE headers and has some troubles with
60 #! socket code, so put in ADVANCEDOBJS
61 if ( $wxMSW{$file} =~ /\b(O)\b/ )
63 $file =~ s/cp?p?$/\$(OBJSUFF)/;
64 $project{"ADVANCEDOBJS$base"} .= '$(MSWDIR)/ole/' . $file . " "
68 $file =~ s/cp?p?$/\$(OBJSUFF)/;
69 $project{"WXMSWOBJS$base"} .= '$(MSWDIR)/' . $file . " "
74 foreach $file (sort keys %wxHTML) {
75 $file =~ s/cp?p?$/\$(OBJSUFF)/;
76 $project{"WXHTMLOBJS"} .= '$(HTMLDIR)/' . $file . " "
80 # This file was automatically generated by tmake
81 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
85 # Author: Julian Smart, Robert Roebling, Vadim Zeitlin
88 # Copyright:(c) 1993, AIAI, University of Edinburgh,
89 # Copyright:(c) 1999, Vadim Zeitlin
90 # Copyright:(c) 1999, Robert Roebling
92 # Makefile for libwx.a
94 # Replace this with your own path if necessary
97 # All common compiler flags and options are now in
98 # this central makefile.
99 include $(WXDIR)/src/makeg95.env
101 # DLL Name, if building wxWindows as a DLL.
103 WXDLL = $(WXDIR)/lib/wx$(TOOLKIT)$(WXVERSION)$(UNIEXT)$(DEBEXT)$(MIN_SUFFIX).dll
104 WXDEF = wx$(TOOLKIT)$(WXVERSION)$(UNIEXT)$(DEBEXT).def
105 DLL_EXTRA_LIBS = $(WXDIR)/lib/libzlib$(MIN_SUFFIX).a \
106 $(WXDIR)/lib/libpng$(MIN_SUFFIX).a \
107 $(WXDIR)/lib/libjpeg$(MIN_SUFFIX).a \
108 $(WXDIR)/lib/libtiff$(MIN_SUFFIX).a \
109 $(WXDIR)/lib/libregex$(MIN_SUFFIX).a
110 DLL_LDFLAGS = -L$(WXDIR)/lib
111 DLL_BASE_LDLIBS = $(DLL_EXTRA_LIBS) -lstdc++ -lwsock32
112 ifeq ($(wxUSE_GUI),0)
113 DLL_LDLIBS = $(DLL_BASE_LDLIBS)
115 DLL_LDLIBS = -lcomctl32 -lctl3d32 -lole32 -loleaut32 \
116 -luuid -lrpcrt4 -lodbc32 -lwinmm -lopengl32 \
121 # Subordinate library possibilities
125 GENDIR = $(WXDIR)/src/generic
126 COMMDIR = $(WXDIR)/src/common
127 HTMLDIR = $(WXDIR)/src/html
128 ZLIBDIR = $(WXDIR)/src/zlib
129 PNGDIR = $(WXDIR)/src/png
130 JPEGDIR = $(WXDIR)/src/jpeg
131 TIFFDIR = $(WXDIR)/src/tiff
132 OLEDIR = $(WXDIR)/src/msw/ole
133 MSWDIR = $(WXDIR)/src/msw
134 REGEXDIR= $(WXDIR)/src/regex
136 ZLIBLIB = $(WXDIR)/lib/libzlib$(MIN_SUFFIX).a
137 PNGLIB = $(WXDIR)/lib/libpng$(MIN_SUFFIX).a
138 JPEGLIB = $(WXDIR)/lib/libjpeg$(MIN_SUFFIX).a
139 TIFFLIB = $(WXDIR)/lib/libtiff$(MIN_SUFFIX).a
140 REGEXLIB= $(WXDIR)/lib/libregex$(MIN_SUFFIX).a
142 DOCDIR = $(WXDIR)/docs
144 # Only use the WIN32 wxDirDialog if we have a recent
146 ifeq "$(strip $(RECENT_MINGW))" "yes"
147 DIRDLGOBJ = $(MSWDIR)/dirdlg.$(OBJSUFF)
149 DIRDLGOBJ = $(GENDIR)/dirdlgg.$(OBJSUFF)
152 ifeq ($(wxUSE_GUI),0)
157 #$ ExpandList("WXGENERICOBJS_BASE");
160 $(GENERICOBJS_BASE) \
161 #$ ExpandList("WXGENERICOBJS");
164 #$ ExpandList("WXCOMMONOBJS_BASE");
166 COMMONOBJS_BASEONLY = \
167 #$ ExpandList("WXCOMMONOBJS_BASEONLY");
171 $(COMMDIR)/y_tab.$(OBJSUFF) \
172 #$ ExpandList("WXCOMMONOBJS");
175 #$ ExpandList("WXHTMLOBJS");
178 #$ ExpandList("WXMSWOBJS_BASE");
182 #$ ExpandList("WXMSWOBJS");
184 ADVANCEDOBJS_BASE = \
185 #$ ExpandList("ADVANCEDOBJS_BASE");
188 $(ADVANCEDOBJS_BASE) \
189 #$ ExpandList("ADVANCEDOBJS");
192 $(ZLIBDIR)/adler32.$(OBJSUFF) \
193 $(ZLIBDIR)/compress.$(OBJSUFF) \
194 $(ZLIBDIR)/crc32.$(OBJSUFF) \
195 $(ZLIBDIR)/gzio.$(OBJSUFF) \
196 $(ZLIBDIR)/uncompr.$(OBJSUFF) \
197 $(ZLIBDIR)/deflate.$(OBJSUFF) \
198 $(ZLIBDIR)/trees.$(OBJSUFF) \
199 $(ZLIBDIR)/zutil.$(OBJSUFF) \
200 $(ZLIBDIR)/inflate.$(OBJSUFF) \
201 $(ZLIBDIR)/infblock.$(OBJSUFF) \
202 $(ZLIBDIR)/inftrees.$(OBJSUFF) \
203 $(ZLIBDIR)/infcodes.$(OBJSUFF) \
204 $(ZLIBDIR)/infutil.$(OBJSUFF) \
205 $(ZLIBDIR)/inffast.$(OBJSUFF)
208 $(PNGDIR)/png.$(OBJSUFF) \
209 $(PNGDIR)/pngread.$(OBJSUFF) \
210 $(PNGDIR)/pngrtran.$(OBJSUFF) \
211 $(PNGDIR)/pngrutil.$(OBJSUFF) \
212 $(PNGDIR)/pngpread.$(OBJSUFF) \
213 $(PNGDIR)/pngtrans.$(OBJSUFF) \
214 $(PNGDIR)/pngwrite.$(OBJSUFF) \
215 $(PNGDIR)/pngwtran.$(OBJSUFF) \
216 $(PNGDIR)/pngwutil.$(OBJSUFF) \
217 $(PNGDIR)/pngerror.$(OBJSUFF) \
218 $(PNGDIR)/pngmem.$(OBJSUFF) \
219 $(PNGDIR)/pngwio.$(OBJSUFF) \
220 $(PNGDIR)/pngrio.$(OBJSUFF) \
221 $(PNGDIR)/pngget.$(OBJSUFF) \
222 $(PNGDIR)/pngset.$(OBJSUFF)
226 $(JPEGDIR)/jcomapi.$(OBJSUFF) \
227 $(JPEGDIR)/jutils.$(OBJSUFF) \
228 $(JPEGDIR)/jerror.$(OBJSUFF) \
229 $(JPEGDIR)/jmemmgr.$(OBJSUFF) \
230 $(JPEGDIR)/jmemnobs.$(OBJSUFF) \
231 $(JPEGDIR)/jcapimin.$(OBJSUFF) \
232 $(JPEGDIR)/jcapistd.$(OBJSUFF) \
233 $(JPEGDIR)/jctrans.$(OBJSUFF) \
234 $(JPEGDIR)/jcparam.$(OBJSUFF) \
235 $(JPEGDIR)/jdatadst.$(OBJSUFF) \
236 $(JPEGDIR)/jcinit.$(OBJSUFF) \
237 $(JPEGDIR)/jcmaster.$(OBJSUFF) \
238 $(JPEGDIR)/jcmarker.$(OBJSUFF) \
239 $(JPEGDIR)/jcmainct.$(OBJSUFF) \
240 $(JPEGDIR)/jcprepct.$(OBJSUFF) \
241 $(JPEGDIR)/jccoefct.$(OBJSUFF) \
242 $(JPEGDIR)/jccolor.$(OBJSUFF) \
243 $(JPEGDIR)/jcsample.$(OBJSUFF) \
244 $(JPEGDIR)/jchuff.$(OBJSUFF) \
245 $(JPEGDIR)/jcphuff.$(OBJSUFF) \
246 $(JPEGDIR)/jcdctmgr.$(OBJSUFF) \
247 $(JPEGDIR)/jfdctfst.$(OBJSUFF) \
248 $(JPEGDIR)/jfdctflt.$(OBJSUFF) \
249 $(JPEGDIR)/jfdctint.$(OBJSUFF) \
250 $(JPEGDIR)/jdapimin.$(OBJSUFF) \
251 $(JPEGDIR)/jdapistd.$(OBJSUFF) \
252 $(JPEGDIR)/jdtrans.$(OBJSUFF) \
253 $(JPEGDIR)/jdatasrc.$(OBJSUFF) \
254 $(JPEGDIR)/jdmaster.$(OBJSUFF) \
255 $(JPEGDIR)/jdinput.$(OBJSUFF) \
256 $(JPEGDIR)/jdmarker.$(OBJSUFF) \
257 $(JPEGDIR)/jdhuff.$(OBJSUFF) \
258 $(JPEGDIR)/jdphuff.$(OBJSUFF) \
259 $(JPEGDIR)/jdmainct.$(OBJSUFF) \
260 $(JPEGDIR)/jdcoefct.$(OBJSUFF) \
261 $(JPEGDIR)/jdpostct.$(OBJSUFF) \
262 $(JPEGDIR)/jddctmgr.$(OBJSUFF) \
263 $(JPEGDIR)/jidctfst.$(OBJSUFF) \
264 $(JPEGDIR)/jidctflt.$(OBJSUFF) \
265 $(JPEGDIR)/jidctint.$(OBJSUFF) \
266 $(JPEGDIR)/jidctred.$(OBJSUFF) \
267 $(JPEGDIR)/jdsample.$(OBJSUFF) \
268 $(JPEGDIR)/jdcolor.$(OBJSUFF) \
269 $(JPEGDIR)/jquant1.$(OBJSUFF) \
270 $(JPEGDIR)/jquant2.$(OBJSUFF) \
271 $(JPEGDIR)/jdmerge.$(OBJSUFF)
273 TIFFOBJS = $(TIFFDIR)/tif_aux.o \
274 $(TIFFDIR)/tif_close.o \
275 $(TIFFDIR)/tif_codec.o \
276 $(TIFFDIR)/tif_compress.o \
277 $(TIFFDIR)/tif_dir.o \
278 $(TIFFDIR)/tif_dirinfo.o \
279 $(TIFFDIR)/tif_dirread.o \
280 $(TIFFDIR)/tif_dirwrite.o \
281 $(TIFFDIR)/tif_dumpmode.o \
282 $(TIFFDIR)/tif_error.o \
283 $(TIFFDIR)/tif_fax3.o \
284 $(TIFFDIR)/tif_fax3sm.o \
285 $(TIFFDIR)/tif_flush.o \
286 $(TIFFDIR)/tif_getimage.o \
287 $(TIFFDIR)/tif_jpeg.o \
288 $(TIFFDIR)/tif_luv.o \
289 $(TIFFDIR)/tif_lzw.o \
290 $(TIFFDIR)/tif_next.o \
291 $(TIFFDIR)/tif_open.o \
292 $(TIFFDIR)/tif_packbits.o \
293 $(TIFFDIR)/tif_pixarlog.o \
294 $(TIFFDIR)/tif_predict.o \
295 $(TIFFDIR)/tif_print.o \
296 $(TIFFDIR)/tif_read.o \
297 $(TIFFDIR)/tif_strip.o \
298 $(TIFFDIR)/tif_swab.o \
299 $(TIFFDIR)/tif_thunder.o \
300 $(TIFFDIR)/tif_tile.o \
301 $(TIFFDIR)/tif_version.o \
302 $(TIFFDIR)/tif_warning.o \
303 $(TIFFDIR)/tif_win32.o \
304 $(TIFFDIR)/tif_write.o \
307 ifeq "$(strip $(RECENT_MINGW))" "yes"
308 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ) $(ADVANCEDOBJS)
310 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ)
312 ifeq ($(wxUSE_GUI),0)
313 OBJECTS = $(MSWOBJS_BASE) $(COMMONOBJS_BASE) $(COMMONOBJS_BASEONLY) $(GENERICOBJS_BASE)
316 # how do you do "VAR=\" ? BLEAGH!
317 BACKSLASH=$(subst a,\,a)
318 ifeq (,$(findstring $(OSTYPE),"cygwin!msys"))
319 PATH_SEPARATOR:=$(BACKSLASH)
323 PATH_SUBST:=$(BACKSLASH)
326 #ARCHINCDIR=$(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/lib/msw$(INCEXT))
327 ARCHINCDIR=$(WXDIR)/lib/$(TOOLKIT)$(INCEXT)
329 SETUP_H=$(ARCHINCDIR)/wx/setup.h
332 all: $(SETUP_H) $(OBJECTS) $(WXLIB) $(ZLIBLIB) $(PNGLIB) $(JPEGLIB) $(TIFFLIB) $(REGEXLIB)
334 all: $(SETUP_H) $(OBJECTS) $(ZLIBLIB) $(PNGLIB) $(JPEGLIB) $(TIFFLIB) $(REGEXLIB) $(WXDLL)
338 mkdir $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(ARCHINCDIR))
339 mkdir $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(ARCHINCDIR)/wx)
341 # Copy ALWAYS uses forward slashes now.
343 $(SETUP_H): $(ARCHINCDIR)/wx $(WXDIR)/include/wx/msw/setup.h
344 $(COPY) $(WXDIR)/include/wx/msw/setup.h $(subst $(BACKSLASH),/,$@)
346 # $(COPY) $(WXDIR)/include/wx/msw/setup.h $@
347 # $(COPY) $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/include/wx/msw/setup.h) $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$@)
351 $(WXLIB): $(OBJECTS) $(EXTRAOBJS)
352 ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS)
357 # The new linker is a few orders of magnitude faster than the old way
359 ifeq "$(strip $(LD_SUPPORTS_SHARED))" "yes"
361 $(WXDLL): $(OBJECTS) $(EXTRAOBJS)
362 $(CXX) -shared -o $@ \
363 -Wl,--output-def,$(WXDEF) \
364 -Wl,--out-implib,$(WXLIB) \
365 $(OBJECTS) $(EXTRAOBJS) \
366 $(DLL_LDFLAGS) $(DLL_LDLIBS) \
371 DLL_ENTRY = _DllMainCRTStartup@12
373 DLL_ENTRY = __cygwin_dll_entry@12
375 LD_STUFF = $(OBJECTS) $(EXTRAOBJS) -Wl,-e,$(DLL_ENTRY) \
376 $(DLL_LDFLAGS) $(DLL_LDLIBS) #-Wl,--image-base=0x66000000
378 DLL_STUFF = --as=$(AS) --dllname $(notdir $(WXDLL)) \
380 --base-file wx.base --output-exp wx.exp
382 $(WXDEF) $(WXLIB): $(OBJECTS) $(EXTRAOBJS)
383 $(DLLTOOL) --output-def $@ --output-lib $(WXLIB) \
384 --dllname $(notdir $(WXDLL)) \
385 $(OBJECTS) $(EXTRAOBJS) $(DLL_EXTRA_LIBS)
387 $(WXDLL): $(OBJECTS) $(EXTRAOBJS) $(WXDEF)
388 $(CC) -mdll -Wl,--base-file,wx.base -s -o $@ $(LD_STUFF) $(ALL_LDFLAGS_DLL)
389 $(DLLTOOL) $(DLL_STUFF)
390 $(CC) -mdll -Wl,--base-file,wx.base wx.exp -s -o $@ $(LD_STUFF) $(ALL_LDFLAGS_DLL)
391 $(DLLTOOL) $(DLL_STUFF)
392 $(CC) -mdll wx.exp -o $@ $(LD_STUFF) $(ALL_LDFLAGS_DLL)
401 $(ZLIBLIB): $(ZLIBOBJS)
402 $(AR) $(AROPTIONS) $@ $(ZLIBOBJS)
405 $(PNGLIB): $(PNGOBJS)
406 $(AR) $(AROPTIONS) $@ $(PNGOBJS)
409 $(JPEGLIB): $(JPEGOBJS)
410 $(AR) $(AROPTIONS) $@ $(JPEGOBJS)
413 $(TIFFLIB): $(TIFFOBJS)
414 $(AR) $(AROPTIONS) $@ $(TIFFOBJS)
418 $(MAKE) -C $(REGEXDIR) -f makefile.g95 MINGW32=$(MINGW32) WXDIR=$(WXDIR) WXWIN=$(WXDIR)
420 $(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(ARCHINCDIR)/wx/setup.h
422 $(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c
423 $(CCLEX) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS -o $@ $(COMMDIR)/y_tab.c
425 $(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c
426 $(COPY) ../common/dosyacc.c ../common/y_tab.c
428 $(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c
429 $(COPY) ../common/doslex.c ../common/lex_yy.c
431 # Replace lex with flex if you run into compilation
432 # problems with lex_yy.c. See also note about LEX_SCANNER
434 # $(COMMDIR)/lex_yy.c: $(COMMDIR)/lexer.l
435 # $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
437 # Try one of these if the above line doesn't work.
438 # Alternative syntax (1)
439 # $(LEX) -t -L $(COMMDIR)/lexer.l > $(COMMDIR)/lex_yy.c
440 # Alternative syntax (2)
441 # $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
443 # sed -e "s/BUFSIZ/5000/g" < lex.yy.c | \
444 # sed -e "s/yyoutput(c)/void yyoutput(c)/g" | \
445 # sed -e "s/YYLMAX 200/YYLMAX 5000/g" > lex_yy.c
448 # Replace yacc with bison if you run into compilation
449 # problems with y_tab.c.
451 # $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
452 # $(YACC) -o $(COMMDIR)/y_tab.c $(COMMDIR)/parser.y
454 # If you use e.g. gcc on Unix, uncomment these lines
455 # and comment out the above.
457 # $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
458 # $(YACC) $(COMMDIR)/parser.y
459 # mv y.tab.c $(COMMDIR)/y_tab.c
466 -$(RM) ../common/y_tab.c
467 -$(RM) ../common/lex_yy.c
469 -$(RM) ../common/*.bak
470 -$(RM) ../generic/*.o
471 -$(RM) ../generic/*.bak
482 -$(RM) ../regex/*.bak
495 ifneq "$(strip $(LD_SUPPORTS_SHARED))" "yes"