]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tmake/g95.t
Use wxWcslen instead of wcslen.
[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
c448540d
MB
18 $base = ( $wxGeneric{$file} =~ /\bB\b/ ) ? '_BASE' : '';
19
2662e49e 20 if ( $wxGeneric{$file} =~ /\b(PS|G|U|16)\b/ ) {
154f22b3 21 next #! unless $file =~ /^dirdlgg\./;
f2071dda
VZ
22 }
23
24 $file =~ s/cp?p?$/\$(OBJSUFF)/;
c448540d 25 $project{"WXGENERICOBJS$base"} .= '$(GENDIR)/' . $file . " "
f2071dda
VZ
26 }
27
28 foreach $file (sort keys %wxCommon) {
6a253da1 29 next if $wxCommon{$file} =~ /\b(16|U)\b/;
f2071dda
VZ
30
31 #! needs extra files (sql*.h) so not compiled by default.
1a7f3062 32 #! next if $file =~ /^odbc\./;
f2071dda 33
c448540d 34 $base = ( $wxCommon{$file} =~ /\bB\b/ ) ? '_BASE' : '';
1a7f3062
JS
35 if ( $file =~ /^odbc\./ )
36 {
37 $file =~ s/cp?p?$/\$(OBJSUFF)/;
c448540d 38 $project{"ADVANCEDOBJS$base"} .= '$(COMMDIR)/' . $file . " "
1a7f3062
JS
39 }
40 else
41 {
42 $file =~ s/cp?p?$/\$(OBJSUFF)/;
c448540d 43 $project{"WXCOMMONOBJS$base"} .= '$(COMMDIR)/' . $file . " "
1a7f3062 44 }
f2071dda
VZ
45 }
46
c448540d
MB
47 foreach $file (sort keys %wxBase) {
48 $file =~ s/cp?p?$/\$(OBJSUFF)/;
49 $project{"WXCOMMONOBJS_BASEONLY"} .= '$(COMMDIR)/' . $file . " "
50 }
51
f2071dda 52 foreach $file (sort keys %wxMSW) {
2662e49e
RR
53 #! native wxDirDlg can't be compiled due to GnuWin32/OLE limitations,
54 next if $file =~ /^dirdlg\./;
f2071dda 55
1a7f3062 56 next if $wxMSW{$file} =~ /\b(16)\b/;
c448540d 57 $base = ( $wxMSW{$file} =~ /\bB\b/ ) ? '_BASE' : '';
1a7f3062
JS
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)/;
c448540d 64 $project{"ADVANCEDOBJS$base"} .= '$(MSWDIR)/ole/' . $file . " "
1a7f3062
JS
65 }
66 else
67 {
68 $file =~ s/cp?p?$/\$(OBJSUFF)/;
c448540d 69 $project{"WXMSWOBJS$base"} .= '$(MSWDIR)/' . $file . " "
1a7f3062
JS
70 }
71
f2071dda 72 }
8a4df159
RR
73
74 foreach $file (sort keys %wxHTML) {
75 $file =~ s/cp?p?$/\$(OBJSUFF)/;
76 $project{"WXHTMLOBJS"} .= '$(HTMLDIR)/' . $file . " "
77 }
78
f2071dda 79#$}
0f04dbf3 80# This file was automatically generated by tmake
f2071dda
VZ
81# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
82
83#
c45a644e
RR
84# File: makefile.g95
85# Author: Julian Smart, Robert Roebling, Vadim Zeitlin
f2071dda 86# Created: 1993
c45a644e
RR
87# Updated: 1999
88# Copyright:(c) 1993, AIAI, University of Edinburgh,
89# Copyright:(c) 1999, Vadim Zeitlin
90# Copyright:(c) 1999, Robert Roebling
f2071dda
VZ
91#
92# Makefile for libwx.a
93
94# Replace this with your own path if necessary
95WXDIR = ../..
96
c45a644e 97# All common compiler flags and options are now in
f2071dda
VZ
98# this central makefile.
99include $(WXDIR)/src/makeg95.env
100
eafef53a
GRG
101# DLL Name, if building wxWindows as a DLL.
102ifdef WXMAKINGDLL
c448540d
MB
103WXDLL = $(WXDIR)/lib/wx$(TOOLKIT)$(WXVERSION)$(UNIEXT)$(DEBEXT).dll
104WXDEF = wx$(TOOLKIT)$(WXVERSION)$(UNIEXT)$(DEBEXT).def
eafef53a
GRG
105DLL_EXTRA_LIBS = $(WXDIR)/lib/libzlib.a \
106 $(WXDIR)/lib/libpng.a $(WXDIR)/lib/libjpeg.a \
b3bd664a 107 $(WXDIR)/lib/libtiff.a $(WXDIR)/lib/libregex.a
eafef53a 108DLL_LDFLAGS = -L$(WXDIR)/lib
c448540d
MB
109DLL_BASE_LDLIBS = $(DLL_EXTRA_LIBS) -lstdc++ -lwsock32
110ifeq ($(wxUSE_GUI),0)
111 DLL_LDLIBS = $(DLL_BASE_LDLIBS)
112else
113 DLL_LDLIBS = -mwindows -lcomctl32 -lctl3d32 -lole32 -loleaut32 \
114 -luuid -lrpcrt4 -lodbc32 -lwinmm -lopengl32 \
115 $(DLL_BASE_LDLIBS)
116endif
eafef53a
GRG
117endif
118
f2071dda
VZ
119# Subordinate library possibilities
120
121EXTRAOBJS=
122
c45a644e
RR
123GENDIR = $(WXDIR)/src/generic
124COMMDIR = $(WXDIR)/src/common
a3015c54 125HTMLDIR = $(WXDIR)/src/html
eafef53a 126ZLIBDIR = $(WXDIR)/src/zlib
c45a644e
RR
127PNGDIR = $(WXDIR)/src/png
128JPEGDIR = $(WXDIR)/src/jpeg
eafef53a 129TIFFDIR = $(WXDIR)/src/tiff
c45a644e
RR
130OLEDIR = $(WXDIR)/src/msw/ole
131MSWDIR = $(WXDIR)/src/msw
b3bd664a 132REGEXDIR= $(WXDIR)/src/regex
f2071dda 133
01dba85a 134ZLIBLIB = $(WXDIR)/lib/libzlib.a
eafef53a 135PNGLIB = $(WXDIR)/lib/libpng.a
01dba85a 136JPEGLIB = $(WXDIR)/lib/libjpeg.a
eafef53a 137TIFFLIB = $(WXDIR)/lib/libtiff.a
b3bd664a 138REGEXLIB= $(WXDIR)/lib/libregex.a
01dba85a 139
eafef53a 140DOCDIR = $(WXDIR)/docs
f2071dda 141
154f22b3
JS
142# Only use the WIN32 wxDirDialog if we have a recent
143# version of Mingw32
144ifeq ($(MINGW32),1)
46c0c2dc 145 ifneq "$(_GCC295)$(_GCC3)" ""
154f22b3
JS
146 DIRDLGOBJ = $(MSWDIR)/dirdlg.$(OBJSUFF)
147 else
148 DIRDLGOBJ = $(GENDIR)/dirdlgg.$(OBJSUFF)
149 endif
150else
151 DIRDLGOBJ = $(GENDIR)/dirdlgg.$(OBJSUFF)
152endif
c448540d
MB
153ifeq ($(wxUSE_GUI),0)
154 DIRDLGOBJ =
155endif
156
157GENERICOBJS_BASE = \
158 #$ ExpandList("WXGENERICOBJS_BASE");
154f22b3 159
c45a644e 160GENERICOBJS = \
c448540d 161 $(GENERICOBJS_BASE) \
c45a644e 162 #$ ExpandList("WXGENERICOBJS");
f2071dda 163
c448540d
MB
164COMMONOBJS_BASE = \
165 #$ ExpandList("WXCOMMONOBJS_BASE");
166
167COMMONOBJS_BASEONLY = \
168 #$ ExpandList("WXCOMMONOBJS_BASEONLY");
169
c45a644e 170COMMONOBJS = \
c448540d 171 $(COMMONOBJS_BASE) \
f2071dda
VZ
172 $(COMMDIR)/y_tab.$(OBJSUFF) \
173 #$ ExpandList("WXCOMMONOBJS");
174
a3015c54
RR
175HTMLOBJS = \
176 #$ ExpandList("WXHTMLOBJS");
177
c448540d
MB
178MSWOBJS_BASE = \
179 #$ ExpandList("WXMSWOBJS_BASE");
180
c45a644e 181MSWOBJS = \
c448540d 182 $(MSWOBJS_BASE) \
c45a644e
RR
183 #$ ExpandList("WXMSWOBJS");
184
c448540d
MB
185ADVANCEDOBJS_BASE = \
186 #$ ExpandList("ADVANCEDOBJS_BASE");
187
1a7f3062 188ADVANCEDOBJS = \
c448540d 189 $(ADVANCEDOBJS_BASE) \
1a7f3062
JS
190 #$ ExpandList("ADVANCEDOBJS");
191
c45a644e
RR
192ZLIBOBJS = \
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)
207
208PNGOBJS = \
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)
224
225
226JPEGOBJS = \
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)
f2071dda 273
eafef53a
GRG
274TIFFOBJS = $(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 \
306 $(TIFFDIR)/tif_zip.o
307
1a7f3062 308ifeq ($(MINGW32),1)
46c0c2dc 309 ifneq "$(_GCC295)$(_GCC3)" ""
172fde4f 310 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ) $(ADVANCEDOBJS)
1a7f3062 311 else
172fde4f 312 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ)
1a7f3062
JS
313 endif
314else
172fde4f 315 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ)
1a7f3062 316endif
c448540d
MB
317ifeq ($(wxUSE_GUI),0)
318 OBJECTS = $(MSWOBJS_BASE) $(COMMONOBJS_BASE) $(COMMONOBJS_BASEONLY) $(GENERICOBJS_BASE)
319endif
f2071dda 320
6433f6d3
MB
321# how do you do "VAR=\" ? BLEAGH!
322BACKSLASH=$(subst a,\,a)
9954786b 323ifeq (,$(findstring $(OSTYPE),"cygwin!msys"))
6433f6d3
MB
324 PATH_SEPARATOR:=$(BACKSLASH)
325 PATH_SUBST=/
326else
6433f6d3
MB
327 PATH_SEPARATOR=/
328 PATH_SUBST:=$(BACKSLASH)
329endif
330
c942560f 331#ARCHINCDIR=$(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/lib/msw$(INCEXT))
c448540d 332ARCHINCDIR=$(WXDIR)/lib/$(TOOLKIT)$(INCEXT)
b3bd664a 333
6433f6d3 334SETUP_H=$(ARCHINCDIR)/wx/setup.h
b3bd664a 335
dc8497b1 336ifndef WXMAKINGDLL
b3bd664a 337all: $(SETUP_H) $(OBJECTS) $(WXLIB) $(ZLIBLIB) $(PNGLIB) $(JPEGLIB) $(TIFFLIB) $(REGEXLIB)
dc8497b1 338else
b3bd664a 339all: $(SETUP_H) $(OBJECTS) $(ZLIBLIB) $(PNGLIB) $(JPEGLIB) $(TIFFLIB) $(REGEXLIB) $(WXDLL)
dc8497b1 340endif
eafef53a 341
6433f6d3
MB
342$(ARCHINCDIR)/wx:
343 mkdir $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(ARCHINCDIR))
344 mkdir $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(ARCHINCDIR)/wx)
b3bd664a 345
2b5f62a0
VZ
346# Copy ALWAYS uses forward slashes now.
347
6433f6d3 348$(SETUP_H): $(ARCHINCDIR)/wx
2b5f62a0 349 $(COPY) $(WXDIR)/include/wx/msw/setup.h $(subst $(BACKSLASH),/,$@)
c942560f 350
2b5f62a0 351# $(COPY) $(WXDIR)/include/wx/msw/setup.h $@
c942560f 352# $(COPY) $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/include/wx/msw/setup.h) $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$@)
b3bd664a 353
eafef53a 354ifndef WXMAKINGDLL
f2071dda 355
f2071dda
VZ
356$(WXLIB): $(OBJECTS) $(EXTRAOBJS)
357 ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS)
358 $(RANLIB) $@
359
eafef53a
GRG
360else
361
362# The new linker is a few orders of magnitude faster than the old way
363# of creating DLLs.
364ifeq "$(strip $(LD_SUPPORTS_SHARED))" "yes"
365
366$(WXDLL): $(OBJECTS) $(EXTRAOBJS)
367 $(CC) -shared -o $@ \
368 -Wl,--output-def,$(WXDEF) \
369 -Wl,--out-implib,$(WXLIB) \
370 $(OBJECTS) $(EXTRAOBJS) \
371 $(DLL_LDFLAGS) $(DLL_LDLIBS)
372else
373
374ifeq ($(MINGW32),1)
375 DLL_ENTRY = _DllMainCRTStartup@12
376else
377 DLL_ENTRY = __cygwin_dll_entry@12
378endif
379LD_STUFF = $(OBJECTS) $(EXTRAOBJS) -Wl,-e,$(DLL_ENTRY) \
380 $(DLL_LDFLAGS) $(DLL_LDLIBS) #-Wl,--image-base=0x66000000
381
382DLL_STUFF = --as=$(AS) --dllname $(notdir $(WXDLL)) \
383 --def $(WXDEF) \
384 --base-file wx.base --output-exp wx.exp
385
386$(WXDEF) $(WXLIB): $(OBJECTS) $(EXTRAOBJS)
387 $(DLLTOOL) --output-def $@ --output-lib $(WXLIB) \
388 --dllname $(notdir $(WXDLL)) \
389 $(OBJECTS) $(EXTRAOBJS) $(DLL_EXTRA_LIBS)
390
391$(WXDLL): $(OBJECTS) $(EXTRAOBJS) $(WXDEF)
392 $(CC) -mdll -Wl,--base-file,wx.base -s -o $@ $(LD_STUFF)
393 $(DLLTOOL) $(DLL_STUFF)
394 $(CC) -mdll -Wl,--base-file,wx.base wx.exp -s -o $@ $(LD_STUFF)
395 $(DLLTOOL) $(DLL_STUFF)
396 $(CC) -mdll wx.exp -o $@ $(LD_STUFF)
397 -$(RM) wx.base
398 -$(RM) wx.exp
399
400endif
401
402endif
403
404
01dba85a 405$(ZLIBLIB): $(ZLIBOBJS)
dc8497b1 406 $(AR) $(AROPTIONS) $@ $(ZLIBOBJS)
01dba85a
JS
407 $(RANLIB) $@
408
409$(PNGLIB): $(PNGOBJS)
dc8497b1 410 $(AR) $(AROPTIONS) $@ $(PNGOBJS)
01dba85a
JS
411 $(RANLIB) $@
412
413$(JPEGLIB): $(JPEGOBJS)
dc8497b1 414 $(AR) $(AROPTIONS) $@ $(JPEGOBJS)
01dba85a
JS
415 $(RANLIB) $@
416
eafef53a 417$(TIFFLIB): $(TIFFOBJS)
dc8497b1 418 $(AR) $(AROPTIONS) $@ $(TIFFOBJS)
eafef53a
GRG
419 $(RANLIB) $@
420
b3bd664a 421$(REGEXLIB):
658e863a 422 $(MAKE) -C $(REGEXDIR) -f makefile.g95 WXDIR=$(WXDIR) WXWIN=$(WXDIR)
eafef53a 423
b3bd664a 424$(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(ARCHINCDIR)/wx/setup.h
f2071dda
VZ
425
426$(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c
6a570331
RR
427 $(CCLEX) -c $(CPPFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS -o $@ $(COMMDIR)/y_tab.c
428
429$(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c
102f951d 430 $(COPY) ../common/dosyacc.c ../common/y_tab.c
6a570331
RR
431
432$(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c
102f951d 433 $(COPY) ../common/doslex.c ../common/lex_yy.c
f2071dda
VZ
434
435# Replace lex with flex if you run into compilation
436# problems with lex_yy.c. See also note about LEX_SCANNER
437# above.
6a570331
RR
438# $(COMMDIR)/lex_yy.c: $(COMMDIR)/lexer.l
439# $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
440#
f2071dda
VZ
441# Try one of these if the above line doesn't work.
442# Alternative syntax (1)
443# $(LEX) -t -L $(COMMDIR)/lexer.l > $(COMMDIR)/lex_yy.c
444# Alternative syntax (2)
445# $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
6a570331 446#
f2071dda
VZ
447# sed -e "s/BUFSIZ/5000/g" < lex.yy.c | \
448# sed -e "s/yyoutput(c)/void yyoutput(c)/g" | \
449# sed -e "s/YYLMAX 200/YYLMAX 5000/g" > lex_yy.c
450# rm -f lex.yy.c
6a570331 451#
f2071dda
VZ
452# Replace yacc with bison if you run into compilation
453# problems with y_tab.c.
6a570331
RR
454#
455# $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
456# $(YACC) -o $(COMMDIR)/y_tab.c $(COMMDIR)/parser.y
457#
f2071dda
VZ
458# If you use e.g. gcc on Unix, uncomment these lines
459# and comment out the above.
6a570331 460#
f2071dda
VZ
461# $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
462# $(YACC) $(COMMDIR)/parser.y
463# mv y.tab.c $(COMMDIR)/y_tab.c
464
f2071dda 465clean:
6474416b 466 -$(RM) *.o
01dba85a 467 -$(RM) ole/*.o
6474416b
JS
468 -$(RM) *.bak
469 -$(RM) core
01dba85a
JS
470 -$(RM) ../common/y_tab.c
471 -$(RM) ../common/lex_yy.c
472 -$(RM) ../common/*.o
473 -$(RM) ../common/*.bak
474 -$(RM) ../generic/*.o
475 -$(RM) ../generic/*.bak
476 -$(RM) ../html/*.o
01dba85a
JS
477 -$(RM) ../zlib/*.o
478 -$(RM) ../zlib/*.bak
eafef53a
GRG
479 -$(RM) ../png/*.o
480 -$(RM) ../png/*.bak
01dba85a 481 -$(RM) ../jpeg/*.o
172fde4f 482 -$(RM) ../jpeg/*.bak
eafef53a
GRG
483 -$(RM) ../tiff/*.o
484 -$(RM) ../tiff/*.bak
b3bd664a
MB
485 -$(RM) ../regex/*.o
486 -$(RM) ../regex/*.bak
4817645d
VZ
487
488cleanall: clean
eafef53a 489 -$(RM) $(WXLIB)
dc8497b1
GRG
490 -$(RM) $(ZLIBLIB)
491 -$(RM) $(PNGLIB)
492 -$(RM) $(JPEGLIB)
dc8497b1 493 -$(RM) $(TIFFLIB)
b3bd664a 494 -$(RM) $(REGEXLIB)
eafef53a
GRG
495
496ifdef WXMAKINGDLL
497 -$(RM) $(WXDLL)
498 -$(RM) $(WXDEF)
499ifneq "$(strip $(LD_SUPPORTS_SHARED))" "yes"
500 -$(RM) wx.base
501 -$(RM) wx.exp
502endif
503endif
504