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 $(PERIPH_TARGET)
116 PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff $(PERIPH_CLEAN_TARGET)
122 LIBS= cw32mti import32 ole2w32 odbc32 zlib winpng jpeg tiff
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
311 make -f makefile.b32 lib
316 make -f makefile.b32 clean
322 -H=$(WXDIR)\src\msw\wx32.csm
330 -w-hid # virtual function A hides virtual function B
334 -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff
335 -I$(WXDIR)\include\wx\msw\gnuwin32
337 -L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk
347 clean: $(PERIPH_CLEAN_TARGET)
349 -erase $(WXLIBDIR)\wx.dll
350 -erase $(WXLIBDIR)\wx.tds
351 -erase $(WXLIBDIR)\wx.il?
357 -erase ..\common\y_tab.c
358 -erase ..\common\lex_yy.c
364 docs: allhlp allhtml allpdfrtf
366 hlp: wxhlp portinghlp
367 wxhlp: $(DOCDIR)/winhelp/wx.hlp
368 prophlp: $(DOCDIR)/winhelp/prop.hlp
369 refhlp: $(DOCDIR)/winhelp/techref.hlp
370 rtf: $(DOCDIR)/winhelp/wx.rtf
371 proprtf: $(DOCDIR)/winhelp/prop.rtf
372 pdfrtf: $(DOCDIR)/pdf/wx.rtf
373 proppdfrtf: $(DOCDIR)/pdf/prop.rtf
374 refpdfrtf: $(DOCDIR)/pdf/techref.rtf
375 html: wxhtml portinghtml
376 wxhtml: $(DOCDIR)\html\wx\wx.htm
377 htmlhelp: $(DOCDIR)\html\wx\wx.chm
378 prophtml: $(DOCDIR)\html\proplist\prop.htm
380 wxps: $(WXDIR)\docs\ps\wx.ps
381 propps: $(WXDIR)\docs\ps\prop.ps
382 referencps: $(WXDIR)\docs\ps\referenc.ps
384 portinghtml: $(DOCDIR)\html\porting\port.htm
385 portingrtf: $(DOCDIR)/winhelp/porting.rtf
386 portinghlp: $(DOCDIR)/winhelp/porting.hlp
387 portingpdfrtf: $(DOCDIR)/pdf/porting.rtf
388 portingps: $(WXDIR)\docs\ps\porting.ps
390 allhlp: wxhlp portinghlp prophlp
391 cd $(WXDIR)\utils\dialoged\src
392 make -f makefile.b32 hlp
395 # cd $(WXDIR)\utils\wxhelp\src
396 # make -f makefile.b32 hlp
397 # cd $(WXDIR)\utils\tex2rtf\src
398 # make -f makefile.b32 hlp
399 # cd $(WXDIR)\utils\wxgraph\src
400 # make -f makefile.b32 hlp
401 # cd $(WXDIR)\utils\wxchart\src
402 # make -f makefile.b32 hlp
403 # cd $(WXDIR)\utils\wxtree\src
404 # make -f makefile.b32 hlp
405 # cd $(WXDIR)\utils\wxbuild\src
406 # make -f makefile.b32 hlp
407 # cd $(WXDIR)\utils\wxgrid\src
408 # make -f makefile.b32 hlp
410 allhtml: wxhtml portinghtml prophtml
411 cd $(WXDIR)\utils\dialoged\src
412 make -f makefile.b32 html
415 # make -f makefile.b32 html
416 # cd $(WXDIR)\utils\dialoged\src
417 # make -f makefile.b32 html
418 # cd $(WXDIR)\utils\hytext\src
419 # make -f makefile.b32 html
420 # cd $(WXDIR)\utils\wxhelp\src
421 # make -f makefile.b32 html
422 # cd $(WXDIR)\utils\tex2rtf\src
423 # make -f makefile.b32 html
424 # cd $(WXDIR)\utils\wxgraph\src
425 # make -f makefile.b32 html
426 # cd $(WXDIR)\utils\wxchart\src
427 # make -f makefile.b32 html
428 # cd $(WXDIR)\utils\wxtree\src
429 # make -f makefile.b32 html
431 allps: wxps referencps portingps propps
432 cd $(WXDIR)\utils\dialoged\src
433 make -f makefile.b32 ps
436 allpdfrtf: pdfrtf portingpdfrtf proppdfrtf
437 cd $(WXDIR)\utils\dialoged\src
438 make -f makefile.b32 pdfrtf
441 # cd $(WXDIR)\utils\wxhelp\src
442 # make -f makefile.b32 ps
443 # cd $(WXDIR)\utils\tex2rtf\src
444 # make -f makefile.b32 ps
445 # cd $(WXDIR)\utils\wxgraph\src
446 # make -f makefile.b32 ps
447 # cd $(WXDIR)\utils\wxchart\src
448 # make -f makefile.b32 ps
449 # cd $(WXDIR)\utils\wxtree\src
450 # make -f makefile.b32 ps
453 $(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj
454 cd $(DOCDIR)/latex/wx
457 move wx.hlp $(DOCDIR)\winhelp\wx.hlp
458 move wx.cnt $(DOCDIR)\winhelp\wx.cnt
461 $(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOCDIR)/latex/porting/porting.hpj
462 cd $(DOCDIR)/latex/porting
465 move porting.hlp $(DOCDIR)\winhelp\porting.hlp
466 move porting.cnt $(DOCDIR)\winhelp\porting.cnt
469 $(DOCDIR)/winhelp/prop.hlp: $(DOCDIR)/latex/proplist/prop.rtf $(DOCDIR)/latex/proplist/prop.hpj
470 cd $(DOCDIR)/latex/proplist
473 move prop.hlp $(DOCDIR)\winhelp\prop.hlp
474 move prop.cnt $(DOCDIR)\winhelp\prop.cnt
477 $(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj
478 cd $(DOCDIR)/latex/techref
481 move techref.hlp $(DOCDIR)\winhelp\techref.hlp
482 move techref.cnt $(DOCDIR)\winhelp\techref.cnt
485 $(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
486 cd $(DOCDIR)\latex\wx
487 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/latex/wx/wx.rtf -twice -winhelp
490 $(DOCDIR)/latex/porting/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
491 cd $(DOCDIR)\latex\porting
492 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/latex/porting/porting.rtf -twice -winhelp
495 $(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
496 cd $(DOCDIR)\latex\proplist
497 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/prop.rtf -twice -winhelp
500 $(DOCDIR)/latex/techref/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
501 cd $(DOCDIR)\latex\techref
502 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/latex/techref/techref.rtf -twice -winhelp
505 $(DOCDIR)/pdf/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex
506 cd $(DOCDIR)\latex\wx
507 -copy *.wmf $(DOCDIR)\pdf
508 -copy *.bmp $(DOCDIR)\pdf
509 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/pdf/wx.rtf -twice -rtf
512 $(DOCDIR)/pdf/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
513 cd $(DOCDIR)\latex\porting
514 -copy *.wmf $(DOCDIR)\pdf
515 -copy *.bmp $(DOCDIR)\pdf
516 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/pdf/porting.rtf -twice -rtf
519 $(DOCDIR)/pdf/prop.rtf: $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/body.tex $(DOCDIR)/latex/proplist/classes.tex $(DOCDIR)/latex/proplist/changes.tex
520 cd $(DOCDIR)\latex\proplist
521 -copy *.wmf $(DOCDIR)\pdf
522 -copy *.bmp $(DOCDIR)\pdf
523 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/pdf/prop.rtf -twice -rtf
526 $(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
527 cd $(DOCDIR)\latex\techref
528 -copy *.wmf $(DOCDIR)\pdf
529 -copy *.bmp $(DOCDIR)\pdf
530 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/pdf/techref.rtf -twice -rtf
533 $(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
534 cd $(DOCDIR)\latex\wx
535 -mkdir $(DOCDIR)\html\wx
536 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html
537 -erase $(DOCDIR)\html\wx\*.con
538 -erase $(DOCDIR)\html\wx\*.ref
539 -erase $(DOCDIR)\latex\wx\*.con
540 -erase $(DOCDIR)\latex\wx\*.ref
543 $(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp
549 $(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex
550 cd $(DOCDIR)\latex\porting
551 -mkdir $(DOCDIR)\html\porting
552 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html
553 -erase $(DOCDIR)\html\porting\*.con
554 -erase $(DOCDIR)\html\porting\*.ref
555 -erase $(DOCDIR)\latex\porting\*.con
556 -erase $(DOCDIR)\latex\porting\*.ref
559 $(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
560 cd $(DOCDIR)\latex\proplist
561 -mkdir $(DOCDIR)\html\proplist
562 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\html\proplist\prop.htm -twice -html
563 -erase $(DOCDIR)\html\proplist\*.con
564 -erase $(DOCDIR)\html\proplist\*.ref
565 -erase $(DOCDIR)\latex\proplist\*.con
566 -erase $(DOCDIR)\latex\proplist\*.ref
569 $(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex
570 cd $(WXDIR)\docs\latex\wx
579 $(WXDIR)\docs\latex\porting\porting.dvi: $(DOCDIR)/latex/porting/porting.tex
580 cd $(WXDIR)\docs\latex\porting
589 $(WXDIR)\docs\ps\wx.ps: $(WXDIR)\docs\latex\wx\manual.dvi
590 cd $(WXDIR)\docs\latex\wx
591 -dvips32 -o wx.ps manual
592 move wx.ps $(WXDIR)\docs\ps\wx.ps
595 $(WXDIR)\docs\ps\porting.ps: $(WXDIR)\docs\latex\porting\porting.dvi
596 cd $(WXDIR)\docs\latex\porting
597 -dvips32 -o porting.ps porting
598 move porting.ps $(WXDIR)\docs\ps\porting.ps
601 $(WXDIR)\docs\latex\wx\referenc.dvi: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/referenc.tex
602 cd $(WXDIR)\docs\latex\wx
611 $(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi
612 cd $(WXDIR)\docs\latex\wx
613 -dvips32 -o referenc.ps referenc
614 move referenc.ps $(WXDIR)\docs\ps\referenc.ps
617 # In order to force document reprocessing
619 -touch $(WXDIR)\docs\latex\wx\manual.tex
621 updatedocs: touchmanual alldocs
623 # Start Word, running the GeneratePDF macro. MakeManual.dot should be in the
624 # Office StartUp folder, and PDFMaker should be installed.
625 updatepdf: # touchmanual pdfrtf
626 start $(WAITFLAG) "winword d:\wx2\wxWindows\docs\latex\pdf\wx.rtf /mGeneratePDF"
630 # Can't use this or we'll have to distribute all tmake files with wxWindows
631 # makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
634 cd $(WXWIN)\distrib\msw\tmake
635 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
636 copy makefile.$(MFTYPE) $(WXWIN)\src\msw