]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/g95.t
Use generic collapsible pane for wxUniv based builds.
[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 $base = ( $wxGeneric{$file} =~ /\bB\b/ ) ? '_BASE' : '';
19
20 if ( $wxGeneric{$file} =~ /\b(PS|G|U|16)\b/ ) {
21 next #! unless $file =~ /^dirdlgg\./;
22 }
23
24 $file =~ s/cp?p?$/\$(OBJSUFF)/;
25 $project{"WXGENERICOBJS$base"} .= '$(GENDIR)/' . $file . " "
26 }
27
28 foreach $file (sort keys %wxCommon) {
29 next if $wxCommon{$file} =~ /\b(16|U)\b/;
30
31 #! needs extra files (sql*.h) so not compiled by default.
32 #! next if $file =~ /^odbc\./;
33
34 $base = ( $wxCommon{$file} =~ /\bB\b/ ) ? '_BASE' : '';
35 if ( $file =~ /^odbc\./ )
36 {
37 $file =~ s/cp?p?$/\$(OBJSUFF)/;
38 $project{"ADVANCEDOBJS$base"} .= '$(COMMDIR)/' . $file . " "
39 }
40 else
41 {
42 $file =~ s/cp?p?$/\$(OBJSUFF)/;
43 $project{"WXCOMMONOBJS$base"} .= '$(COMMDIR)/' . $file . " "
44 }
45 }
46
47 foreach $file (sort keys %wxBase) {
48 $file =~ s/cp?p?$/\$(OBJSUFF)/;
49 $project{"WXCOMMONOBJS_BASEONLY"} .= '$(COMMDIR)/' . $file . " "
50 }
51
52 foreach $file (sort keys %wxMSW) {
53 #! native wxDirDlg can't be compiled due to GnuWin32/OLE limitations,
54 next if $file =~ /^dirdlg\./;
55
56 next if $wxMSW{$file} =~ /\b(16)\b/;
57 $base = ( $wxMSW{$file} =~ /\bB\b/ ) ? '_BASE' : '';
58
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/ )
62 {
63 $file =~ s/cp?p?$/\$(OBJSUFF)/;
64 $project{"ADVANCEDOBJS$base"} .= '$(MSWDIR)/ole/' . $file . " "
65 }
66 else
67 {
68 $file =~ s/cp?p?$/\$(OBJSUFF)/;
69 $project{"WXMSWOBJS$base"} .= '$(MSWDIR)/' . $file . " "
70 }
71
72 }
73
74 foreach $file (sort keys %wxHTML) {
75 $file =~ s/cp?p?$/\$(OBJSUFF)/;
76 $project{"WXHTMLOBJS"} .= '$(HTMLDIR)/' . $file . " "
77 }
78
79 #$}
80 # This file was automatically generated by tmake
81 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
82
83 #
84 # File: makefile.g95
85 # Author: Julian Smart, Robert Roebling, Vadim Zeitlin
86 # Created: 1993
87 # Updated: 1999
88 # Copyright:(c) 1999, Vadim Zeitlin
89 # Copyright:(c) 1999, Robert Roebling
90 #
91 # Makefile for libwx.a
92
93 # Replace this with your own path if necessary
94 WXDIR = ../..
95
96 # All common compiler flags and options are now in
97 # this central makefile.
98 include $(WXDIR)/src/makeg95.env
99
100 # DLL Name, if building wxWindows as a DLL.
101 ifdef WXMAKINGDLL
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)
113 else
114 DLL_LDLIBS = -lcomctl32 -lctl3d32 -lole32 -loleaut32 \
115 -luuid -lrpcrt4 -lodbc32 -lwinmm -lopengl32 \
116 $(DLL_BASE_LDLIBS)
117 endif
118 endif
119
120 # Subordinate library possibilities
121
122 EXTRAOBJS=
123
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
134
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
140
141 DOCDIR = $(WXDIR)/docs
142
143 # Only use the WIN32 wxDirDialog if we have a recent
144 # version of Mingw32
145 ifeq "$(strip $(RECENT_MINGW))" "yes"
146 DIRDLGOBJ = $(MSWDIR)/dirdlg.$(OBJSUFF)
147 else
148 DIRDLGOBJ = $(GENDIR)/dirdlgg.$(OBJSUFF)
149 endif
150
151 ifeq ($(wxUSE_GUI),0)
152 DIRDLGOBJ =
153 endif
154
155 GENERICOBJS_BASE = \
156 #$ ExpandList("WXGENERICOBJS_BASE");
157
158 GENERICOBJS = \
159 $(GENERICOBJS_BASE) \
160 #$ ExpandList("WXGENERICOBJS");
161
162 COMMONOBJS_BASE = \
163 #$ ExpandList("WXCOMMONOBJS_BASE");
164
165 COMMONOBJS_BASEONLY = \
166 #$ ExpandList("WXCOMMONOBJS_BASEONLY");
167
168 COMMONOBJS = \
169 $(COMMONOBJS_BASE) \
170 #$ ExpandList("WXCOMMONOBJS");
171
172 HTMLOBJS = \
173 #$ ExpandList("WXHTMLOBJS");
174
175 MSWOBJS_BASE = \
176 #$ ExpandList("WXMSWOBJS_BASE");
177
178 MSWOBJS = \
179 $(MSWOBJS_BASE) \
180 #$ ExpandList("WXMSWOBJS");
181
182 ADVANCEDOBJS_BASE = \
183 #$ ExpandList("ADVANCEDOBJS_BASE");
184
185 ADVANCEDOBJS = \
186 $(ADVANCEDOBJS_BASE) \
187 #$ ExpandList("ADVANCEDOBJS");
188
189 ZLIBOBJS = \
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)
204
205 PNGOBJS = \
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)
221
222
223 JPEGOBJS = \
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)
270
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 \
303 $(TIFFDIR)/tif_zip.o
304
305 ifeq "$(strip $(RECENT_MINGW))" "yes"
306 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ) $(ADVANCEDOBJS)
307 else
308 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ)
309 endif
310 ifeq ($(wxUSE_GUI),0)
311 OBJECTS = $(MSWOBJS_BASE) $(COMMONOBJS_BASE) $(COMMONOBJS_BASEONLY) $(GENERICOBJS_BASE)
312 endif
313
314 # how do you do "VAR=\" ? BLEAGH!
315 BACKSLASH=$(subst a,\,a)
316 ifeq (,$(findstring $(OSTYPE),"cygwin!msys"))
317 PATH_SEPARATOR:=$(BACKSLASH)
318 PATH_SUBST=/
319 else
320 PATH_SEPARATOR=/
321 PATH_SUBST:=$(BACKSLASH)
322 endif
323
324 #ARCHINCDIR=$(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/lib/msw$(INCEXT))
325 ARCHINCDIR=$(WXDIR)/lib/$(TOOLKIT)$(INCEXT)
326
327 SETUP_H=$(ARCHINCDIR)/wx/setup.h
328
329 ifndef WXMAKINGDLL
330 all: $(SETUP_H) $(OBJECTS) $(WXLIB) $(ZLIBLIB) $(PNGLIB) $(JPEGLIB) $(TIFFLIB) $(REGEXLIB)
331 else
332 all: $(SETUP_H) $(OBJECTS) $(ZLIBLIB) $(PNGLIB) $(JPEGLIB) $(TIFFLIB) $(REGEXLIB) $(WXDLL)
333 endif
334
335 $(ARCHINCDIR)/wx:
336 mkdir $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(ARCHINCDIR))
337 mkdir $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(ARCHINCDIR)/wx)
338
339 # Copy ALWAYS uses forward slashes now.
340
341 $(SETUP_H): $(ARCHINCDIR)/wx $(WXDIR)/include/wx/msw/setup.h
342 $(COPY) $(WXDIR)/include/wx/msw/setup.h $(subst $(BACKSLASH),/,$@)
343
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),$@)
346
347 ifndef WXMAKINGDLL
348
349 $(WXLIB): $(OBJECTS) $(EXTRAOBJS)
350 ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS)
351 $(RANLIB) $@
352
353 else
354
355 # The new linker is a few orders of magnitude faster than the old way
356 # of creating DLLs.
357 ifeq "$(strip $(LD_SUPPORTS_SHARED))" "yes"
358
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) \
365 $(ALL_LDFLAGS_DLL)
366 else
367
368 ifeq ($(MINGW32),1)
369 DLL_ENTRY = _DllMainCRTStartup@12
370 else
371 DLL_ENTRY = __cygwin_dll_entry@12
372 endif
373 LD_STUFF = $(OBJECTS) $(EXTRAOBJS) -Wl,-e,$(DLL_ENTRY) \
374 $(DLL_LDFLAGS) $(DLL_LDLIBS) #-Wl,--image-base=0x66000000
375
376 DLL_STUFF = --as=$(AS) --dllname $(notdir $(WXDLL)) \
377 --def $(WXDEF) \
378 --base-file wx.base --output-exp wx.exp
379
380 $(WXDEF) $(WXLIB): $(OBJECTS) $(EXTRAOBJS)
381 $(DLLTOOL) --output-def $@ --output-lib $(WXLIB) \
382 --dllname $(notdir $(WXDLL)) \
383 $(OBJECTS) $(EXTRAOBJS) $(DLL_EXTRA_LIBS)
384
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)
391 -$(RM) wx.base
392 -$(RM) wx.exp
393
394 endif
395
396 endif
397
398
399 $(ZLIBLIB): $(ZLIBOBJS)
400 $(AR) $(AROPTIONS) $@ $(ZLIBOBJS)
401 $(RANLIB) $@
402
403 $(PNGLIB): $(PNGOBJS)
404 $(AR) $(AROPTIONS) $@ $(PNGOBJS)
405 $(RANLIB) $@
406
407 $(JPEGLIB): $(JPEGOBJS)
408 $(AR) $(AROPTIONS) $@ $(JPEGOBJS)
409 $(RANLIB) $@
410
411 $(TIFFLIB): $(TIFFOBJS)
412 $(AR) $(AROPTIONS) $@ $(TIFFOBJS)
413 $(RANLIB) $@
414
415 $(REGEXLIB):
416 $(MAKE) -C $(REGEXDIR) -f makefile.g95 MINGW32=$(MINGW32) WXDIR=$(WXDIR) WXWIN=$(WXDIR)
417
418 $(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(ARCHINCDIR)/wx/setup.h
419
420 clean:
421 -$(RM) *.o
422 -$(RM) ole/*.o
423 -$(RM) *.bak
424 -$(RM) core
425 -$(RM) ../common/*.o
426 -$(RM) ../common/*.bak
427 -$(RM) ../generic/*.o
428 -$(RM) ../generic/*.bak
429 -$(RM) ../html/*.o
430 -$(RM) ../zlib/*.o
431 -$(RM) ../zlib/*.bak
432 -$(RM) ../png/*.o
433 -$(RM) ../png/*.bak
434 -$(RM) ../jpeg/*.o
435 -$(RM) ../jpeg/*.bak
436 -$(RM) ../tiff/*.o
437 -$(RM) ../tiff/*.bak
438 -$(RM) ../regex/*.o
439 -$(RM) ../regex/*.bak
440
441 cleanall: clean
442 -$(RM) $(WXLIB)
443 -$(RM) $(ZLIBLIB)
444 -$(RM) $(PNGLIB)
445 -$(RM) $(JPEGLIB)
446 -$(RM) $(TIFFLIB)
447 -$(RM) $(REGEXLIB)
448
449 ifdef WXMAKINGDLL
450 -$(RM) $(WXDLL)
451 -$(RM) $(WXDEF)
452 ifneq "$(strip $(LD_SUPPORTS_SHARED))" "yes"
453 -$(RM) wx.base
454 -$(RM) wx.exp
455 endif
456 endif
457