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).dll
104 WXDEF = wx$(TOOLKIT)$(WXVERSION)$(UNIEXT)$(DEBEXT).def
105 DLL_EXTRA_LIBS = $(WXDIR)/lib/libzlib.a \
106 $(WXDIR)/lib/libpng.a $(WXDIR)/lib/libjpeg.a \
107 $(WXDIR)/lib/libtiff.a $(WXDIR)/lib/libregex.a
108 DLL_LDFLAGS = -L$(WXDIR)/lib
109 DLL_BASE_LDLIBS = $(DLL_EXTRA_LIBS) -lstdc++ -lwsock32
110 ifeq ($(wxUSE_GUI),0)
111 DLL_LDLIBS = $(DLL_BASE_LDLIBS)
113 DLL_LDLIBS = -mwindows -lcomctl32 -lctl3d32 -lole32 -loleaut32 \
114 -luuid -lrpcrt4 -lodbc32 -lwinmm -lopengl32 \
119 # Subordinate library possibilities
123 GENDIR = $(WXDIR)/src/generic
124 COMMDIR = $(WXDIR)/src/common
125 HTMLDIR = $(WXDIR)/src/html
126 ZLIBDIR = $(WXDIR)/src/zlib
127 PNGDIR = $(WXDIR)/src/png
128 JPEGDIR = $(WXDIR)/src/jpeg
129 TIFFDIR = $(WXDIR)/src/tiff
130 OLEDIR = $(WXDIR)/src/msw/ole
131 MSWDIR = $(WXDIR)/src/msw
132 REGEXDIR= $(WXDIR)/src/regex
134 ZLIBLIB = $(WXDIR)/lib/libzlib.a
135 PNGLIB = $(WXDIR)/lib/libpng.a
136 JPEGLIB = $(WXDIR)/lib/libjpeg.a
137 TIFFLIB = $(WXDIR)/lib/libtiff.a
138 REGEXLIB= $(WXDIR)/lib/libregex.a
140 DOCDIR = $(WXDIR)/docs
142 # Only use the WIN32 wxDirDialog if we have a recent
145 ifneq "$(_GCC295)$(_GCC3)" ""
146 DIRDLGOBJ = $(MSWDIR)/dirdlg.$(OBJSUFF)
148 DIRDLGOBJ = $(GENDIR)/dirdlgg.$(OBJSUFF)
151 DIRDLGOBJ = $(GENDIR)/dirdlgg.$(OBJSUFF)
153 ifeq ($(wxUSE_GUI),0)
158 #$ ExpandList("WXGENERICOBJS_BASE");
161 $(GENERICOBJS_BASE) \
162 #$ ExpandList("WXGENERICOBJS");
165 #$ ExpandList("WXCOMMONOBJS_BASE");
167 COMMONOBJS_BASEONLY = \
168 #$ ExpandList("WXCOMMONOBJS_BASEONLY");
172 $(COMMDIR)/y_tab.$(OBJSUFF) \
173 #$ ExpandList("WXCOMMONOBJS");
176 #$ ExpandList("WXHTMLOBJS");
179 #$ ExpandList("WXMSWOBJS_BASE");
183 #$ ExpandList("WXMSWOBJS");
185 ADVANCEDOBJS_BASE = \
186 #$ ExpandList("ADVANCEDOBJS_BASE");
189 $(ADVANCEDOBJS_BASE) \
190 #$ ExpandList("ADVANCEDOBJS");
193 $(ZLIBDIR)/adler32.$(OBJSUFF) \
194 $(ZLIBDIR)/compress.$(OBJSUFF) \
195 $(ZLIBDIR)/crc32.$(OBJSUFF) \
196 $(ZLIBDIR)/gzio.$(OBJSUFF) \
197 $(ZLIBDIR)/uncompr.$(OBJSUFF) \
198 $(ZLIBDIR)/deflate.$(OBJSUFF) \
199 $(ZLIBDIR)/trees.$(OBJSUFF) \
200 $(ZLIBDIR)/zutil.$(OBJSUFF) \
201 $(ZLIBDIR)/inflate.$(OBJSUFF) \
202 $(ZLIBDIR)/infblock.$(OBJSUFF) \
203 $(ZLIBDIR)/inftrees.$(OBJSUFF) \
204 $(ZLIBDIR)/infcodes.$(OBJSUFF) \
205 $(ZLIBDIR)/infutil.$(OBJSUFF) \
206 $(ZLIBDIR)/inffast.$(OBJSUFF)
209 $(PNGDIR)/png.$(OBJSUFF) \
210 $(PNGDIR)/pngread.$(OBJSUFF) \
211 $(PNGDIR)/pngrtran.$(OBJSUFF) \
212 $(PNGDIR)/pngrutil.$(OBJSUFF) \
213 $(PNGDIR)/pngpread.$(OBJSUFF) \
214 $(PNGDIR)/pngtrans.$(OBJSUFF) \
215 $(PNGDIR)/pngwrite.$(OBJSUFF) \
216 $(PNGDIR)/pngwtran.$(OBJSUFF) \
217 $(PNGDIR)/pngwutil.$(OBJSUFF) \
218 $(PNGDIR)/pngerror.$(OBJSUFF) \
219 $(PNGDIR)/pngmem.$(OBJSUFF) \
220 $(PNGDIR)/pngwio.$(OBJSUFF) \
221 $(PNGDIR)/pngrio.$(OBJSUFF) \
222 $(PNGDIR)/pngget.$(OBJSUFF) \
223 $(PNGDIR)/pngset.$(OBJSUFF)
227 $(JPEGDIR)/jcomapi.$(OBJSUFF) \
228 $(JPEGDIR)/jutils.$(OBJSUFF) \
229 $(JPEGDIR)/jerror.$(OBJSUFF) \
230 $(JPEGDIR)/jmemmgr.$(OBJSUFF) \
231 $(JPEGDIR)/jmemnobs.$(OBJSUFF) \
232 $(JPEGDIR)/jcapimin.$(OBJSUFF) \
233 $(JPEGDIR)/jcapistd.$(OBJSUFF) \
234 $(JPEGDIR)/jctrans.$(OBJSUFF) \
235 $(JPEGDIR)/jcparam.$(OBJSUFF) \
236 $(JPEGDIR)/jdatadst.$(OBJSUFF) \
237 $(JPEGDIR)/jcinit.$(OBJSUFF) \
238 $(JPEGDIR)/jcmaster.$(OBJSUFF) \
239 $(JPEGDIR)/jcmarker.$(OBJSUFF) \
240 $(JPEGDIR)/jcmainct.$(OBJSUFF) \
241 $(JPEGDIR)/jcprepct.$(OBJSUFF) \
242 $(JPEGDIR)/jccoefct.$(OBJSUFF) \
243 $(JPEGDIR)/jccolor.$(OBJSUFF) \
244 $(JPEGDIR)/jcsample.$(OBJSUFF) \
245 $(JPEGDIR)/jchuff.$(OBJSUFF) \
246 $(JPEGDIR)/jcphuff.$(OBJSUFF) \
247 $(JPEGDIR)/jcdctmgr.$(OBJSUFF) \
248 $(JPEGDIR)/jfdctfst.$(OBJSUFF) \
249 $(JPEGDIR)/jfdctflt.$(OBJSUFF) \
250 $(JPEGDIR)/jfdctint.$(OBJSUFF) \
251 $(JPEGDIR)/jdapimin.$(OBJSUFF) \
252 $(JPEGDIR)/jdapistd.$(OBJSUFF) \
253 $(JPEGDIR)/jdtrans.$(OBJSUFF) \
254 $(JPEGDIR)/jdatasrc.$(OBJSUFF) \
255 $(JPEGDIR)/jdmaster.$(OBJSUFF) \
256 $(JPEGDIR)/jdinput.$(OBJSUFF) \
257 $(JPEGDIR)/jdmarker.$(OBJSUFF) \
258 $(JPEGDIR)/jdhuff.$(OBJSUFF) \
259 $(JPEGDIR)/jdphuff.$(OBJSUFF) \
260 $(JPEGDIR)/jdmainct.$(OBJSUFF) \
261 $(JPEGDIR)/jdcoefct.$(OBJSUFF) \
262 $(JPEGDIR)/jdpostct.$(OBJSUFF) \
263 $(JPEGDIR)/jddctmgr.$(OBJSUFF) \
264 $(JPEGDIR)/jidctfst.$(OBJSUFF) \
265 $(JPEGDIR)/jidctflt.$(OBJSUFF) \
266 $(JPEGDIR)/jidctint.$(OBJSUFF) \
267 $(JPEGDIR)/jidctred.$(OBJSUFF) \
268 $(JPEGDIR)/jdsample.$(OBJSUFF) \
269 $(JPEGDIR)/jdcolor.$(OBJSUFF) \
270 $(JPEGDIR)/jquant1.$(OBJSUFF) \
271 $(JPEGDIR)/jquant2.$(OBJSUFF) \
272 $(JPEGDIR)/jdmerge.$(OBJSUFF)
274 TIFFOBJS = $(TIFFDIR)/tif_aux.o \
275 $(TIFFDIR)/tif_close.o \
276 $(TIFFDIR)/tif_codec.o \
277 $(TIFFDIR)/tif_compress.o \
278 $(TIFFDIR)/tif_dir.o \
279 $(TIFFDIR)/tif_dirinfo.o \
280 $(TIFFDIR)/tif_dirread.o \
281 $(TIFFDIR)/tif_dirwrite.o \
282 $(TIFFDIR)/tif_dumpmode.o \
283 $(TIFFDIR)/tif_error.o \
284 $(TIFFDIR)/tif_fax3.o \
285 $(TIFFDIR)/tif_fax3sm.o \
286 $(TIFFDIR)/tif_flush.o \
287 $(TIFFDIR)/tif_getimage.o \
288 $(TIFFDIR)/tif_jpeg.o \
289 $(TIFFDIR)/tif_luv.o \
290 $(TIFFDIR)/tif_lzw.o \
291 $(TIFFDIR)/tif_next.o \
292 $(TIFFDIR)/tif_open.o \
293 $(TIFFDIR)/tif_packbits.o \
294 $(TIFFDIR)/tif_pixarlog.o \
295 $(TIFFDIR)/tif_predict.o \
296 $(TIFFDIR)/tif_print.o \
297 $(TIFFDIR)/tif_read.o \
298 $(TIFFDIR)/tif_strip.o \
299 $(TIFFDIR)/tif_swab.o \
300 $(TIFFDIR)/tif_thunder.o \
301 $(TIFFDIR)/tif_tile.o \
302 $(TIFFDIR)/tif_version.o \
303 $(TIFFDIR)/tif_warning.o \
304 $(TIFFDIR)/tif_win32.o \
305 $(TIFFDIR)/tif_write.o \
309 ifneq "$(_GCC295)$(_GCC3)" ""
310 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ) $(ADVANCEDOBJS)
312 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ)
315 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ)
317 ifeq ($(wxUSE_GUI),0)
318 OBJECTS = $(MSWOBJS_BASE) $(COMMONOBJS_BASE) $(COMMONOBJS_BASEONLY) $(GENERICOBJS_BASE)
321 # how do you do "VAR=\" ? BLEAGH!
322 BACKSLASH=$(subst a,\,a)
323 ifeq (,$(findstring $(OSTYPE),"cygwin!msys"))
324 PATH_SEPARATOR:=$(BACKSLASH)
328 PATH_SUBST:=$(BACKSLASH)
331 #ARCHINCDIR=$(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/lib/msw$(INCEXT))
332 ARCHINCDIR=$(WXDIR)/lib/$(TOOLKIT)$(INCEXT)
334 SETUP_H=$(ARCHINCDIR)/wx/setup.h
337 all: $(SETUP_H) $(OBJECTS) $(WXLIB) $(ZLIBLIB) $(PNGLIB) $(JPEGLIB) $(TIFFLIB) $(REGEXLIB)
339 all: $(SETUP_H) $(OBJECTS) $(ZLIBLIB) $(PNGLIB) $(JPEGLIB) $(TIFFLIB) $(REGEXLIB) $(WXDLL)
343 mkdir $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(ARCHINCDIR))
344 mkdir $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(ARCHINCDIR)/wx)
346 $(SETUP_H): $(ARCHINCDIR)/wx
347 $(COPY) $(WXDIR)/include/wx/msw/setup.h $@
349 # $(COPY) $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/include/wx/msw/setup.h) $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$@)
353 $(WXLIB): $(OBJECTS) $(EXTRAOBJS)
354 ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS)
359 # The new linker is a few orders of magnitude faster than the old way
361 ifeq "$(strip $(LD_SUPPORTS_SHARED))" "yes"
363 $(WXDLL): $(OBJECTS) $(EXTRAOBJS)
364 $(CC) -shared -o $@ \
365 -Wl,--output-def,$(WXDEF) \
366 -Wl,--out-implib,$(WXLIB) \
367 $(OBJECTS) $(EXTRAOBJS) \
368 $(DLL_LDFLAGS) $(DLL_LDLIBS)
372 DLL_ENTRY = _DllMainCRTStartup@12
374 DLL_ENTRY = __cygwin_dll_entry@12
376 LD_STUFF = $(OBJECTS) $(EXTRAOBJS) -Wl,-e,$(DLL_ENTRY) \
377 $(DLL_LDFLAGS) $(DLL_LDLIBS) #-Wl,--image-base=0x66000000
379 DLL_STUFF = --as=$(AS) --dllname $(notdir $(WXDLL)) \
381 --base-file wx.base --output-exp wx.exp
383 $(WXDEF) $(WXLIB): $(OBJECTS) $(EXTRAOBJS)
384 $(DLLTOOL) --output-def $@ --output-lib $(WXLIB) \
385 --dllname $(notdir $(WXDLL)) \
386 $(OBJECTS) $(EXTRAOBJS) $(DLL_EXTRA_LIBS)
388 $(WXDLL): $(OBJECTS) $(EXTRAOBJS) $(WXDEF)
389 $(CC) -mdll -Wl,--base-file,wx.base -s -o $@ $(LD_STUFF)
390 $(DLLTOOL) $(DLL_STUFF)
391 $(CC) -mdll -Wl,--base-file,wx.base wx.exp -s -o $@ $(LD_STUFF)
392 $(DLLTOOL) $(DLL_STUFF)
393 $(CC) -mdll wx.exp -o $@ $(LD_STUFF)
402 $(ZLIBLIB): $(ZLIBOBJS)
403 $(AR) $(AROPTIONS) $@ $(ZLIBOBJS)
406 $(PNGLIB): $(PNGOBJS)
407 $(AR) $(AROPTIONS) $@ $(PNGOBJS)
410 $(JPEGLIB): $(JPEGOBJS)
411 $(AR) $(AROPTIONS) $@ $(JPEGOBJS)
414 $(TIFFLIB): $(TIFFOBJS)
415 $(AR) $(AROPTIONS) $@ $(TIFFOBJS)
419 $(MAKE) -C $(REGEXDIR) -f makefile.g95 WXDIR=$(WXDIR) WXWIN=$(WXDIR)
421 $(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(ARCHINCDIR)/wx/setup.h
423 $(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c
424 $(CCLEX) -c $(CPPFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS -o $@ $(COMMDIR)/y_tab.c
426 $(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c
427 $(COPY) ../common/dosyacc.c ../common/y_tab.c
429 $(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c
430 $(COPY) ../common/doslex.c ../common/lex_yy.c
432 # Replace lex with flex if you run into compilation
433 # problems with lex_yy.c. See also note about LEX_SCANNER
435 # $(COMMDIR)/lex_yy.c: $(COMMDIR)/lexer.l
436 # $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
438 # Try one of these if the above line doesn't work.
439 # Alternative syntax (1)
440 # $(LEX) -t -L $(COMMDIR)/lexer.l > $(COMMDIR)/lex_yy.c
441 # Alternative syntax (2)
442 # $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
444 # sed -e "s/BUFSIZ/5000/g" < lex.yy.c | \
445 # sed -e "s/yyoutput(c)/void yyoutput(c)/g" | \
446 # sed -e "s/YYLMAX 200/YYLMAX 5000/g" > lex_yy.c
449 # Replace yacc with bison if you run into compilation
450 # problems with y_tab.c.
452 # $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
453 # $(YACC) -o $(COMMDIR)/y_tab.c $(COMMDIR)/parser.y
455 # If you use e.g. gcc on Unix, uncomment these lines
456 # and comment out the above.
458 # $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
459 # $(YACC) $(COMMDIR)/parser.y
460 # mv y.tab.c $(COMMDIR)/y_tab.c
467 -$(RM) ../common/y_tab.c
468 -$(RM) ../common/lex_yy.c
470 -$(RM) ../common/*.bak
471 -$(RM) ../generic/*.o
472 -$(RM) ../generic/*.bak
483 -$(RM) ../regex/*.bak
496 ifneq "$(strip $(LD_SUPPORTS_SHARED))" "yes"