]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tmake/unx.t
Corrected PNG etc include paths
[wxWidgets.git] / distrib / msw / tmake / unx.t
CommitLineData
f56b8330
RR
1#!################################################################################
2#! File: unx.t
3#! Purpose: tmake template file from which makefile.unx.in is generated by running
4#! tmake -t unx wxwin.pro -o makefile.unx.in
5#! Author: Vadim Zeitlin, Robert Roebling, Julian Smart
6#! Created: 14.07.99
7#! Version: $Id$
8#!################################################################################
9
10#${
11 #! include the code which parses filelist.txt file and initializes
12 #! %wxCommon, %wxGeneric, %wxHtml, %wxUnix and %wxGTK hashes.
13 IncludeTemplate("filelist.t");
14
15 #! now transform these hashes into $project tags
16 foreach $file (sort keys %wxGeneric) {
17 next if $wxGeneric{$file} =~ /\bR\b/;
18
19 $file =~ s/cp?p?$/\o/;
2aa88730 20 $project{"WXGTK_GENERICOBJS"} .= "src/generic/" . $file . " "
073478b3
RR
21 }
22
23 #! now transform these hashes into $project tags
24 foreach $file (sort keys %wxGeneric) {
8e877c19 25 next if $wxCommon{$file} =~ /\bX\b/;
073478b3
RR
26
27 $file =~ s/cp?p?$/\o/;
2aa88730 28 $project{"WXMOTIF_GENERICOBJS"} .= "src/generic/" . $file . " "
f56b8330
RR
29 }
30
31 foreach $file (sort keys %wxCommon) {
32 next if $wxCommon{$file} =~ /\bR\b/;
33
34 $file =~ s/cp?p?$/\o/;
2aa88730 35 $project{"WXGTK_COMMONOBJS"} .= "src/common/" . $file . " "
073478b3
RR
36 }
37
38 foreach $file (sort keys %wxCommon) {
8e877c19 39 next if $wxCommon{$file} =~ /\bX\b/;
073478b3
RR
40
41 $file =~ s/cp?p?$/\o/;
2aa88730 42 $project{"WXMOTIF_COMMONOBJS"} .= "src/common/" . $file . " "
f56b8330
RR
43 }
44
45 foreach $file (sort keys %wxGTK) {
46 $file =~ s/cp?p?$/\o/;
2aa88730 47 $project{"WXGTK_GUIOBJS"} .= "src/gtk/" . $file . " "
073478b3
RR
48 }
49
50 foreach $file (sort keys %wxMOTIF) {
51 $file =~ s/cp?p?$/\o/;
2aa88730 52 $project{"WXMOTIF_GUIOBJS"} .= "src/motif/" . $file . " "
f56b8330
RR
53 }
54
55 foreach $file (sort keys %wxHTML) {
56 $file =~ s/cp?p?$/\o/;
2aa88730 57 $project{"WXHTMLOBJS"} .= "src/html/" . $file . " "
f56b8330
RR
58 }
59
60 foreach $file (sort keys %wxUNIX) {
61 $file =~ s/cp?p?$/\o/;
2aa88730 62 $project{"WXUNIXOBJS"} .= "src/unix/" . $file . " "
f56b8330 63 }
23a54e14 64
2aa88730
RR
65 foreach $file (sort keys %wxWXINCLUDE) {
66 $project{"WX_HEADERS"} .= $file . " "
67 }
68
69 foreach $file (sort keys %wxGENERICINCLUDE) {
70 $project{"WXGENERIC_HEADERS"} .= "generic/" . $file . " "
71 }
72
73 foreach $file (sort keys %wxMOTIFINCLUDE) {
74 $project{"WXMOTIF_HEADERS"} .= "motif/" . $file . " "
75 }
76
77 foreach $file (sort keys %wxGTKINCLUDE) {
78 $project{"WXGTK_HEADERS"} .= "gtk/" . $file . " "
79 }
80
81 foreach $file (sort keys %wxHTMLINCLUDE) {
82 $project{"WXHTML_HEADERS"} .= "html/" . $file . " "
83 }
84
85 foreach $file (sort keys %wxUNIXINCLUDE) {
86 $project{"WXUNIX_HEADERS"} .= "unix/" . $file . " "
87 }
88
89 foreach $file (sort keys %wxPROTOCOLINCLUDE) {
90 $project{"WXPROTOCOL_HEADERS"} .= "protocol/" . $file . " "
91 }
f56b8330 92#$}
23a54e14 93#
f56b8330
RR
94# This file was automatically generated by tmake at #$ Now()
95# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T!
96
97#
98# File: makefile.unx
99# Author: Julian Smart, Robert Roebling, Vadim Zeitlin
100# Created: 1993
101# Updated: 1999
102# Copyright:(c) 1993, AIAI, University of Edinburgh,
103# Copyright:(c) 1999, Vadim Zeitlin
104# Copyright:(c) 1999, Robert Roebling
105#
106# Makefile for libwx_gtk.a, libwx_motif.a and libwx_msw.a
107
8e877c19 108###################################################################
f56b8330 109
2aa88730 110include ./src/make.env
f56b8330 111
48b1d0ff
RR
112############## override make.env for PIC ##########################
113
114# Clears all default suffixes
115.SUFFIXES: .o .cpp .c .cxx
116
117.c.o :
118 $(CCC) -c $(CFLAGS) $(PICFLAGS) -o $@ $<
119
120.cpp.o :
121 $(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $<
122
123.cxx.o :
124 $(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $<
125
f56b8330
RR
126########################### Paths #################################
127
8e877c19
RR
128srcdir = @srcdir@
129
2aa88730 130VPATH = :@top_srcdir@
f56b8330
RR
131
132top_srcdir = @top_srcdir@
133prefix = @prefix@
134exec_prefix = @exec_prefix@
135
136bindir = @bindir@
137sbindir = @sbindir@
138libexecdir = @libexecdir@
139datadir = @datadir@
140sysconfdir = @sysconfdir@
141sharedstatedir = @sharedstatedir@
142localstatedir = @localstatedir@
143libdir = @libdir@
144infodir = @infodir@
145mandir = @mandir@
146includedir = @includedir@
147oldincludedir = /usr/include
148
149DESTDIR =
150
151pkgdatadir = $(datadir)/@PACKAGE@
152pkglibdir = $(libdir)/@PACKAGE@
153pkgincludedir = $(includedir)/@PACKAGE@
154
2aa88730 155top_builddir = .
f56b8330
RR
156
157INSTALL = @INSTALL@
158INSTALL_PROGRAM = @INSTALL_PROGRAM@
159INSTALL_DATA = @INSTALL_DATA@
160INSTALL_SCRIPT = @INSTALL_SCRIPT@
161transform = @program_transform_name@
162
163NORMAL_INSTALL = :
164PRE_INSTALL = :
165POST_INSTALL = :
166NORMAL_UNINSTALL = :
167PRE_UNINSTALL = :
168POST_UNINSTALL = :
169build_alias = @build_alias@
170build_triplet = @build@
171host_alias = @host_alias@
172host_triplet = @host@
173target_alias = @target_alias@
174target_triplet = @target@
175
8e877c19 176############################# Dirs #################################
f56b8330 177
2aa88730 178WXDIR = $(top_srcdir)
f56b8330
RR
179
180# Subordinate library possibilities
181
182GENDIR = $(WXDIR)/src/generic
183COMMDIR = $(WXDIR)/src/common
184HTMLDIR = $(WXDIR)/src/html
185UNIXDIR = $(WXDIR)/src/unix
186PNGDIR = $(WXDIR)/src/png
187JPEGDIR = $(WXDIR)/src/jpeg
188ZLIBDIR = $(WXDIR)/src/zlib
189GTKDIR = $(WXDIR)/src/gtk
073478b3 190MOTIFDIR = $(WXDIR)/src/motif
23a54e14 191INCDIR = $(WXDIR)/include
f56b8330 192
8e877c19
RR
193DOCDIR = $(WXDIR)/docs
194
195############################## Files ##################################
f56b8330 196
2aa88730
RR
197WX_HEADERS = \
198 #$ ExpandList("WX_HEADERS");
199
200GTK_HEADERS = \
201 #$ ExpandList("WXGTK_HEADERS");
202
203MOTIF_HEADERS = \
204 #$ ExpandList("WXMOTIF_HEADERS");
205
206UNIX_HEADERS = \
207 #$ ExpandList("WXUNIX_HEADERS");
208
209GENERIC_HEADERS = \
210 #$ ExpandList("WXGENERIC_HEADERS");
211
212PROTOCOL_HEADERS = \
213 #$ ExpandList("WXPROTOCOL_HEADERS");
214
215HTML_HEADERS = \
216 #$ ExpandList("WXHTML_HEADERS");
217
073478b3 218GTK_GENERICOBJS = \
2aa88730 219 #$ ExpandList("WXGTK_GENERICOBJS");
073478b3 220
2aa88730 221GTK_COMMONOBJS = \
073478b3
RR
222 parser.o \
223 #$ ExpandList("WXGTK_COMMONOBJS");
224
2aa88730 225GTK_GUIOBJS = \
073478b3
RR
226 #$ ExpandList("WXGTK_GUIOBJS");
227
228MOTIF_GENERICOBJS = \
2aa88730 229 #$ ExpandList("WXMOTIF_GENERICOBJS");
f56b8330 230
2aa88730 231MOTIF_COMMONOBJS = \
f56b8330 232 parser.o \
073478b3
RR
233 #$ ExpandList("WXMOTIF_COMMONOBJS");
234
2aa88730
RR
235MOTIF_GUIOBJS = \
236 src/motif/xmcombo/xmcombo.o \
073478b3 237 #$ ExpandList("WXMOTIF_GUIOBJS");
f56b8330
RR
238
239HTMLOBJS = \
2aa88730 240 #$ ExpandList("WXHTMLOBJS");
f56b8330 241
2aa88730 242UNIXOBJS = \
f56b8330
RR
243 #$ ExpandList("WXUNIXOBJS");
244
245ZLIBOBJS = \
2aa88730
RR
246 src/zlib/adler32.o \
247 src/zlib/compress.o \
248 src/zlib/crc32.o \
249 src/zlib/gzio.o \
250 src/zlib/uncompr.o \
251 src/zlib/deflate.o \
252 src/zlib/trees.o \
253 src/zlib/zutil.o \
254 src/zlib/inflate.o \
255 src/zlib/infblock.o \
256 src/zlib/inftrees.o \
257 src/zlib/infcodes.o \
258 src/zlib/infutil.o \
259 src/zlib/inffast.o
f56b8330
RR
260
261PNGOBJS = \
2aa88730
RR
262 src/png/png.o \
263 src/png/pngread.o \
264 src/png/pngrtran.o \
265 src/png/pngrutil.o \
266 src/png/pngpread.o \
267 src/png/pngtrans.o \
268 src/png/pngwrite.o \
269 src/png/pngwtran.o \
270 src/png/pngwutil.o \
271 src/png/pngerror.o \
272 src/png/pngmem.o \
273 src/png/pngwio.o \
274 src/png/pngrio.o \
275 src/png/pngget.o \
276 src/png/pngset.o
f56b8330
RR
277
278
279JPEGOBJS = \
2aa88730
RR
280 src/jpeg/jcomapi.o \
281 src/jpeg/jutils.o \
282 src/jpeg/jerror.o \
283 src/jpeg/jmemmgr.o \
284 src/jpeg/jmemnobs.o \
285 src/jpeg/jcapimin.o \
286 src/jpeg/jcapistd.o \
287 src/jpeg/jctrans.o \
288 src/jpeg/jcparam.o \
289 src/jpeg/jdatadst.o \
290 src/jpeg/jcinit.o \
291 src/jpeg/jcmaster.o \
292 src/jpeg/jcmarker.o \
293 src/jpeg/jcmainct.o \
294 src/jpeg/jcprepct.o \
295 src/jpeg/jccoefct.o \
296 src/jpeg/jccolor.o \
297 src/jpeg/jcsample.o \
298 src/jpeg/jchuff.o \
299 src/jpeg/jcphuff.o \
300 src/jpeg/jcdctmgr.o \
301 src/jpeg/jfdctfst.o \
302 src/jpeg/jfdctflt.o \
303 src/jpeg/jfdctint.o \
304 src/jpeg/jdapimin.o \
305 src/jpeg/jdapistd.o \
306 src/jpeg/jdtrans.o \
307 src/jpeg/jdatasrc.o \
308 src/jpeg/jdmaster.o \
309 src/jpeg/jdinput.o \
310 src/jpeg/jdmarker.o \
311 src/jpeg/jdhuff.o \
312 src/jpeg/jdphuff.o \
313 src/jpeg/jdmainct.o \
314 src/jpeg/jdcoefct.o \
315 src/jpeg/jdpostct.o \
316 src/jpeg/jddctmgr.o \
317 src/jpeg/jidctfst.o \
318 src/jpeg/jidctflt.o \
319 src/jpeg/jidctint.o \
320 src/jpeg/jidctred.o \
321 src/jpeg/jdsample.o \
322 src/jpeg/jdcolor.o \
323 src/jpeg/jquant1.o \
324 src/jpeg/jquant2.o \
325 src/jpeg/jdmerge.o
f56b8330 326
073478b3
RR
327
328OBJECTS = $(@GUIOBJS@) $(@COMMONOBJS@) $(@GENERICOBJS@) $(HTMLOBJS) $(UNIXOBJS) \
f56b8330
RR
329 $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS)
330
2aa88730
RR
331HEADERS = $(@GUIHEADERS@) $(HTML_HEADERS) $(UNIX_HEADERS) $(PROTOCOL_HEADERS) \
332 $(GENERIC_HEADERS) $(WX_HEADERS)
f56b8330 333
2aa88730
RR
334REQUIRED_DIRS = ./lib ./src ./src/common ./src/gtk ./src/motif \
335 ./src/generic ./src/unix ./src/motif/xmombo ./src/html \
336 ./src/zlib ./src/jpeg ./src/png
8e877c19 337
48b1d0ff 338all: $(REQUIRED_DIRS) $(OBJECTS) @WX_TARGET_LIBRARY@ @WX_CREATE_LINKS@
8e877c19
RR
339
340$(REQUIRED_DIRS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h
2aa88730
RR
341 @if test ! -d ./lib; then mkdir ./lib; fi
342 @if test ! -d ./src; then mkdir ./src; fi
343 @if test ! -d ./src/common; then mkdir ./src/common; fi
344 @if test ! -d ./src/gtk; then mkdir ./src/gtk; fi
345 @if test ! -d ./src/motif; then mkdir ./src/motif; fi
346 @if test ! -d ./src/motif/xmcombo; then mkdir ./src/motif/xmcombo; fi
347 @if test ! -d ./src/generic; then mkdir ./src/generic; fi
348 @if test ! -d ./src/unix; then mkdir ./src/unix; fi
349 @if test ! -d ./src/html; then mkdir ./src/html; fi
350 @if test ! -d ./src/png; then mkdir ./src/png; fi
351 @if test ! -d ./src/jpeg; then mkdir ./src/jpeg; fi
352 @if test ! -d ./src/zlib; then mkdir ./src/zlib; fi
8e877c19 353
48b1d0ff 354@WX_LIBRARY_NAME_STATIC@: $(OBJECTS)
2aa88730
RR
355 $(AR) $(AROPTIONS) ./lib/$@ $(OBJECTS)
356 $(RANLIB) ./lib/$@
f56b8330 357
48b1d0ff 358@WX_LIBRARY_NAME_SHARED@: $(OBJECTS)
2aa88730 359 $(SHARED_LD) ./lib/$@ $(OBJECTS) $(EXTRALIBS)
48b1d0ff
RR
360
361CREATE_LINKS: $(OBJECTS)
2aa88730
RR
362 @if test -e ./lib/@WX_LIBRARY_LINK1@; then rm -f ./lib/@WX_LIBRARY_LINK1@; fi
363 @if test -e ./lib/@WX_LIBRARY_LINK2@; then rm -f ./lib/@WX_LIBRARY_LINK2@; fi
364 @if test -e ./lib/@WX_LIBRARY_LINK3@; then rm -f ./lib/@WX_LIBRARY_LINK3@; fi
365 $(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK1@
366 $(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK2@
367 $(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK3@
48b1d0ff 368
f56b8330
RR
369$(OBJECTS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h
370
371parser.o: parser.c lexer.c
372 $(CCLEX) -c $(CFLAGS) -o $@ parser.c
373
374parser.c: $(COMMDIR)/parser.y lexer.c
375 $(YACC) $(COMMDIR)/parser.y
376 @sed -e "s;$(COMMDIR)/y.tab.c;parser.y;g" < y.tab.c | \
377 sed -e "s/BUFSIZ/5000/g" | \
378 sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
379 sed -e "s/yy/PROIO_yy/g" | \
380 sed -e "s/input/PROIO_input/g" | \
381 sed -e "s/unput/PROIO_unput/g" > parser.c
382 @$(RM) y.tab.c
383
384lexer.c: $(COMMDIR)/lexer.l
385 $(LEX) $(COMMDIR)/lexer.l
386 @sed -e "s;$(COMMDIR)/lex.yy.c;lexer.l;g" < lex.yy.c | \
387 sed -e "s/yy/PROIO_yy/g" | \
388 sed -e "s/input/PROIO_input/g" | \
389 sed -e "s/unput/PROIO_unput/g" > lexer.c
390 @$(RM) lex.yy.c
391
48b1d0ff 392samples: $(OBJECTS)
2aa88730
RR
393 @if test ! -e ./samples/dialog/dialog.cpp; \
394 then cp -f -r $(WXDIR)/samples .; \
48b1d0ff
RR
395 fi
396
2aa88730
RR
397install: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx-config $(top_builddir)/setup.h
398
399 $(INSTALL_SCRIPT) $(top_builddir)/wx-config $(bindir)/wx-config
400 $(INSTALL_PROGRAM) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(libdir)/@WX_TARGET_LIBRARY@
401
402 @if test ! -d $(libdir)/wx; then mkdir $(libdir)/wx; fi
403 @if test ! -d $(libdir)/wx/include; then mkdir $(libdir)/wx/include; fi
404 @if test ! -d $(libdir)/wx/include/wx; then mkdir $(libdir)/wx/include/wx; fi
405 @if test ! -d $(libdir)/wx/include/wx/@TOOLKIT_DIR@; then mkdir $(libdir)/wx/include/wx/@TOOLKIT_DIR@; fi
406 $(INSTALL_DATA) $(top_builddir)/setup.h $(libdir)/wx/include/wx/@TOOLKIT_DIR@
407
408 @if test ! -d $(includedir)/wx; then mkdir $(includedir)/wx; fi
409 @if test ! -d $(includedir)/wx/gtk; then mkdir $(includedir)/wx/gtk; fi
410 @if test ! -d $(includedir)/wx/motif; then mkdir $(includedir)/wx/motif; fi
411 @if test ! -d $(includedir)/wx/html; then mkdir $(includedir)/wx/html; fi
412 @if test ! -d $(includedir)/wx/protocol; then mkdir $(includedir)/wx/protocol; fi
413 @if test ! -d $(includedir)/wx/unix; then mkdir $(includedir)/wx/unix; fi
414 @if test ! -d $(includedir)/wx/generic; then mkdir $(includedir)/wx/generic; fi
415 @list='$(HEADERS)'; for p in $$list; do \
416 echo '$(INSTALL_DATA) $(top_srcdir)/include/wx/$$p $(includedir)/wx/$$p;' \
417 $(INSTALL_DATA) $(top_srcdir)/include/wx/$$p $(includedir)/wx/$$p; \
418 @done
419
420uninstall:
421 rm -f $(bindir)/wx-config
422 rm -f $(libdir)/@WX_TARGET_LIBRARY@
423 rm -f -r -d $(libdir)/wx
424 rm -f -r -d $(includedir)/wx
23a54e14 425
f56b8330 426clean:
2aa88730
RR
427 rm -f ./src/msw/*.o
428 rm -f ./src/gtk/*.o
429 rm -f ./src/motif/*.o
430 rm -f ./src/html/*.o
431 rm -f ./src/common/*.o
432 rm -f ./src/unix/*.o
433 rm -f ./src/generic/*.o
f56b8330 434 rm -f *.o
f56b8330
RR
435 rm -f parser.c
436 rm -f lexer.c
2aa88730 437 rm -f ./lib/*
f56b8330
RR
438
439cleanall: clean