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) 1999, Vadim Zeitlin
89 # Copyright:(c) 1999, Robert Roebling
91 # Makefile for libwx.a
93 # Replace this with your own path if necessary
96 # All common compiler flags and options are now in
97 # this central makefile.
98 include $(WXDIR)/src/makeg95.env
100 # DLL Name, if building wxWindows as a DLL.
102 WXDLL = $(WXDIR)/lib/wx$(TOOLKIT)$(WXVERSION)$(UNIEXT)$(DEBEXT)$(MIN_SUFFIX).dll
103 WXDEF = wx$(TOOLKIT)$(WXVERSION)$(UNIEXT)$(DEBEXT).def
104 DLL_EXTRA_LIBS = $(WXDIR)/lib/libzlib$(MIN_SUFFIX).a \
105 $(WXDIR)/lib/libpng$(MIN_SUFFIX).a \
106 $(WXDIR)/lib/libjpeg$(MIN_SUFFIX).a \
107 $(WXDIR)/lib/libtiff$(MIN_SUFFIX).a \
108 $(WXDIR)/lib/libregex$(MIN_SUFFIX).a
109 DLL_LDFLAGS = -L$(WXDIR)/lib
110 DLL_BASE_LDLIBS = $(DLL_EXTRA_LIBS) -lstdc++ -lwsock32
111 ifeq ($(wxUSE_GUI),0)
112 DLL_LDLIBS = $(DLL_BASE_LDLIBS)
114 DLL_LDLIBS = -lcomctl32 -lctl3d32 -lole32 -loleaut32 \
115 -luuid -lrpcrt4 -lodbc32 -lwinmm -lopengl32 \
120 # Subordinate library possibilities
124 GENDIR = $(WXDIR)/src/generic
125 COMMDIR = $(WXDIR)/src/common
126 HTMLDIR = $(WXDIR)/src/html
127 ZLIBDIR = $(WXDIR)/src/zlib
128 PNGDIR = $(WXDIR)/src/png
129 JPEGDIR = $(WXDIR)/src/jpeg
130 TIFFDIR = $(WXDIR)/src/tiff
131 OLEDIR = $(WXDIR)/src/msw/ole
132 MSWDIR = $(WXDIR)/src/msw
133 REGEXDIR= $(WXDIR)/src/regex
135 ZLIBLIB = $(WXDIR)/lib/libzlib$(MIN_SUFFIX).a
136 PNGLIB = $(WXDIR)/lib/libpng$(MIN_SUFFIX).a
137 JPEGLIB = $(WXDIR)/lib/libjpeg$(MIN_SUFFIX).a
138 TIFFLIB = $(WXDIR)/lib/libtiff$(MIN_SUFFIX).a
139 REGEXLIB= $(WXDIR)/lib/libregex$(MIN_SUFFIX).a
141 DOCDIR = $(WXDIR)/docs
143 # Only use the WIN32 wxDirDialog if we have a recent
145 ifeq "$(strip $(RECENT_MINGW))" "yes"
146 DIRDLGOBJ = $(MSWDIR)/dirdlg.$(OBJSUFF)
148 DIRDLGOBJ = $(GENDIR)/dirdlgg.$(OBJSUFF)
151 ifeq ($(wxUSE_GUI),0)
156 #$ ExpandList("WXGENERICOBJS_BASE");
159 $(GENERICOBJS_BASE) \
160 #$ ExpandList("WXGENERICOBJS");
163 #$ ExpandList("WXCOMMONOBJS_BASE");
165 COMMONOBJS_BASEONLY = \
166 #$ ExpandList("WXCOMMONOBJS_BASEONLY");
170 #$ ExpandList("WXCOMMONOBJS");
173 #$ ExpandList("WXHTMLOBJS");
176 #$ ExpandList("WXMSWOBJS_BASE");
180 #$ ExpandList("WXMSWOBJS");
182 ADVANCEDOBJS_BASE = \
183 #$ ExpandList("ADVANCEDOBJS_BASE");
186 $(ADVANCEDOBJS_BASE) \
187 #$ ExpandList("ADVANCEDOBJS");
190 $(ZLIBDIR)/adler32.$(OBJSUFF) \
191 $(ZLIBDIR)/compress.$(OBJSUFF) \
192 $(ZLIBDIR)/crc32.$(OBJSUFF) \
193 $(ZLIBDIR)/gzio.$(OBJSUFF) \
194 $(ZLIBDIR)/uncompr.$(OBJSUFF) \
195 $(ZLIBDIR)/deflate.$(OBJSUFF) \
196 $(ZLIBDIR)/trees.$(OBJSUFF) \
197 $(ZLIBDIR)/zutil.$(OBJSUFF) \
198 $(ZLIBDIR)/inflate.$(OBJSUFF) \
199 $(ZLIBDIR)/infblock.$(OBJSUFF) \
200 $(ZLIBDIR)/inftrees.$(OBJSUFF) \
201 $(ZLIBDIR)/infcodes.$(OBJSUFF) \
202 $(ZLIBDIR)/infutil.$(OBJSUFF) \
203 $(ZLIBDIR)/inffast.$(OBJSUFF)
206 $(PNGDIR)/png.$(OBJSUFF) \
207 $(PNGDIR)/pngread.$(OBJSUFF) \
208 $(PNGDIR)/pngrtran.$(OBJSUFF) \
209 $(PNGDIR)/pngrutil.$(OBJSUFF) \
210 $(PNGDIR)/pngpread.$(OBJSUFF) \
211 $(PNGDIR)/pngtrans.$(OBJSUFF) \
212 $(PNGDIR)/pngwrite.$(OBJSUFF) \
213 $(PNGDIR)/pngwtran.$(OBJSUFF) \
214 $(PNGDIR)/pngwutil.$(OBJSUFF) \
215 $(PNGDIR)/pngerror.$(OBJSUFF) \
216 $(PNGDIR)/pngmem.$(OBJSUFF) \
217 $(PNGDIR)/pngwio.$(OBJSUFF) \
218 $(PNGDIR)/pngrio.$(OBJSUFF) \
219 $(PNGDIR)/pngget.$(OBJSUFF) \
220 $(PNGDIR)/pngset.$(OBJSUFF)
224 $(JPEGDIR)/jcomapi.$(OBJSUFF) \
225 $(JPEGDIR)/jutils.$(OBJSUFF) \
226 $(JPEGDIR)/jerror.$(OBJSUFF) \
227 $(JPEGDIR)/jmemmgr.$(OBJSUFF) \
228 $(JPEGDIR)/jmemnobs.$(OBJSUFF) \
229 $(JPEGDIR)/jcapimin.$(OBJSUFF) \
230 $(JPEGDIR)/jcapistd.$(OBJSUFF) \
231 $(JPEGDIR)/jctrans.$(OBJSUFF) \
232 $(JPEGDIR)/jcparam.$(OBJSUFF) \
233 $(JPEGDIR)/jdatadst.$(OBJSUFF) \
234 $(JPEGDIR)/jcinit.$(OBJSUFF) \
235 $(JPEGDIR)/jcmaster.$(OBJSUFF) \
236 $(JPEGDIR)/jcmarker.$(OBJSUFF) \
237 $(JPEGDIR)/jcmainct.$(OBJSUFF) \
238 $(JPEGDIR)/jcprepct.$(OBJSUFF) \
239 $(JPEGDIR)/jccoefct.$(OBJSUFF) \
240 $(JPEGDIR)/jccolor.$(OBJSUFF) \
241 $(JPEGDIR)/jcsample.$(OBJSUFF) \
242 $(JPEGDIR)/jchuff.$(OBJSUFF) \
243 $(JPEGDIR)/jcphuff.$(OBJSUFF) \
244 $(JPEGDIR)/jcdctmgr.$(OBJSUFF) \
245 $(JPEGDIR)/jfdctfst.$(OBJSUFF) \
246 $(JPEGDIR)/jfdctflt.$(OBJSUFF) \
247 $(JPEGDIR)/jfdctint.$(OBJSUFF) \
248 $(JPEGDIR)/jdapimin.$(OBJSUFF) \
249 $(JPEGDIR)/jdapistd.$(OBJSUFF) \
250 $(JPEGDIR)/jdtrans.$(OBJSUFF) \
251 $(JPEGDIR)/jdatasrc.$(OBJSUFF) \
252 $(JPEGDIR)/jdmaster.$(OBJSUFF) \
253 $(JPEGDIR)/jdinput.$(OBJSUFF) \
254 $(JPEGDIR)/jdmarker.$(OBJSUFF) \
255 $(JPEGDIR)/jdhuff.$(OBJSUFF) \
256 $(JPEGDIR)/jdphuff.$(OBJSUFF) \
257 $(JPEGDIR)/jdmainct.$(OBJSUFF) \
258 $(JPEGDIR)/jdcoefct.$(OBJSUFF) \
259 $(JPEGDIR)/jdpostct.$(OBJSUFF) \
260 $(JPEGDIR)/jddctmgr.$(OBJSUFF) \
261 $(JPEGDIR)/jidctfst.$(OBJSUFF) \
262 $(JPEGDIR)/jidctflt.$(OBJSUFF) \
263 $(JPEGDIR)/jidctint.$(OBJSUFF) \
264 $(JPEGDIR)/jidctred.$(OBJSUFF) \
265 $(JPEGDIR)/jdsample.$(OBJSUFF) \
266 $(JPEGDIR)/jdcolor.$(OBJSUFF) \
267 $(JPEGDIR)/jquant1.$(OBJSUFF) \
268 $(JPEGDIR)/jquant2.$(OBJSUFF) \
269 $(JPEGDIR)/jdmerge.$(OBJSUFF)
271 TIFFOBJS = $(TIFFDIR)/tif_aux.o \
272 $(TIFFDIR)/tif_close.o \
273 $(TIFFDIR)/tif_codec.o \
274 $(TIFFDIR)/tif_compress.o \
275 $(TIFFDIR)/tif_dir.o \
276 $(TIFFDIR)/tif_dirinfo.o \
277 $(TIFFDIR)/tif_dirread.o \
278 $(TIFFDIR)/tif_dirwrite.o \
279 $(TIFFDIR)/tif_dumpmode.o \
280 $(TIFFDIR)/tif_error.o \
281 $(TIFFDIR)/tif_fax3.o \
282 $(TIFFDIR)/tif_fax3sm.o \
283 $(TIFFDIR)/tif_flush.o \
284 $(TIFFDIR)/tif_getimage.o \
285 $(TIFFDIR)/tif_jpeg.o \
286 $(TIFFDIR)/tif_luv.o \
287 $(TIFFDIR)/tif_lzw.o \
288 $(TIFFDIR)/tif_next.o \
289 $(TIFFDIR)/tif_open.o \
290 $(TIFFDIR)/tif_packbits.o \
291 $(TIFFDIR)/tif_pixarlog.o \
292 $(TIFFDIR)/tif_predict.o \
293 $(TIFFDIR)/tif_print.o \
294 $(TIFFDIR)/tif_read.o \
295 $(TIFFDIR)/tif_strip.o \
296 $(TIFFDIR)/tif_swab.o \
297 $(TIFFDIR)/tif_thunder.o \
298 $(TIFFDIR)/tif_tile.o \
299 $(TIFFDIR)/tif_version.o \
300 $(TIFFDIR)/tif_warning.o \
301 $(TIFFDIR)/tif_win32.o \
302 $(TIFFDIR)/tif_write.o \
305 ifeq "$(strip $(RECENT_MINGW))" "yes"
306 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ) $(ADVANCEDOBJS)
308 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ)
310 ifeq ($(wxUSE_GUI),0)
311 OBJECTS = $(MSWOBJS_BASE) $(COMMONOBJS_BASE) $(COMMONOBJS_BASEONLY) $(GENERICOBJS_BASE)
314 # how do you do "VAR=\" ? BLEAGH!
315 BACKSLASH=$(subst a,\,a)
316 ifeq (,$(findstring $(OSTYPE),"cygwin!msys"))
317 PATH_SEPARATOR:=$(BACKSLASH)
321 PATH_SUBST:=$(BACKSLASH)
324 #ARCHINCDIR=$(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/lib/msw$(INCEXT))
325 ARCHINCDIR=$(WXDIR)/lib/$(TOOLKIT)$(INCEXT)
327 SETUP_H=$(ARCHINCDIR)/wx/setup.h
330 all: $(SETUP_H) $(OBJECTS) $(WXLIB) $(ZLIBLIB) $(PNGLIB) $(JPEGLIB) $(TIFFLIB) $(REGEXLIB)
332 all: $(SETUP_H) $(OBJECTS) $(ZLIBLIB) $(PNGLIB) $(JPEGLIB) $(TIFFLIB) $(REGEXLIB) $(WXDLL)
336 mkdir $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(ARCHINCDIR))
337 mkdir $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(ARCHINCDIR)/wx)
339 # Copy ALWAYS uses forward slashes now.
341 $(SETUP_H): $(ARCHINCDIR)/wx $(WXDIR)/include/wx/msw/setup.h
342 $(COPY) $(WXDIR)/include/wx/msw/setup.h $(subst $(BACKSLASH),/,$@)
344 # $(COPY) $(WXDIR)/include/wx/msw/setup.h $@
345 # $(COPY) $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/include/wx/msw/setup.h) $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$@)
349 $(WXLIB): $(OBJECTS) $(EXTRAOBJS)
350 ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS)
355 # The new linker is a few orders of magnitude faster than the old way
357 ifeq "$(strip $(LD_SUPPORTS_SHARED))" "yes"
359 $(WXDLL): $(OBJECTS) $(EXTRAOBJS)
360 $(CXX) -shared -o $@ \
361 -Wl,--output-def,$(WXDEF) \
362 -Wl,--out-implib,$(WXLIB) \
363 $(OBJECTS) $(EXTRAOBJS) \
364 $(DLL_LDFLAGS) $(DLL_LDLIBS) \
369 DLL_ENTRY = _DllMainCRTStartup@12
371 DLL_ENTRY = __cygwin_dll_entry@12
373 LD_STUFF = $(OBJECTS) $(EXTRAOBJS) -Wl,-e,$(DLL_ENTRY) \
374 $(DLL_LDFLAGS) $(DLL_LDLIBS) #-Wl,--image-base=0x66000000
376 DLL_STUFF = --as=$(AS) --dllname $(notdir $(WXDLL)) \
378 --base-file wx.base --output-exp wx.exp
380 $(WXDEF) $(WXLIB): $(OBJECTS) $(EXTRAOBJS)
381 $(DLLTOOL) --output-def $@ --output-lib $(WXLIB) \
382 --dllname $(notdir $(WXDLL)) \
383 $(OBJECTS) $(EXTRAOBJS) $(DLL_EXTRA_LIBS)
385 $(WXDLL): $(OBJECTS) $(EXTRAOBJS) $(WXDEF)
386 $(CC) -mdll -Wl,--base-file,wx.base -s -o $@ $(LD_STUFF) $(ALL_LDFLAGS_DLL)
387 $(DLLTOOL) $(DLL_STUFF)
388 $(CC) -mdll -Wl,--base-file,wx.base wx.exp -s -o $@ $(LD_STUFF) $(ALL_LDFLAGS_DLL)
389 $(DLLTOOL) $(DLL_STUFF)
390 $(CC) -mdll wx.exp -o $@ $(LD_STUFF) $(ALL_LDFLAGS_DLL)
399 $(ZLIBLIB): $(ZLIBOBJS)
400 $(AR) $(AROPTIONS) $@ $(ZLIBOBJS)
403 $(PNGLIB): $(PNGOBJS)
404 $(AR) $(AROPTIONS) $@ $(PNGOBJS)
407 $(JPEGLIB): $(JPEGOBJS)
408 $(AR) $(AROPTIONS) $@ $(JPEGOBJS)
411 $(TIFFLIB): $(TIFFOBJS)
412 $(AR) $(AROPTIONS) $@ $(TIFFOBJS)
416 $(MAKE) -C $(REGEXDIR) -f makefile.g95 MINGW32=$(MINGW32) WXDIR=$(WXDIR) WXWIN=$(WXDIR)
418 $(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(ARCHINCDIR)/wx/setup.h
426 -$(RM) ../common/*.bak
427 -$(RM) ../generic/*.o
428 -$(RM) ../generic/*.bak
439 -$(RM) ../regex/*.bak
452 ifneq "$(strip $(LD_SUPPORTS_SHARED))" "yes"