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 %wxGeneric) {
18 next if $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/;
20 $file =~ s/cp?p?$/obj/;
21 $project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " "
24 foreach $file (sort keys %wxHTML) {
25 next if $wxHTML{$file} =~ /\b16\b/;
27 $file =~ s/cp?p?$/obj/;
28 $project{"WXHTMLOBJS"} .= "\$(MSWDIR)\\" . $file . " "
31 foreach $file (sort keys %wxCommon) {
32 $isCFile = $file =~ /\.c$/;
33 $file =~ s/cp?p?$/obj/;
34 $obj = "\$(MSWDIR)\\" . $file . " ";
35 $project{"WXCOMMONOBJS"} .= $obj;
36 $project{"WXCOBJS"} .= $obj if $isCFile;
39 foreach $file (sort keys %wxMSW) {
40 next if $wxMSW{$file} =~ /\b16\b/;
42 #! if ( $file =~ /^automtn/ ) {
43 #! #! comment in old makefile.b32 seems to imply that this file can not
44 #! #! be compiled with Borland (leads to crash in oleauto sample)
45 #! No longer true, at least for BC++ 5.2
49 $isCFile = $file =~ /\.c$/;
51 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
52 $file =~ s/cp?p?$/obj/;
53 my $obj = "\$(MSWDIR)\\" . $file . " ";
55 $project{"WXMSWOBJS"} .= $obj;
57 #! remember that this file is in ole subdir
58 $project{"WXOLEOBJS"} .= $obj;
60 $project{"WXCOBJS"} .= $obj if $isCFile;
64 # This file was automatically generated by tmake at #$ Now()
65 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
69 # Author: Julian Smart
76 # Makefile : Builds wxWindows library wx.lib for MS Windows,
77 # and Borland C++ (32-bit).
80 !error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
84 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
88 THISDIR = $(WXDIR)\src\msw
90 # Set all these to 1 if you want to build a dynamic library
96 !include $(WXDIR)\src\makeb32.env
98 # Please set these according to the settings in wx_setup.h, so we can include
99 # the appropriate libraries in wx.lib
106 !if "$(USE_CTL3D)" == "1"
107 #Use WIN32S/WIN95 32 bit version ctl3d32.dll under win95 (Andre Beltman)
108 PERIPH_LIBS=$(WXDIR)\lib\ctl3d32.lib $(PERIPH_LIBS)
109 PERIPH_TARGET=ctl3d $(PERIPH_TARGET)
110 PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET)
113 #PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(WXDIR)\lib\tiff.lib $(PERIPH_LIBS)
115 PERIPH_TARGET=zlib png jpeg tiff regex $(PERIPH_TARGET)
116 PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff clean_regex $(PERIPH_CLEAN_TARGET)
122 LIBS= cw32mti import32 ole2w32 odbc32 zlib winpng jpeg tiff regex
133 DOCDIR = $(WXDIR)\docs
135 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
138 # $(MSWDIR)\colrdlgg.obj \
139 # $(MSWDIR)\fontdlgg.obj \
140 # $(MSWDIR)\helpxlp.obj \
141 # $(MSWDIR)\msgdlgg.obj \
142 # $(MSWDIR)\printps.obj \
143 # $(MSWDIR)\prntdlgg.obj \
144 # $(MSWDIR)\listctrl.obj \
145 # $(MSWDIR)\notebook.obj \
146 # $(MSWDIR)\treectrl.obj
149 $(MSWDIR)\y_tab.obj \
150 #$ ExpandList("WXCOMMONOBJS");
152 MSWOBJS = #$ ExpandList("WXMSWOBJS");
154 HTMLOBJS = #$ ExpandList("WXHTMLOBJS");
156 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
160 wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
166 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
168 tlib "$(LIBTARGET)" /P1024 @&&!
169 +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
174 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
176 -erase $(WXLIBDIR)\wx.dll
177 $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&!
181 $(PERIPH_LIBS) $(LIBS)
184 -erase $(WXLIBDIR)\version.res
185 brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc
186 implib -c $(LIBTARGET) $(WXLIBDIR)\wx.dll
190 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
191 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res
193 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
196 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
199 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
200 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
202 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
203 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
205 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
208 $_ = $project{"WXMSWOBJS"};
212 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
213 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
215 $text .= $_ . "\n\n";
219 ########################################################
220 # Common objects (always compiled)
223 $_ = $project{"WXCOMMONOBJS"};
227 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
230 $text .= $_ . "\n\n";
234 ########################################################
235 # Generic objects (not always compiled, depending on
236 # whether platforms have native implementations)
239 $_ = $project{"WXGENERICOBJS"};
245 $text .= $_ . "\n\n";
249 ########################################################
250 # HTML objects (always compiled)
253 $_ = $project{"WXHTMLOBJS"};
259 $text .= $_ . "\n\n";
276 make -f makefile.b32 all_execs
286 make -f makefile.b32 clean
291 make -f makefile.b32 lib
296 make -f makefile.b32 clean
306 make -f makefile.b32 clean
310 cd $(WXDIR)\src\regex
311 make -f makefile.b32 lib
315 cd $(WXDIR)\src\regex
316 make -f makefile.b32 clean
321 make -f makefile.b32 lib
326 make -f makefile.b32 clean
332 -H=$(WXDIR)\src\msw\wx32.csm
340 -w-hid # virtual function A hides virtual function B
344 -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff
345 -I$(WXDIR)\include\wx\msw\gnuwin32
347 -L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk
357 clean: $(PERIPH_CLEAN_TARGET)
359 -erase $(WXLIBDIR)\wx.dll
360 -erase $(WXLIBDIR)\wx.tds
361 -erase $(WXLIBDIR)\wx.il?
367 -erase ..\common\y_tab.c
368 -erase ..\common\lex_yy.c
374 docs: allhlp allhtml allpdfrtf
376 hlp: wxhlp portinghlp
377 wxhlp: $(DOCDIR)/winhelp/wx.hlp
378 prophlp: $(DOCDIR)/winhelp/prop.hlp
379 refhlp: $(DOCDIR)/winhelp/techref.hlp
380 rtf: $(DOCDIR)/winhelp/wx.rtf
381 proprtf: $(DOCDIR)/winhelp/prop.rtf
382 pdfrtf: $(DOCDIR)/pdf/wx.rtf
383 proppdfrtf: $(DOCDIR)/pdf/prop.rtf
384 refpdfrtf: $(DOCDIR)/pdf/techref.rtf
385 html: wxhtml portinghtml
386 wxhtml: $(DOCDIR)\html\wx\wx.htm
387 htmlhelp: $(DOCDIR)\html\wx\wx.chm
388 prophtml: $(DOCDIR)\html\proplist\prop.htm
390 wxps: $(WXDIR)\docs\ps\wx.ps
391 propps: $(WXDIR)\docs\ps\prop.ps
392 referencps: $(WXDIR)\docs\ps\referenc.ps
394 portinghtml: $(DOCDIR)\html\porting\port.htm
395 portingrtf: $(DOCDIR)/winhelp/porting.rtf
396 portinghlp: $(DOCDIR)/winhelp/porting.hlp
397 portingpdfrtf: $(DOCDIR)/pdf/porting.rtf
398 portingps: $(WXDIR)\docs\ps\porting.ps
400 allhlp: wxhlp portinghlp prophlp
401 cd $(WXDIR)\utils\dialoged\src
402 make -f makefile.b32 hlp
405 # cd $(WXDIR)\utils\wxhelp\src
406 # make -f makefile.b32 hlp
407 # cd $(WXDIR)\utils\tex2rtf\src
408 # make -f makefile.b32 hlp
409 # cd $(WXDIR)\utils\wxgraph\src
410 # make -f makefile.b32 hlp
411 # cd $(WXDIR)\utils\wxchart\src
412 # make -f makefile.b32 hlp
413 # cd $(WXDIR)\utils\wxtree\src
414 # make -f makefile.b32 hlp
415 # cd $(WXDIR)\utils\wxbuild\src
416 # make -f makefile.b32 hlp
417 # cd $(WXDIR)\utils\wxgrid\src
418 # make -f makefile.b32 hlp
420 allhtml: wxhtml portinghtml prophtml
421 cd $(WXDIR)\utils\dialoged\src
422 make -f makefile.b32 html
425 # make -f makefile.b32 html
426 # cd $(WXDIR)\utils\dialoged\src
427 # make -f makefile.b32 html
428 # cd $(WXDIR)\utils\hytext\src
429 # make -f makefile.b32 html
430 # cd $(WXDIR)\utils\wxhelp\src
431 # make -f makefile.b32 html
432 # cd $(WXDIR)\utils\tex2rtf\src
433 # make -f makefile.b32 html
434 # cd $(WXDIR)\utils\wxgraph\src
435 # make -f makefile.b32 html
436 # cd $(WXDIR)\utils\wxchart\src
437 # make -f makefile.b32 html
438 # cd $(WXDIR)\utils\wxtree\src
439 # make -f makefile.b32 html
441 allps: wxps referencps portingps propps
442 cd $(WXDIR)\utils\dialoged\src
443 make -f makefile.b32 ps
446 allpdfrtf: pdfrtf portingpdfrtf proppdfrtf
447 cd $(WXDIR)\utils\dialoged\src
448 make -f makefile.b32 pdfrtf
451 # cd $(WXDIR)\utils\wxhelp\src
452 # make -f makefile.b32 ps
453 # cd $(WXDIR)\utils\tex2rtf\src
454 # make -f makefile.b32 ps
455 # cd $(WXDIR)\utils\wxgraph\src
456 # make -f makefile.b32 ps
457 # cd $(WXDIR)\utils\wxchart\src
458 # make -f makefile.b32 ps
459 # cd $(WXDIR)\utils\wxtree\src
460 # make -f makefile.b32 ps
463 $(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj
464 cd $(DOCDIR)/latex/wx
467 move wx.hlp $(DOCDIR)\winhelp\wx.hlp
468 move wx.cnt $(DOCDIR)\winhelp\wx.cnt
471 $(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOCDIR)/latex/porting/porting.hpj
472 cd $(DOCDIR)/latex/porting
475 move porting.hlp $(DOCDIR)\winhelp\porting.hlp
476 move porting.cnt $(DOCDIR)\winhelp\porting.cnt
479 $(DOCDIR)/winhelp/prop.hlp: $(DOCDIR)/latex/proplist/prop.rtf $(DOCDIR)/latex/proplist/prop.hpj
480 cd $(DOCDIR)/latex/proplist
483 move prop.hlp $(DOCDIR)\winhelp\prop.hlp
484 move prop.cnt $(DOCDIR)\winhelp\prop.cnt
487 $(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj
488 cd $(DOCDIR)/latex/techref
491 move techref.hlp $(DOCDIR)\winhelp\techref.hlp
492 move techref.cnt $(DOCDIR)\winhelp\techref.cnt
495 $(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
496 cd $(DOCDIR)\latex\wx
497 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/latex/wx/wx.rtf -twice -winhelp
500 $(DOCDIR)/latex/porting/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
501 cd $(DOCDIR)\latex\porting
502 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/latex/porting/porting.rtf -twice -winhelp
505 $(DOCDIR)/latex/proplist/prop.rtf: $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/body.tex $(DOCDIR)/latex/proplist/classes.tex $(DOCDIR)/latex/proplist/changes.tex
506 cd $(DOCDIR)\latex\proplist
507 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/prop.rtf -twice -winhelp
510 $(DOCDIR)/latex/techref/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
511 cd $(DOCDIR)\latex\techref
512 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/latex/techref/techref.rtf -twice -winhelp
515 $(DOCDIR)/pdf/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex
516 cd $(DOCDIR)\latex\wx
517 -copy *.wmf $(DOCDIR)\pdf
518 -copy *.bmp $(DOCDIR)\pdf
519 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/pdf/wx.rtf -twice -rtf
522 $(DOCDIR)/pdf/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
523 cd $(DOCDIR)\latex\porting
524 -copy *.wmf $(DOCDIR)\pdf
525 -copy *.bmp $(DOCDIR)\pdf
526 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/pdf/porting.rtf -twice -rtf
529 $(DOCDIR)/pdf/prop.rtf: $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/body.tex $(DOCDIR)/latex/proplist/classes.tex $(DOCDIR)/latex/proplist/changes.tex
530 cd $(DOCDIR)\latex\proplist
531 -copy *.wmf $(DOCDIR)\pdf
532 -copy *.bmp $(DOCDIR)\pdf
533 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/pdf/prop.rtf -twice -rtf
536 $(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
537 cd $(DOCDIR)\latex\techref
538 -copy *.wmf $(DOCDIR)\pdf
539 -copy *.bmp $(DOCDIR)\pdf
540 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/pdf/techref.rtf -twice -rtf
543 $(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
544 cd $(DOCDIR)\latex\wx
545 -mkdir $(DOCDIR)\html\wx
546 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html
547 -erase $(DOCDIR)\html\wx\*.con
548 -erase $(DOCDIR)\html\wx\*.ref
549 -erase $(DOCDIR)\latex\wx\*.con
550 -erase $(DOCDIR)\latex\wx\*.ref
553 $(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp
559 $(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex
560 cd $(DOCDIR)\latex\porting
561 -mkdir $(DOCDIR)\html\porting
562 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html
563 -erase $(DOCDIR)\html\porting\*.con
564 -erase $(DOCDIR)\html\porting\*.ref
565 -erase $(DOCDIR)\latex\porting\*.con
566 -erase $(DOCDIR)\latex\porting\*.ref
569 $(DOCDIR)\html\proplist\prop.htm: $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\latex\proplist\body.tex $(DOCDIR)\latex\proplist\classes.tex $(DOCDIR)\latex\proplist\changes.tex
570 cd $(DOCDIR)\latex\proplist
571 -mkdir $(DOCDIR)\html\proplist
572 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\html\proplist\prop.htm -twice -html
573 -erase $(DOCDIR)\html\proplist\*.con
574 -erase $(DOCDIR)\html\proplist\*.ref
575 -erase $(DOCDIR)\latex\proplist\*.con
576 -erase $(DOCDIR)\latex\proplist\*.ref
579 $(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex
580 cd $(WXDIR)\docs\latex\wx
589 $(WXDIR)\docs\latex\porting\porting.dvi: $(DOCDIR)/latex/porting/porting.tex
590 cd $(WXDIR)\docs\latex\porting
599 $(WXDIR)\docs\ps\wx.ps: $(WXDIR)\docs\latex\wx\manual.dvi
600 cd $(WXDIR)\docs\latex\wx
601 -dvips32 -o wx.ps manual
602 move wx.ps $(WXDIR)\docs\ps\wx.ps
605 $(WXDIR)\docs\ps\porting.ps: $(WXDIR)\docs\latex\porting\porting.dvi
606 cd $(WXDIR)\docs\latex\porting
607 -dvips32 -o porting.ps porting
608 move porting.ps $(WXDIR)\docs\ps\porting.ps
611 $(WXDIR)\docs\latex\wx\referenc.dvi: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/referenc.tex
612 cd $(WXDIR)\docs\latex\wx
621 $(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi
622 cd $(WXDIR)\docs\latex\wx
623 -dvips32 -o referenc.ps referenc
624 move referenc.ps $(WXDIR)\docs\ps\referenc.ps
627 # In order to force document reprocessing
629 -touch $(WXDIR)\docs\latex\wx\manual.tex
631 updatedocs: touchmanual alldocs
633 # Start Word, running the GeneratePDF macro. MakeManual.dot should be in the
634 # Office StartUp folder, and PDFMaker should be installed.
635 updatepdf: # touchmanual pdfrtf
636 start $(WAITFLAG) "winword d:\wx2\wxWindows\docs\latex\pdf\wx.rtf /mGeneratePDF"
640 # Can't use this or we'll have to distribute all tmake files with wxWindows
641 # makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
644 cd $(WXWIN)\distrib\msw\tmake
645 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
646 copy makefile.$(MFTYPE) $(WXWIN)\src\msw