1 #!#############################################################################
3 #! Purpose: tmake template file from which makefile.b32 is generated by running
4 #! tmake -t b32 wxwin.pro
5 #! Author: Vadim Zeitlin
8 #!#############################################################################
11 #! include the code which parses filelist.txt file and initializes
12 #! %wxCommon, %wxGeneric and %wxMSW hashes.
13 IncludeTemplate("filelist.t");
15 #! now transform these hashes into $project tags
16 foreach $file (sort keys %wxUNIV) {
17 next if $wxUNIV{$file} =~ /\T\b/;
19 $file =~ s/cp?p?$/obj/;
20 $obj = "\$(UNIVDIR)\\" . $file . " ";
21 $project{"WXUNIVOBJS"} .= "\$(MSWDIR)\\" . $file . " "
24 foreach $file (sort keys %wxUNIV) {
25 next unless $wxUNIV{$file} =~ /\T\b/;
27 $file =~ s/cp?p?$/obj/;
28 $obj = "\$(UNIVTHEMEDIR)\\" . $file . " ";
29 $project{"WXUNIVTHEMEOBJS"} .= "\$(MSWDIR)\\" . $file . " "
32 foreach $file (sort keys %wxHTML) {
33 next if $wxHTML{$file} =~ /\b16\b/;
35 $file =~ s/cp?p?$/obj/;
36 $project{"WXHTMLOBJS"} .= "\$(MSWDIR)\\" . $file . " "
39 foreach $file (sort keys %wxCommon) {
40 next if $wxCommon{$file} =~ /\b(16|U)\b/;
42 $isCFile = $file =~ /\.c$/;
43 $file =~ s/cp?p?$/obj/;
44 $obj = "\$(MSWDIR)\\" . $file . " ";
45 $project{"WXCOMMONOBJS"} .= $obj;
46 $project{"WXCOBJS"} .= $obj if $isCFile;
49 #! MSW dir for native port
50 foreach $file (sort keys %wxMSW) {
51 next if $wxMSW{$file} =~ /\b16\b/;
53 #! if ( $file =~ /^automtn/ ) {
54 #! #! comment in old makefile.b32 seems to imply that this file can not
55 #! #! be compiled with Borland (leads to crash in oleauto sample)
56 #! No longer true, at least for BC++ 5.2
60 $isCFile = $file =~ /\.c$/;
62 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
63 $file =~ s/cp?p?$/obj/;
64 my $obj = "\$(MSWDIR)\\" . $file . " ";
66 $project{"WXMSWOBJS"} .= $obj;
68 #! remember that this file is in ole subdir
69 $project{"WXOLEOBJS"} .= $obj;
71 $project{"WXCOBJS"} .= $obj if $isCFile;
74 #! Now do MSW dir for UNIV
75 foreach $file (sort keys %wxMSW) {
76 next unless $wxMSW{$file} =~ /\b(L|B)\b/;
78 #! if ( $file =~ /^automtn/ ) {
79 #! #! comment in old makefile.b32 seems to imply that this file can not
80 #! #! be compiled with Borland (leads to crash in oleauto sample)
81 #! No longer true, at least for BC++ 5.2
85 $isCFile = $file =~ /\.c$/;
87 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
88 $file =~ s/cp?p?$/obj/;
89 my $obj = "\$(MSWDIR)\\" . $file . " ";
91 $project{"WXMSWUNIVOBJS"} .= $obj;
93 #! remember that this file is in ole subdir
94 $project{"WXOLEUNIVOBJS"} .= $obj;
96 $project{"WXCUNIVOBJS"} .= $obj if $isCFile;
99 #! Generic Dir for Native Port
100 foreach $file (sort keys %wxGeneric) {
102 next if $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/;
104 $file =~ s/cp?p?$/obj/;
105 $project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " "
108 #! Generic Dir for UNIV Port
109 foreach $file (sort keys %wxGeneric) {
110 my $filereal = $file;
111 if ( $file =~ /^([^.]+)g.cpp$/ ) {
112 $filereal = "$1.cpp";
114 $file =~ s/cp?p?$/obj/;
115 $filereal =~ s/cp?p?$/obj/;
117 next if $project{"WXMSWUNIVOBJS"} =~ /\b$filereal\b/ ||
118 $project{"WXUNIVOBJS"} =~ /\b$filereal\b/;
121 $project{"WXGENERICUNIVOBJS"} .= "\$(MSWDIR)\\" . $file . " "
126 # This file was automatically generated by tmake
127 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
131 # Author: Julian Smart
138 # Makefile : Builds wxWindows library wx.lib for MS Windows,
139 # and Borland C++ (32-bit).
141 # BCCDIR now defined in ../makeb32.env
144 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
148 THISDIR = $(WXDIR)\src\msw
151 # Set all these to 1 if you want to build a dynamic library
157 !include $(WXDIR)\src\makeb32.env
159 # Please set these according to the settings in wx_setup.h, so we can include
160 # the appropriate libraries in wx.lib
167 !if "$(USE_CTL3D)" == "1"
168 #Use WIN32S/WIN95 32 bit version ctl3d32.dll under win95 (Andre Beltman)
169 PERIPH_LIBS=$(WXDIR)\lib\ctl3d32.lib $(PERIPH_LIBS)
170 PERIPH_TARGET=ctl3d $(PERIPH_TARGET)
171 PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET)
174 #PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(WXDIR)\lib\tiff.lib $(PERIPH_LIBS)
176 PERIPH_TARGET=zlib png jpeg tiff regex $(PERIPH_TARGET)
177 PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff clean_regex $(PERIPH_CLEAN_TARGET)
183 LIBS= cw32mti import32 ole2w32 odbc32 zlib winpng jpeg tiff regex
193 UNIVTHEMEDIR=..\univ\themes
196 DOCDIR = $(WXDIR)\docs
198 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
200 MSWOBJS = #$ ExpandList("WXMSWOBJS");
202 GENERICUNIVOBJS= #$ ExpandList("WXGENERICUNIVOBJS");
204 MSWUNIVOBJS = #$ ExpandList("WXMSWUNIVOBJS");
206 UNIVOBJS = #$ ExpandList("WXUNIVOBJS");
208 UNIVTHEMEOBJS = #$ ExpandList("WXUNIVTHEMEOBJS");
210 HTMLOBJS = #$ ExpandList("WXHTMLOBJS");
213 #$ ExpandList("WXCOMMONOBJS");
215 !if "$(WXUSINGUNIV)" == "1"
216 OBJECTS = $(COMMONOBJS) $(GENERICUNIVOBJS) $(MSWUNIVOBJS) $(HTMLOBJS) $(UNIVOBJS) $(UNIVTHEMEOBJS)
218 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
223 wx: $(ARCHINCDIR)\wx makesetuph makearchsetuph $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
227 # Copy the in-CVS setup0.h to setup.h if necessary
229 cd $(WXDIR)\include\wx\msw
230 if not exist setup.h copy setup0.h setup.h
233 # Copy include\wx\msw\setup.h to the architecture-specific location
235 copy $(SETUPSRCDIR)\setup.h $(ARCHSETUPH)
240 -mkdir $(ARCHINCDIR)\wx
245 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
247 tlib "$(LIBTARGET)" /P1024 $(LINKDEBUGFLAGS) @&&!
248 +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
253 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
256 $(LINK) $(LINK_FLAGS) $(LINKDEBUGFLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk @&&!
260 $(PERIPH_LIBS) $(LIBS)
263 implib -c $(LIBTARGET) $(WXDLL)
266 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
267 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res
270 brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc
272 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
274 !if "$(WXUSINGUNIV)" == "1"
275 ########################################################
276 # MSW objects (compile Native or UNIV) - UNIV
279 $_ = $project{"WXMSWUNIVOBJS"};
283 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
284 $suffix = $project{"WXCUNIVOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
286 $text .= $_ . "\n\n";
292 ########################################################
293 # MSW objects (compile Native or UNIV) - Native
296 $_ = $project{"WXMSWOBJS"};
300 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
301 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
303 $text .= $_ . "\n\n";
308 !if "$(WXUSINGUNIV)" == "1"
309 ########################################################
312 $_ = $project{"WXUNIVOBJS"};
318 $text .= $_ . "\n\n";
323 ########################################################
327 $_ = $project{"WXUNIVTHEMEOBJS"};
331 s/MSWDIR/UNIVTHEMEDIR/;
333 $text .= $_ . "\n\n";
339 ########################################################
340 # Common objects (always compiled)
343 $_ = $project{"WXCOMMONOBJS"};
347 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
350 $text .= $_ . "\n\n";
354 !if "$(WXUSINGUNIV)" == "1"
355 ########################################################
356 # Generic objects (not always compiled, depending on
357 # whether platforms have native implementations)
362 $_ = $project{"WXGENERICUNIVOBJS"};
368 $text .= $_ . "\n\n";
373 ########################################################
374 # Generic objects (not always compiled, depending on
375 # whether platforms have native implementations)
379 $_ = $project{"WXGENERICOBJS"};
385 $text .= $_ . "\n\n";
390 ########################################################
391 # HTML objects (always compiled)
394 $_ = $project{"WXHTMLOBJS"};
400 $text .= $_ . "\n\n";
407 ${MAKE} -f makefile.b32
412 ${MAKE} -f makefile.b32
417 ${MAKE} -f makefile.b32 all_execs
422 ${MAKE} -f makefile.b32 FINAL=$(FINAL)
427 ${MAKE} -f makefile.b32 clean
432 ${MAKE} -f makefile.b32 FINAL=$(FINAL) lib
437 ${MAKE} -f makefile.b32 clean
442 ${MAKE} -f makefile.b32 FINAL=$(FINAL)
447 ${MAKE} -f makefile.b32 clean
451 cd $(WXDIR)\src\regex
452 ${MAKE} -f makefile.b32 FINAL=$(FINAL) lib
456 cd $(WXDIR)\src\regex
457 ${MAKE} -f makefile.b32 clean
462 ${MAKE} -f makefile.b32 FINAL=$(FINAL) lib
467 ${MAKE} -f makefile.b32 clean
473 -H=$(WXDIR)\src\msw\wx32.csm
481 -w-hid # virtual function A hides virtual function B
484 -I$(ARCHINCDIR);$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff
485 -I$(WXDIR)\include\wx\msw\gnuwin32
487 -L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk
497 clean: $(PERIPH_CLEAN_TARGET)
498 -erase $(WXLIBDIR)\wx.tds
499 -erase $(WXLIBDIR)\wx.il?
509 docs: allhlp allhtml allpdfrtf
511 hlp: wxhlp portinghlp
512 wxhlp: $(DOCDIR)/winhelp/wx.hlp
513 refhlp: $(DOCDIR)/winhelp/techref.hlp
514 rtf: $(DOCDIR)/winhelp/wx.rtf
515 pdfrtf: $(DOCDIR)/pdf/wx.rtf
516 refpdfrtf: $(DOCDIR)/pdf/techref.rtf
517 html: wxhtml portinghtml
518 wxhtml: $(DOCDIR)\html\wx\wx.htm
519 htmlhelp: $(DOCDIR)\html\wx\wx.chm
521 wxps: $(WXDIR)\docs\ps\wx.ps
522 referencps: $(WXDIR)\docs\ps\referenc.ps
524 portinghtml: $(DOCDIR)\html\porting\port.htm
525 portingrtf: $(DOCDIR)/winhelp/porting.rtf
526 portinghlp: $(DOCDIR)/winhelp/porting.hlp
527 portingpdfrtf: $(DOCDIR)/pdf/porting.rtf
528 portingps: $(WXDIR)\docs\ps\porting.ps
530 allhlp: wxhlp portinghlp
531 cd $(WXDIR)\utils\dialoged\src
532 ${MAKE} -f makefile.b32 hlp
535 # cd $(WXDIR)\utils\wxhelp\src
536 # ${MAKE} -f makefile.b32 hlp
537 # cd $(WXDIR)\utils\tex2rtf\src
538 # ${MAKE} -f makefile.b32 hlp
539 # cd $(WXDIR)\utils\wxgraph\src
540 # ${MAKE} -f makefile.b32 hlp
541 # cd $(WXDIR)\utils\wxchart\src
542 # ${MAKE} -f makefile.b32 hlp
543 # cd $(WXDIR)\utils\wxtree\src
544 # ${MAKE} -f makefile.b32 hlp
545 # cd $(WXDIR)\utils\wxbuild\src
546 # ${MAKE} -f makefile.b32 hlp
547 # cd $(WXDIR)\utils\wxgrid\src
548 # ${MAKE} -f makefile.b32 hlp
550 allhtml: wxhtml portinghtml
551 cd $(WXDIR)\utils\dialoged\src
552 ${MAKE} -f makefile.b32 html
555 # ${MAKE} -f makefile.b32 html
556 # cd $(WXDIR)\utils\dialoged\src
557 # ${MAKE} -f makefile.b32 html
558 # cd $(WXDIR)\utils\hytext\src
559 # ${MAKE} -f makefile.b32 html
560 # cd $(WXDIR)\utils\wxhelp\src
561 # ${MAKE} -f makefile.b32 html
562 # cd $(WXDIR)\utils\tex2rtf\src
563 # ${MAKE} -f makefile.b32 html
564 # cd $(WXDIR)\utils\wxgraph\src
565 # ${MAKE} -f makefile.b32 html
566 # cd $(WXDIR)\utils\wxchart\src
567 # ${MAKE} -f makefile.b32 html
568 # cd $(WXDIR)\utils\wxtree\src
569 # ${MAKE} -f makefile.b32 html
571 allps: wxps referencps portingps
572 cd $(WXDIR)\utils\dialoged\src
573 ${MAKE} -f makefile.b32 ps
576 allpdfrtf: pdfrtf portingpdfrtf
577 cd $(WXDIR)\utils\dialoged\src
578 ${MAKE} -f makefile.b32 pdfrtf
581 # cd $(WXDIR)\utils\wxhelp\src
582 # ${MAKE} -f makefile.b32 ps
583 # cd $(WXDIR)\utils\tex2rtf\src
584 # ${MAKE} -f makefile.b32 ps
585 # cd $(WXDIR)\utils\wxgraph\src
586 # ${MAKE} -f makefile.b32 ps
587 # cd $(WXDIR)\utils\wxchart\src
588 # ${MAKE} -f makefile.b32 ps
589 # cd $(WXDIR)\utils\wxtree\src
590 # ${MAKE} -f makefile.b32 ps
593 $(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj
594 cd $(DOCDIR)/latex/wx
597 move wx.hlp $(DOCDIR)\winhelp\wx.hlp
598 move wx.cnt $(DOCDIR)\winhelp\wx.cnt
601 $(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOCDIR)/latex/porting/porting.hpj
602 cd $(DOCDIR)/latex/porting
605 move porting.hlp $(DOCDIR)\winhelp\porting.hlp
606 move porting.cnt $(DOCDIR)\winhelp\porting.cnt
609 $(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj
610 cd $(DOCDIR)/latex/techref
613 move techref.hlp $(DOCDIR)\winhelp\techref.hlp
614 move techref.cnt $(DOCDIR)\winhelp\techref.cnt
617 $(DOCDIR)/latex/wx/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex
618 cd $(DOCDIR)\latex\wx
619 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/latex/wx/wx.rtf -twice -winhelp
622 $(DOCDIR)/latex/porting/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
623 cd $(DOCDIR)\latex\porting
624 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/latex/porting/porting.rtf -twice -winhelp
627 $(DOCDIR)/latex/techref/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
628 cd $(DOCDIR)\latex\techref
629 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/latex/techref/techref.rtf -twice -winhelp
632 $(DOCDIR)/pdf/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex
633 cd $(DOCDIR)\latex\wx
634 -copy *.wmf $(DOCDIR)\pdf
635 -copy *.bmp $(DOCDIR)\pdf
636 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/pdf/wx.rtf -twice -rtf
639 $(DOCDIR)/pdf/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
640 cd $(DOCDIR)\latex\porting
641 -copy *.wmf $(DOCDIR)\pdf
642 -copy *.bmp $(DOCDIR)\pdf
643 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/pdf/porting.rtf -twice -rtf
646 $(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
647 cd $(DOCDIR)\latex\techref
648 -copy *.wmf $(DOCDIR)\pdf
649 -copy *.bmp $(DOCDIR)\pdf
650 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/pdf/techref.rtf -twice -rtf
653 $(DOCDIR)\html\wx\wx.htm: $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex\wx\body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)\latex\wx\manual.tex
654 cd $(DOCDIR)\latex\wx
655 -mkdir $(DOCDIR)\html\wx
656 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html
657 -erase $(DOCDIR)\html\wx\*.con
658 -erase $(DOCDIR)\html\wx\*.ref
659 -erase $(DOCDIR)\latex\wx\*.con
660 -erase $(DOCDIR)\latex\wx\*.ref
663 $(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp
669 $(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex
670 cd $(DOCDIR)\latex\porting
671 -mkdir $(DOCDIR)\html\porting
672 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html
673 -erase $(DOCDIR)\html\porting\*.con
674 -erase $(DOCDIR)\html\porting\*.ref
675 -erase $(DOCDIR)\latex\porting\*.con
676 -erase $(DOCDIR)\latex\porting\*.ref
679 $(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex
680 cd $(WXDIR)\docs\latex\wx
689 $(WXDIR)\docs\latex\porting\porting.dvi: $(DOCDIR)/latex/porting/porting.tex
690 cd $(WXDIR)\docs\latex\porting
699 $(WXDIR)\docs\ps\wx.ps: $(WXDIR)\docs\latex\wx\manual.dvi
700 cd $(WXDIR)\docs\latex\wx
701 -dvips32 -o wx.ps manual
702 move wx.ps $(WXDIR)\docs\ps\wx.ps
705 $(WXDIR)\docs\ps\porting.ps: $(WXDIR)\docs\latex\porting\porting.dvi
706 cd $(WXDIR)\docs\latex\porting
707 -dvips32 -o porting.ps porting
708 move porting.ps $(WXDIR)\docs\ps\porting.ps
711 $(WXDIR)\docs\latex\wx\referenc.dvi: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/referenc.tex
712 cd $(WXDIR)\docs\latex\wx
721 $(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi
722 cd $(WXDIR)\docs\latex\wx
723 -dvips32 -o referenc.ps referenc
724 move referenc.ps $(WXDIR)\docs\ps\referenc.ps
727 # In order to force document reprocessing
729 -touch $(WXDIR)\docs\latex\wx\manual.tex
731 updatedocs: touchmanual alldocs
733 # Start Word, running the GeneratePDF macro. MakeManual.dot should be in the
734 # Office StartUp folder, and PDFMaker should be installed.
735 updatepdf: # touchmanual pdfrtf
736 start $(WAITFLAG) "winword d:\wx2\wxWindows\docs\latex\pdf\wx.rtf /mGeneratePDF"
740 # Can't use this or we'll have to distribute all tmake files with wxWindows
741 # makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
744 cd $(WXWIN)\distrib\msw\tmake
745 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
746 copy makefile.$(MFTYPE) $(WXWIN)\src\msw