]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/unx.t
make install, make uninstall and wx-coonfig work again.
[wxWidgets.git] / distrib / msw / tmake / unx.t
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/;
20 $project{"WXGTK_GENERICOBJS"} .= "src/generic/" . $file . " "
21 }
22
23 #! now transform these hashes into $project tags
24 foreach $file (sort keys %wxGeneric) {
25 next if $wxCommon{$file} =~ /\bX\b/;
26
27 $file =~ s/cp?p?$/\o/;
28 $project{"WXMOTIF_GENERICOBJS"} .= "src/generic/" . $file . " "
29 }
30
31 foreach $file (sort keys %wxCommon) {
32 next if $wxCommon{$file} =~ /\bR\b/;
33
34 $file =~ s/cp?p?$/\o/;
35 $project{"WXGTK_COMMONOBJS"} .= "src/common/" . $file . " "
36 }
37
38 foreach $file (sort keys %wxCommon) {
39 next if $wxCommon{$file} =~ /\bX\b/;
40
41 $file =~ s/cp?p?$/\o/;
42 $project{"WXMOTIF_COMMONOBJS"} .= "src/common/" . $file . " "
43 }
44
45 foreach $file (sort keys %wxGTK) {
46 $file =~ s/cp?p?$/\o/;
47 $project{"WXGTK_GUIOBJS"} .= "src/gtk/" . $file . " "
48 }
49
50 foreach $file (sort keys %wxMOTIF) {
51 $file =~ s/cp?p?$/\o/;
52 $project{"WXMOTIF_GUIOBJS"} .= "src/motif/" . $file . " "
53 }
54
55 foreach $file (sort keys %wxHTML) {
56 $file =~ s/cp?p?$/\o/;
57 $project{"WXHTMLOBJS"} .= "src/html/" . $file . " "
58 }
59
60 foreach $file (sort keys %wxUNIX) {
61 $file =~ s/cp?p?$/\o/;
62 $project{"WXUNIXOBJS"} .= "src/unix/" . $file . " "
63 }
64
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 }
92 #$}
93 #
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
108 ###################################################################
109
110 include ./src/make.env
111
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
126 ########################### Paths #################################
127
128 srcdir = @srcdir@
129
130 VPATH = :@top_srcdir@
131
132 top_srcdir = @top_srcdir@
133 prefix = @prefix@
134 exec_prefix = @exec_prefix@
135
136 bindir = @bindir@
137 sbindir = @sbindir@
138 libexecdir = @libexecdir@
139 datadir = @datadir@
140 sysconfdir = @sysconfdir@
141 sharedstatedir = @sharedstatedir@
142 localstatedir = @localstatedir@
143 libdir = @libdir@
144 infodir = @infodir@
145 mandir = @mandir@
146 includedir = @includedir@
147 oldincludedir = /usr/include
148
149 DESTDIR =
150
151 pkgdatadir = $(datadir)/@PACKAGE@
152 pkglibdir = $(libdir)/@PACKAGE@
153 pkgincludedir = $(includedir)/@PACKAGE@
154
155 top_builddir = .
156
157 INSTALL = @INSTALL@
158 INSTALL_PROGRAM = @INSTALL_PROGRAM@
159 INSTALL_DATA = @INSTALL_DATA@
160 INSTALL_SCRIPT = @INSTALL_SCRIPT@
161 transform = @program_transform_name@
162
163 NORMAL_INSTALL = :
164 PRE_INSTALL = :
165 POST_INSTALL = :
166 NORMAL_UNINSTALL = :
167 PRE_UNINSTALL = :
168 POST_UNINSTALL = :
169 build_alias = @build_alias@
170 build_triplet = @build@
171 host_alias = @host_alias@
172 host_triplet = @host@
173 target_alias = @target_alias@
174 target_triplet = @target@
175
176 ############################# Dirs #################################
177
178 WXDIR = $(top_srcdir)
179
180 # Subordinate library possibilities
181
182 GENDIR = $(WXDIR)/src/generic
183 COMMDIR = $(WXDIR)/src/common
184 HTMLDIR = $(WXDIR)/src/html
185 UNIXDIR = $(WXDIR)/src/unix
186 PNGDIR = $(WXDIR)/src/png
187 JPEGDIR = $(WXDIR)/src/jpeg
188 ZLIBDIR = $(WXDIR)/src/zlib
189 GTKDIR = $(WXDIR)/src/gtk
190 MOTIFDIR = $(WXDIR)/src/motif
191 INCDIR = $(WXDIR)/include
192
193 DOCDIR = $(WXDIR)/docs
194
195 ############################## Files ##################################
196
197 WX_HEADERS = \
198 #$ ExpandList("WX_HEADERS");
199
200 GTK_HEADERS = \
201 #$ ExpandList("WXGTK_HEADERS");
202
203 MOTIF_HEADERS = \
204 #$ ExpandList("WXMOTIF_HEADERS");
205
206 UNIX_HEADERS = \
207 #$ ExpandList("WXUNIX_HEADERS");
208
209 GENERIC_HEADERS = \
210 #$ ExpandList("WXGENERIC_HEADERS");
211
212 PROTOCOL_HEADERS = \
213 #$ ExpandList("WXPROTOCOL_HEADERS");
214
215 HTML_HEADERS = \
216 #$ ExpandList("WXHTML_HEADERS");
217
218 GTK_GENERICOBJS = \
219 #$ ExpandList("WXGTK_GENERICOBJS");
220
221 GTK_COMMONOBJS = \
222 parser.o \
223 #$ ExpandList("WXGTK_COMMONOBJS");
224
225 GTK_GUIOBJS = \
226 #$ ExpandList("WXGTK_GUIOBJS");
227
228 MOTIF_GENERICOBJS = \
229 #$ ExpandList("WXMOTIF_GENERICOBJS");
230
231 MOTIF_COMMONOBJS = \
232 parser.o \
233 #$ ExpandList("WXMOTIF_COMMONOBJS");
234
235 MOTIF_GUIOBJS = \
236 src/motif/xmcombo/xmcombo.o \
237 #$ ExpandList("WXMOTIF_GUIOBJS");
238
239 HTMLOBJS = \
240 #$ ExpandList("WXHTMLOBJS");
241
242 UNIXOBJS = \
243 #$ ExpandList("WXUNIXOBJS");
244
245 ZLIBOBJS = \
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
260
261 PNGOBJS = \
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
277
278
279 JPEGOBJS = \
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
326
327
328 OBJECTS = $(@GUIOBJS@) $(@COMMONOBJS@) $(@GENERICOBJS@) $(HTMLOBJS) $(UNIXOBJS) \
329 $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS)
330
331 HEADERS = $(@GUIHEADERS@) $(HTML_HEADERS) $(UNIX_HEADERS) $(PROTOCOL_HEADERS) \
332 $(GENERIC_HEADERS) $(WX_HEADERS)
333
334 REQUIRED_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
337
338 all: $(REQUIRED_DIRS) $(OBJECTS) @WX_TARGET_LIBRARY@ @WX_CREATE_LINKS@
339
340 $(REQUIRED_DIRS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h
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
353
354 @WX_LIBRARY_NAME_STATIC@: $(OBJECTS)
355 $(AR) $(AROPTIONS) ./lib/$@ $(OBJECTS)
356 $(RANLIB) ./lib/$@
357
358 @WX_LIBRARY_NAME_SHARED@: $(OBJECTS)
359 $(SHARED_LD) ./lib/$@ $(OBJECTS) $(EXTRALIBS)
360
361 CREATE_LINKS: ./lib/@WX_TARGET_LIBRARY@
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@
368
369 CREATE_INSTALLED_LINKS: $(libdir)/@WX_TARGET_LIBRARY@
370 @if test -e $(libdir)/@WX_LIBRARY_LINK1@; then rm -f $(libdir)/@WX_LIBRARY_LINK1@; fi
371 @if test -e $(libdir)/@WX_LIBRARY_LINK2@; then rm -f $(libdir)/@WX_LIBRARY_LINK2@; fi
372 @if test -e $(libdir)/@WX_LIBRARY_LINK3@; then rm -f $(libdir)/@WX_LIBRARY_LINK3@; fi
373 $(LN_S) @WX_TARGET_LIBRARY@ $(libdir)/@WX_LIBRARY_LINK1@
374 $(LN_S) @WX_TARGET_LIBRARY@ $(libdir)/@WX_LIBRARY_LINK2@
375 $(LN_S) @WX_TARGET_LIBRARY@ $(libdir)/@WX_LIBRARY_LINK3@
376
377 $(OBJECTS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h
378
379 parser.o: parser.c lexer.c
380 $(CCLEX) -c $(CFLAGS) -o $@ parser.c
381
382 parser.c: $(COMMDIR)/parser.y lexer.c
383 $(YACC) $(COMMDIR)/parser.y
384 @sed -e "s;$(COMMDIR)/y.tab.c;parser.y;g" < y.tab.c | \
385 sed -e "s/BUFSIZ/5000/g" | \
386 sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
387 sed -e "s/yy/PROIO_yy/g" | \
388 sed -e "s/input/PROIO_input/g" | \
389 sed -e "s/unput/PROIO_unput/g" > parser.c
390 @$(RM) y.tab.c
391
392 lexer.c: $(COMMDIR)/lexer.l
393 $(LEX) $(COMMDIR)/lexer.l
394 @sed -e "s;$(COMMDIR)/lex.yy.c;lexer.l;g" < lex.yy.c | \
395 sed -e "s/yy/PROIO_yy/g" | \
396 sed -e "s/input/PROIO_input/g" | \
397 sed -e "s/unput/PROIO_unput/g" > lexer.c
398 @$(RM) lex.yy.c
399
400 samples: $(OBJECTS)
401 @if test ! -e ./samples/dialog/dialog.cpp; \
402 then cp -f -r $(WXDIR)/samples .; \
403 fi
404
405 preinstall: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx-config $(top_builddir)/setup.h
406 @echo " "
407 @echo " Installing wxWindows..."
408 @echo " "
409
410 $(INSTALL_SCRIPT) $(top_builddir)/wx-config $(bindir)/wx-config
411 $(INSTALL_PROGRAM) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(libdir)/@WX_TARGET_LIBRARY@
412
413 @if test ! -d $(libdir)/wx; then mkdir $(libdir)/wx; fi
414 @if test ! -d $(libdir)/wx/include; then mkdir $(libdir)/wx/include; fi
415 @if test ! -d $(libdir)/wx/include/wx; then mkdir $(libdir)/wx/include/wx; fi
416 @if test ! -d $(libdir)/wx/include/wx/@TOOLKIT_DIR@; then mkdir $(libdir)/wx/include/wx/@TOOLKIT_DIR@; fi
417 $(INSTALL_DATA) $(top_builddir)/setup.h $(libdir)/wx/include/wx/@TOOLKIT_DIR@/setup.h
418
419 @if test ! -d $(includedir)/wx; then mkdir $(includedir)/wx; fi
420 @if test ! -d $(includedir)/wx/gtk; then mkdir $(includedir)/wx/gtk; fi
421 @if test ! -d $(includedir)/wx/motif; then mkdir $(includedir)/wx/motif; fi
422 @if test ! -d $(includedir)/wx/html; then mkdir $(includedir)/wx/html; fi
423 @if test ! -d $(includedir)/wx/protocol; then mkdir $(includedir)/wx/protocol; fi
424 @if test ! -d $(includedir)/wx/unix; then mkdir $(includedir)/wx/unix; fi
425 @if test ! -d $(includedir)/wx/generic; then mkdir $(includedir)/wx/generic; fi
426 @list='$(HEADERS)'; for p in $$list; do \
427 $(INSTALL_DATA) $(top_srcdir)/include/wx/$$p $(includedir)/wx/$$p; \
428 echo "$(INSTALL_DATA) $(top_srcdir)/include/wx/$$p $(includedir)/wx/$$p"; \
429 done
430
431 write_message:
432 @echo " "
433 @echo " The installation of wxWindows is finished. On certain"
434 @echo " platforms (e.g. Linux, Solaris) you'll now have to run"
435 @echo " ldconfig if you installed a shared library."
436 @echo " "
437 @echo " wxWindows comes with no guarantees and doesn't claim"
438 @echo " to be suitable for any purpose."
439 @echo " "
440 @echo " Read the wxWindows Licence on licencing conditions."
441 @echo " "
442
443 install: preinstall @WX_CREATE_INSTALLED_LINKS@ write_message
444
445 uninstall:
446 @echo " "
447 @echo " Uninstalling wxWindows..."
448 @echo " "
449 @echo " Removing library..."
450 @rm -f $(libdir)/@WX_TARGET_LIBRARY@
451 @rm -f $(libdir)/@WX_LIBRARY_LINK1@
452 @rm -f $(libdir)/@WX_LIBRARY_LINK2@
453 @rm -f $(libdir)/@WX_LIBRARY_LINK3@
454 @echo " Removing helper files..."
455 @rm -f $(libdir)/wx/include/wx/@TOOLKIT_DIR@/setup.h
456 @rm -f $(bindir)/wx-config
457 @echo " Removing headers..."
458 @list='$(HEADERS)'; for p in $$list; do \
459 rm -f $(includedir)/wx/$$p; \
460 done
461 @echo " Removing directories..."
462 @if test -d $(libdir)/wx/include/wx/@TOOLKIT_DIR@; then rmdir $(libdir)/wx/include/wx/@TOOLKIT_DIR@; fi
463 @if test -d $(libdir)/wx/include/wx; then rmdir $(libdir)/wx/include/wx; fi
464 @if test -d $(libdir)/wx/include; then rmdir $(libdir)/wx/include; fi
465 @if test -d $(libdir)/wx; then rmdir $(libdir)/wx; fi
466 @if test -d $(includedir)/wx/gtk; then rmdir $(includedir)/wx/gtk; fi
467 @if test -d $(includedir)/wx/motif; then rmdir $(includedir)/wx/motif; fi
468 @if test -d $(includedir)/wx/html; then rmdir $(includedir)/wx/html; fi
469 @if test -d $(includedir)/wx/unix; then rmdir $(includedir)/wx/unix; fi
470 @if test -d $(includedir)/wx/generic; then rmdir $(includedir)/wx/generic; fi
471 @if test -d $(includedir)/wx/protocol; then rmdir $(includedir)/wx/protocol; fi
472 @if test -d $(includedir)/wx; then rmdir $(includedir)/wx; fi
473
474 clean:
475 rm -f ./src/msw/*.o
476 rm -f ./src/gtk/*.o
477 rm -f ./src/motif/*.o
478 rm -f ./src/html/*.o
479 rm -f ./src/common/*.o
480 rm -f ./src/unix/*.o
481 rm -f ./src/generic/*.o
482 rm -f ./src/png/*.o
483 rm -f ./src/jpeg/*.o
484 rm -f ./src/zlib/*.o
485 rm -f *.o
486 rm -f parser.c
487 rm -f lexer.c
488 rm -f ./lib/*
489
490 cleanall: clean