1 #!################################################################################
3 #! Purpose: tmake template file from which Makefile.in is generated by running
4 #! tmake -t unx wxwin.pro -o Makefile.in
5 #! Author: Vadim Zeitlin, Robert Roebling, Julian Smart
8 #!################################################################################
11 #! include the code which parses filelist.txt file and initializes
12 #! %wxCommon, %wxGeneric, %wxHtml, %wxUnix and %wxGTK hashes.
13 IncludeTemplate("filelist.t");
17 foreach $file (sort keys %wxGeneric) {
18 #! native wxDirDlg can't be compiled due to GnuWin32/OLE limitations,
19 #! so take the generic version
20 if ( $wxGeneric{$file} =~ /\b(PS|G|U|16)\b/ ) {
21 next unless $file =~ /^dirdlgg\./;
24 $file =~ s/cp?p?$/\o/;
25 $project{"WXMSW_GENERICOBJS"} .= "src/generic/" . $file . " "
28 foreach $file (sort keys %wxGeneric) {
29 next if $wxGeneric{$file} =~ /\bR\b/;
31 $file =~ s/cp?p?$/\o/;
32 $project{"WXGTK_GENERICOBJS"} .= "src/generic/" . $file . " "
35 foreach $file (sort keys %wxGeneric) {
36 next if $wxCommon{$file} =~ /\bX\b/;
38 $file =~ s/cp?p?$/\o/;
39 $project{"WXMOTIF_GENERICOBJS"} .= "src/generic/" . $file . " "
44 foreach $file (sort keys %wxCommon) {
45 next if $wxCommon{$file} =~ /\bR\b/;
47 $file =~ s/cp?p?$/\o/;
48 $project{"WXGTK_COMMONOBJS"} .= "src/common/" . $file . " "
51 foreach $file (sort keys %wxCommon) {
52 next if $wxCommon{$file} =~ /\bX\b/;
54 $file =~ s/cp?p?$/\o/;
55 $project{"WXMOTIF_COMMONOBJS"} .= "src/common/" . $file . " "
58 foreach $file (sort keys %wxCommon) {
59 next if $wxCommon{$file} =~ /\b(16)\b/;
61 #! needs extra files (sql*.h) so not compiled by default.
62 next if $file =~ /^odbc\./;
64 $file =~ s/cp?p?$/\o/;
65 $project{"WXMSW_COMMONOBJS"} .= "src/common/" . $file . " "
70 foreach $file (sort keys %wxMSW) {
71 #! Mingw32 doesn't have the OLE headers and has some troubles with
73 next if $wxMSW{$file} =~ /\b(O|16)\b/;
75 #! native wxDirDlg can't be compiled due to GnuWin32/OLE limitations,
76 next if $file =~ /^dirdlg\./;
78 $file =~ s/cp?p?$/\o/;
79 $project{"WXMSW_GUIOBJS"} .= "src/msw/" . $file . " "
82 foreach $file (sort keys %wxGTK) {
83 $file =~ s/cp?p?$/\o/;
84 $project{"WXGTK_GUIOBJS"} .= "src/gtk/" . $file . " "
87 foreach $file (sort keys %wxMOTIF) {
88 $file =~ s/cp?p?$/\o/;
89 $project{"WXMOTIF_GUIOBJS"} .= "src/motif/" . $file . " "
94 foreach $file (sort keys %wxHTML) {
95 $file =~ s/cp?p?$/\o/;
96 $project{"WXHTMLOBJS"} .= "src/html/" . $file . " "
99 foreach $file (sort keys %wxUNIX) {
100 $file =~ s/cp?p?$/\o/;
101 $project{"WXUNIXOBJS"} .= "src/unix/" . $file . " "
106 foreach $file (sort keys %wxWXINCLUDE) {
107 $project{"WX_HEADERS"} .= $file . " "
110 foreach $file (sort keys %wxGENERICINCLUDE) {
111 $project{"WXGENERIC_HEADERS"} .= "generic/" . $file . " "
114 foreach $file (sort keys %wxMOTIFINCLUDE) {
115 $project{"WXMOTIF_HEADERS"} .= "motif/" . $file . " "
118 foreach $file (sort keys %wxGTKINCLUDE) {
119 $project{"WXGTK_HEADERS"} .= "gtk/" . $file . " "
122 foreach $file (sort keys %wxMSWINCLUDE) {
123 $project{"WXMSW_HEADERS"} .= "msw/" . $file . " "
126 foreach $file (sort keys %wxHTMLINCLUDE) {
127 $project{"WXHTML_HEADERS"} .= "html/" . $file . " "
130 foreach $file (sort keys %wxUNIXINCLUDE) {
131 $project{"WXUNIX_HEADERS"} .= "unix/" . $file . " "
134 foreach $file (sort keys %wxPROTOCOLINCLUDE) {
135 $project{"WXPROTOCOL_HEADERS"} .= "protocol/" . $file . " "
139 # This file was automatically generated by tmake at #$ Now()
140 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T!
144 # Author: Julian Smart, Robert Roebling, Vadim Zeitlin
147 # Copyright:(c) 1993, AIAI, University of Edinburgh,
148 # Copyright:(c) 1999, Vadim Zeitlin
149 # Copyright:(c) 1999, Robert Roebling
151 # Makefile for libwx_gtk.a, libwx_motif.a and libwx_msw.a
153 ###################################################################
155 include ./src/make.env
157 ############## override make.env for PIC ##########################
159 # Clears all default suffixes
160 .SUFFIXES: .o .cpp .c .cxx
163 $(CCC) -c $(CFLAGS) $(PICFLAGS) -o $@ $<
166 $(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $<
169 $(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $<
171 ########################### Paths #################################
175 VPATH = :@top_srcdir@
177 top_srcdir = @top_srcdir@
179 exec_prefix = @exec_prefix@
183 libexecdir = @libexecdir@
185 sysconfdir = @sysconfdir@
186 sharedstatedir = @sharedstatedir@
187 localstatedir = @localstatedir@
191 includedir = @includedir@
192 oldincludedir = /usr/include
196 pkgdatadir = $(datadir)/@PACKAGE@
197 pkglibdir = $(libdir)/@PACKAGE@
198 pkgincludedir = $(includedir)/@PACKAGE@
203 INSTALL_PROGRAM = @INSTALL_PROGRAM@
204 INSTALL_DATA = @INSTALL_DATA@
205 INSTALL_SCRIPT = @INSTALL_SCRIPT@
206 transform = @program_transform_name@
214 build_alias = @build_alias@
215 build_triplet = @build@
216 host_alias = @host_alias@
217 host_triplet = @host@
218 target_alias = @target_alias@
219 target_triplet = @target@
221 ############################# Dirs #################################
223 WXDIR = $(top_srcdir)
225 # Subordinate library possibilities
227 GENDIR = $(WXDIR)/src/generic
228 COMMDIR = $(WXDIR)/src/common
229 HTMLDIR = $(WXDIR)/src/html
230 UNIXDIR = $(WXDIR)/src/unix
231 PNGDIR = $(WXDIR)/src/png
232 JPEGDIR = $(WXDIR)/src/jpeg
233 ZLIBDIR = $(WXDIR)/src/zlib
234 GTKDIR = $(WXDIR)/src/gtk
235 MOTIFDIR = $(WXDIR)/src/motif
236 MSWDIR = $(WXDIR)/src/msw
237 INCDIR = $(WXDIR)/include
239 DOCDIR = $(WXDIR)/docs
241 ########################## Archive name ###############################
243 WXARCHIVE = wx$(TOOLKIT)-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tgz
244 DISTDIR = ./_dist_dir/wx$(TOOLKIT)
246 ############################## Files ##################################
249 #$ ExpandList("WX_HEADERS");
252 #$ ExpandList("WXGTK_HEADERS");
255 #$ ExpandList("WXMOTIF_HEADERS");
258 #$ ExpandList("WXMSW_HEADERS");
261 #$ ExpandList("WXUNIX_HEADERS");
264 #$ ExpandList("WXGENERIC_HEADERS");
267 #$ ExpandList("WXPROTOCOL_HEADERS");
270 #$ ExpandList("WXHTML_HEADERS");
273 #$ ExpandList("WXGTK_GENERICOBJS");
277 #$ ExpandList("WXGTK_COMMONOBJS");
280 #$ ExpandList("WXGTK_GUIOBJS");
282 MOTIF_GENERICOBJS = \
283 #$ ExpandList("WXMOTIF_GENERICOBJS");
287 #$ ExpandList("WXMOTIF_COMMONOBJS");
290 src/motif/xmcombo/xmcombo.o \
291 #$ ExpandList("WXMOTIF_GUIOBJS");
294 #$ ExpandList("WXMSW_GENERICOBJS");
297 #$ ExpandList("WXMSW_COMMONOBJS");
300 #$ ExpandList("WXMSW_GUIOBJS");
303 #$ ExpandList("WXHTMLOBJS");
306 #$ ExpandList("WXUNIXOBJS");
310 src/zlib/compress.o \
318 src/zlib/infblock.o \
319 src/zlib/inftrees.o \
320 src/zlib/infcodes.o \
347 src/jpeg/jmemnobs.o \
348 src/jpeg/jcapimin.o \
349 src/jpeg/jcapistd.o \
352 src/jpeg/jdatadst.o \
354 src/jpeg/jcmaster.o \
355 src/jpeg/jcmarker.o \
356 src/jpeg/jcmainct.o \
357 src/jpeg/jcprepct.o \
358 src/jpeg/jccoefct.o \
360 src/jpeg/jcsample.o \
363 src/jpeg/jcdctmgr.o \
364 src/jpeg/jfdctfst.o \
365 src/jpeg/jfdctflt.o \
366 src/jpeg/jfdctint.o \
367 src/jpeg/jdapimin.o \
368 src/jpeg/jdapistd.o \
370 src/jpeg/jdatasrc.o \
371 src/jpeg/jdmaster.o \
373 src/jpeg/jdmarker.o \
376 src/jpeg/jdmainct.o \
377 src/jpeg/jdcoefct.o \
378 src/jpeg/jdpostct.o \
379 src/jpeg/jddctmgr.o \
380 src/jpeg/jidctfst.o \
381 src/jpeg/jidctflt.o \
382 src/jpeg/jidctint.o \
383 src/jpeg/jidctred.o \
384 src/jpeg/jdsample.o \
391 OBJECTS = $(@GUIOBJS@) $(@COMMONOBJS@) $(@GENERICOBJS@) $(@UNIXOBJS@) $(HTMLOBJS) \
392 $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS)
394 HEADERS = $(@GUIHEADERS@) $(HTML_HEADERS) $(UNIX_HEADERS) $(PROTOCOL_HEADERS) \
395 $(GENERIC_HEADERS) $(WX_HEADERS)
397 REQUIRED_DIRS = ./lib ./src ./src/common ./src/gtk ./src/motif ./src/msw \
398 ./src/generic ./src/unix ./src/motif/xmombo ./src/html \
399 ./src/zlib ./src/jpeg ./src/png
401 all: $(REQUIRED_DIRS) $(OBJECTS) @WX_TARGET_LIBRARY@ @WX_CREATE_LINKS@
403 $(REQUIRED_DIRS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h
404 @if test ! -d ./lib; then mkdir ./lib; fi
405 @if test ! -d ./src; then mkdir ./src; fi
406 @if test ! -d ./src/common; then mkdir ./src/common; fi
407 @if test ! -d ./src/msw; then mkdir ./src/msw; fi
408 @if test ! -d ./src/gtk; then mkdir ./src/gtk; fi
409 @if test ! -d ./src/motif; then mkdir ./src/motif; fi
410 @if test ! -d ./src/motif/xmcombo; then mkdir ./src/motif/xmcombo; fi
411 @if test ! -d ./src/generic; then mkdir ./src/generic; fi
412 @if test ! -d ./src/unix; then mkdir ./src/unix; fi
413 @if test ! -d ./src/html; then mkdir ./src/html; fi
414 @if test ! -d ./src/png; then mkdir ./src/png; fi
415 @if test ! -d ./src/jpeg; then mkdir ./src/jpeg; fi
416 @if test ! -d ./src/zlib; then mkdir ./src/zlib; fi
418 @WX_LIBRARY_NAME_STATIC@: $(OBJECTS)
419 $(AR) $(AROPTIONS) ./lib/$@ $(OBJECTS)
422 @WX_LIBRARY_NAME_SHARED@: $(OBJECTS)
423 $(SHARED_LD) ./lib/$@ $(OBJECTS) $(EXTRALIBS)
425 CREATE_LINKS: ./lib/@WX_TARGET_LIBRARY@
426 @if test -e ./lib/@WX_LIBRARY_LINK1@; then rm -f ./lib/@WX_LIBRARY_LINK1@; fi
427 @if test -e ./lib/@WX_LIBRARY_LINK2@; then rm -f ./lib/@WX_LIBRARY_LINK2@; fi
428 @if test -e ./lib/@WX_LIBRARY_LINK3@; then rm -f ./lib/@WX_LIBRARY_LINK3@; fi
429 $(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK1@
430 $(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK2@
431 $(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK3@
433 CREATE_INSTALLED_LINKS: $(libdir)/@WX_TARGET_LIBRARY@
434 @if test -e $(libdir)/@WX_LIBRARY_LINK1@; then rm -f $(libdir)/@WX_LIBRARY_LINK1@; fi
435 @if test -e $(libdir)/@WX_LIBRARY_LINK2@; then rm -f $(libdir)/@WX_LIBRARY_LINK2@; fi
436 @if test -e $(libdir)/@WX_LIBRARY_LINK3@; then rm -f $(libdir)/@WX_LIBRARY_LINK3@; fi
437 $(LN_S) @WX_TARGET_LIBRARY@ $(libdir)/@WX_LIBRARY_LINK1@
438 $(LN_S) @WX_TARGET_LIBRARY@ $(libdir)/@WX_LIBRARY_LINK2@
439 $(LN_S) @WX_TARGET_LIBRARY@ $(libdir)/@WX_LIBRARY_LINK3@
441 $(OBJECTS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h
443 parser.o: parser.c lexer.c
444 $(CCLEX) -c $(CFLAGS) -o $@ parser.c
446 parser.c: $(COMMDIR)/parser.y lexer.c
447 $(YACC) $(COMMDIR)/parser.y
448 @sed -e "s;$(COMMDIR)/y.tab.c;parser.y;g" < y.tab.c | \
449 sed -e "s/BUFSIZ/5000/g" | \
450 sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
451 sed -e "s/yy/PROIO_yy/g" | \
452 sed -e "s/input/PROIO_input/g" | \
453 sed -e "s/unput/PROIO_unput/g" > parser.c
456 lexer.c: $(COMMDIR)/lexer.l
457 $(LEX) $(COMMDIR)/lexer.l
458 @sed -e "s;$(COMMDIR)/lex.yy.c;lexer.l;g" < lex.yy.c | \
459 sed -e "s/yy/PROIO_yy/g" | \
460 sed -e "s/input/PROIO_input/g" | \
461 sed -e "s/unput/PROIO_unput/g" > lexer.c
464 preinstall: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx-config $(top_builddir)/setup.h
466 @echo " Installing wxWindows..."
469 $(INSTALL_SCRIPT) $(top_builddir)/wx-config $(bindir)/wx-config
470 $(INSTALL_PROGRAM) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(libdir)/@WX_TARGET_LIBRARY@
472 @if test ! -d $(libdir)/wx; then mkdir $(libdir)/wx; fi
473 @if test ! -d $(libdir)/wx/include; then mkdir $(libdir)/wx/include; fi
474 @if test ! -d $(libdir)/wx/include/wx; then mkdir $(libdir)/wx/include/wx; fi
475 @if test ! -d $(libdir)/wx/include/wx/@TOOLKIT_DIR@; then mkdir $(libdir)/wx/include/wx/@TOOLKIT_DIR@; fi
476 $(INSTALL_DATA) $(top_builddir)/setup.h $(libdir)/wx/include/wx/@TOOLKIT_DIR@/setup.h
478 @if test ! -d $(includedir)/wx; then mkdir $(includedir)/wx; fi
479 @if test ! -d $(includedir)/wx/msw; then mkdir $(includedir)/wx/msw; fi
480 @if test ! -d $(includedir)/wx/gtk; then mkdir $(includedir)/wx/gtk; fi
481 @if test ! -d $(includedir)/wx/motif; then mkdir $(includedir)/wx/motif; fi
482 @if test ! -d $(includedir)/wx/html; then mkdir $(includedir)/wx/html; fi
483 @if test ! -d $(includedir)/wx/protocol; then mkdir $(includedir)/wx/protocol; fi
484 @if test ! -d $(includedir)/wx/unix; then mkdir $(includedir)/wx/unix; fi
485 @if test ! -d $(includedir)/wx/generic; then mkdir $(includedir)/wx/generic; fi
486 @list='$(HEADERS)'; for p in $$list; do \
487 $(INSTALL_DATA) $(top_srcdir)/include/wx/$$p $(includedir)/wx/$$p; \
488 echo "$(INSTALL_DATA) $(top_srcdir)/include/wx/$$p $(includedir)/wx/$$p"; \
493 @echo " The installation of wxWindows is finished. On certain"
494 @echo " platforms (e.g. Linux, Solaris) you'll now have to run"
495 @echo " ldconfig if you installed a shared library."
497 @echo " wxWindows comes with no guarantees and doesn't claim"
498 @echo " to be suitable for any purpose."
500 @echo " Read the wxWindows Licence on licencing conditions."
503 install: preinstall @WX_CREATE_INSTALLED_LINKS@ write_message
507 @echo " Uninstalling wxWindows..."
509 @echo " Removing library..."
510 @rm -f $(libdir)/@WX_TARGET_LIBRARY@
511 @rm -f $(libdir)/@WX_LIBRARY_LINK1@
512 @rm -f $(libdir)/@WX_LIBRARY_LINK2@
513 @rm -f $(libdir)/@WX_LIBRARY_LINK3@
514 @echo " Removing helper files..."
515 @rm -f $(libdir)/wx/include/wx/@TOOLKIT_DIR@/setup.h
516 @rm -f $(bindir)/wx-config
517 @echo " Removing headers..."
518 @list='$(HEADERS)'; for p in $$list; do \
519 rm -f $(includedir)/wx/$$p; \
521 @echo " Removing directories..."
522 @if test -d $(libdir)/wx/include/wx/@TOOLKIT_DIR@; then rmdir $(libdir)/wx/include/wx/@TOOLKIT_DIR@; fi
523 @if test -d $(libdir)/wx/include/wx; then rmdir $(libdir)/wx/include/wx; fi
524 @if test -d $(libdir)/wx/include; then rmdir $(libdir)/wx/include; fi
525 @if test -d $(libdir)/wx; then rmdir $(libdir)/wx; fi
526 @if test -d $(includedir)/wx/gtk; then rmdir $(includedir)/wx/gtk; fi
527 @if test -d $(includedir)/wx/motif; then rmdir $(includedir)/wx/motif; fi
528 @if test -d $(includedir)/wx/motif; then rmdir $(includedir)/wx/msw; fi
529 @if test -d $(includedir)/wx/html; then rmdir $(includedir)/wx/html; fi
530 @if test -d $(includedir)/wx/unix; then rmdir $(includedir)/wx/unix; fi
531 @if test -d $(includedir)/wx/generic; then rmdir $(includedir)/wx/generic; fi
532 @if test -d $(includedir)/wx/protocol; then rmdir $(includedir)/wx/protocol; fi
533 @if test -d $(includedir)/wx; then rmdir $(includedir)/wx; fi
538 cp $(WXDIR)/wx$(TOOLKIT).spec $(DISTDIR)
539 cp $(WXDIR)/configure $(DISTDIR)
540 cp $(WXDIR)/config.sub $(DISTDIR)
541 cp $(WXDIR)/config.guess $(DISTDIR)
542 cp $(WXDIR)/install-sh $(DISTDIR)
543 cp $(WXDIR)/mkinstalldirs $(DISTDIR)
544 cp $(WXDIR)/wx-config.in $(DISTDIR)
545 cp $(WXDIR)/setup.h.in $(DISTDIR)
546 cp $(WXDIR)/Makefile.in $(DISTDIR)
547 cp $(DOCDIR)/lgpl.txt $(DISTDIR)/COPYING.LIB
548 cp $(DOCDIR)/licence.txt $(DISTDIR)/LICENCE.txt
549 cp $(DOCDIR)/symbols.txt $(DISTDIR)/SYMBOLS.txt
550 cp $(DOCDIR)/$(TOOLKITDIR)/install.txt $(DISTDIR)/INSTALL.txt
551 cp $(DOCDIR)/$(TOOLKITDIR)/changes.txt $(DISTDIR)/CHANGES.txt
552 cp $(DOCDIR)/$(TOOLKITDIR)/readme.txt $(DISTDIR)/README.txt
553 cp $(DOCDIR)/$(TOOLKITDIR)/todo.txt $(DISTDIR)/TODO.txt
554 mkdir $(DISTDIR)/include
555 mkdir $(DISTDIR)/include/wx
556 mkdir $(DISTDIR)/include/wx/$(TOOLKITDIR)
557 mkdir $(DISTDIR)/include/wx/generic
558 mkdir $(DISTDIR)/include/wx/html
559 mkdir $(DISTDIR)/include/wx/unix
560 mkdir $(DISTDIR)/include/wx/protocol
561 cp $(INCDIR)/wx/*.h $(DISTDIR)/include/wx
562 cp $(INCDIR)/wx/*.cpp $(DISTDIR)/include/wx
563 cp $(INCDIR)/wx/generic/*.h $(DISTDIR)/include/wx/generic
564 cp $(INCDIR)/wx/generic/*.xpm $(DISTDIR)/include/wx/generic
565 cp $(INCDIR)/wx/html/*.h $(DISTDIR)/include/wx/html
566 cp $(INCDIR)/wx/unix/*.h $(DISTDIR)/include/wx/unix
567 cp $(INCDIR)/wx/protocol/*.h $(DISTDIR)/include/wx/protocol
570 cp $(INCDIR)/wx/gtk/*.h $(DISTDIR)/include/wx/gtk
573 cp $(INCDIR)/wx/motif/*.h $(DISTDIR)/include/wx/motif
576 cp $(INCDIR)/wx/msw/*.h $(DISTDIR)/include/wx/msw
577 cp $(INCDIR)/wx/msw/*.cur $(DISTDIR)/include/wx/msw
578 cp $(INCDIR)/wx/msw/*.ico $(DISTDIR)/include/wx/msw
579 cp $(INCDIR)/wx/msw/*.bmp $(DISTDIR)/include/wx/msw
580 cp $(INCDIR)/wx/msw/*.rc $(DISTDIR)/include/wx/msw
582 dist: predist @GUIDIST@
583 cd _dist_dir; tar ch wx$(TOOLKIT) | gzip -f9 > $(WXARCHIVE); mv $(WXARCHIVE) ..
589 rm -f ./src/motif/*.o
591 rm -f ./src/common/*.o
593 rm -f ./src/generic/*.o