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