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)
162 all: all_libs all_execs
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
194 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
197 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
200 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
201 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
203 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
204 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
206 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
209 $_ = $project{"WXMSWOBJS"};
213 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
214 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
216 $text .= $_ . "\n\n";
220 ########################################################
221 # Common objects (always compiled)
224 $_ = $project{"WXCOMMONOBJS"};
228 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
231 $text .= $_ . "\n\n";
235 ########################################################
236 # Generic objects (not always compiled, depending on
237 # whether platforms have native implementations)
240 $_ = $project{"WXGENERICOBJS"};
246 $text .= $_ . "\n\n";
250 ########################################################
251 # HTML objects (always compiled)
254 $_ = $project{"WXHTMLOBJS"};
260 $text .= $_ . "\n\n";
277 make -f makefile.b32 all_execs
287 make -f makefile.b32 clean
292 make -f makefile.b32 lib
297 make -f makefile.b32 clean
307 make -f makefile.b32 clean
312 make -f makefile.b32 lib
317 make -f makefile.b32 clean
323 -H=$(WXDIR)\src\msw\wx32.csm
331 -w-hid # virtual function A hides virtual function B
335 -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff
336 -I$(WXDIR)\include\wx\msw\gnuwin32
338 -L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk
348 clean: $(PERIPH_CLEAN_TARGET)
350 -erase $(WXLIBDIR)\wx.dll
351 -erase $(WXLIBDIR)\wx.tds
352 -erase $(WXLIBDIR)\wx.il?
358 -erase ..\common\y_tab.c
359 -erase ..\common\lex_yy.c
365 docs: allhlp allhtml allpdfrtf
367 hlp: wxhlp portinghlp
368 wxhlp: $(DOCDIR)/winhelp/wx.hlp
369 prophlp: $(DOCDIR)/winhelp/prop.hlp
370 refhlp: $(DOCDIR)/winhelp/techref.hlp
371 rtf: $(DOCDIR)/winhelp/wx.rtf
372 proprtf: $(DOCDIR)/winhelp/prop.rtf
373 pdfrtf: $(DOCDIR)/pdf/wx.rtf
374 proppdfrtf: $(DOCDIR)/pdf/prop.rtf
375 refpdfrtf: $(DOCDIR)/pdf/techref.rtf
376 html: wxhtml portinghtml
377 wxhtml: $(DOCDIR)\html\wx\wx.htm
378 htmlhelp: $(DOCDIR)\html\wx\wx.chm
379 prophtml: $(DOCDIR)\html\proplist\prop.htm
381 wxps: $(WXDIR)\docs\ps\wx.ps
382 propps: $(WXDIR)\docs\ps\prop.ps
383 referencps: $(WXDIR)\docs\ps\referenc.ps
385 portinghtml: $(DOCDIR)\html\porting\port.htm
386 portingrtf: $(DOCDIR)/winhelp/porting.rtf
387 portinghlp: $(DOCDIR)/winhelp/porting.hlp
388 portingpdfrtf: $(DOCDIR)/pdf/porting.rtf
389 portingps: $(WXDIR)\docs\ps\porting.ps
391 allhlp: wxhlp portinghlp prophlp
392 cd $(WXDIR)\utils\dialoged\src
393 make -f makefile.b32 hlp
396 # cd $(WXDIR)\utils\wxhelp\src
397 # make -f makefile.b32 hlp
398 # cd $(WXDIR)\utils\tex2rtf\src
399 # make -f makefile.b32 hlp
400 # cd $(WXDIR)\utils\wxgraph\src
401 # make -f makefile.b32 hlp
402 # cd $(WXDIR)\utils\wxchart\src
403 # make -f makefile.b32 hlp
404 # cd $(WXDIR)\utils\wxtree\src
405 # make -f makefile.b32 hlp
406 # cd $(WXDIR)\utils\wxbuild\src
407 # make -f makefile.b32 hlp
408 # cd $(WXDIR)\utils\wxgrid\src
409 # make -f makefile.b32 hlp
411 allhtml: wxhtml portinghtml prophtml
412 cd $(WXDIR)\utils\dialoged\src
413 make -f makefile.b32 html
416 # make -f makefile.b32 html
417 # cd $(WXDIR)\utils\dialoged\src
418 # make -f makefile.b32 html
419 # cd $(WXDIR)\utils\hytext\src
420 # make -f makefile.b32 html
421 # cd $(WXDIR)\utils\wxhelp\src
422 # make -f makefile.b32 html
423 # cd $(WXDIR)\utils\tex2rtf\src
424 # make -f makefile.b32 html
425 # cd $(WXDIR)\utils\wxgraph\src
426 # make -f makefile.b32 html
427 # cd $(WXDIR)\utils\wxchart\src
428 # make -f makefile.b32 html
429 # cd $(WXDIR)\utils\wxtree\src
430 # make -f makefile.b32 html
432 allps: wxps referencps portingps propps
433 cd $(WXDIR)\utils\dialoged\src
434 make -f makefile.b32 ps
437 allpdfrtf: pdfrtf portingpdfrtf proppdfrtf
438 cd $(WXDIR)\utils\dialoged\src
439 make -f makefile.b32 pdfrtf
442 # cd $(WXDIR)\utils\wxhelp\src
443 # make -f makefile.b32 ps
444 # cd $(WXDIR)\utils\tex2rtf\src
445 # make -f makefile.b32 ps
446 # cd $(WXDIR)\utils\wxgraph\src
447 # make -f makefile.b32 ps
448 # cd $(WXDIR)\utils\wxchart\src
449 # make -f makefile.b32 ps
450 # cd $(WXDIR)\utils\wxtree\src
451 # make -f makefile.b32 ps
454 $(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj
455 cd $(DOCDIR)/latex/wx
458 move wx.hlp $(DOCDIR)\winhelp\wx.hlp
459 move wx.cnt $(DOCDIR)\winhelp\wx.cnt
462 $(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOCDIR)/latex/porting/porting.hpj
463 cd $(DOCDIR)/latex/porting
466 move porting.hlp $(DOCDIR)\winhelp\porting.hlp
467 move porting.cnt $(DOCDIR)\winhelp\porting.cnt
470 $(DOCDIR)/winhelp/prop.hlp: $(DOCDIR)/latex/proplist/prop.rtf $(DOCDIR)/latex/proplist/prop.hpj
471 cd $(DOCDIR)/latex/proplist
474 move prop.hlp $(DOCDIR)\winhelp\prop.hlp
475 move prop.cnt $(DOCDIR)\winhelp\prop.cnt
478 $(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj
479 cd $(DOCDIR)/latex/techref
482 move techref.hlp $(DOCDIR)\winhelp\techref.hlp
483 move techref.cnt $(DOCDIR)\winhelp\techref.cnt
486 $(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
487 cd $(DOCDIR)\latex\wx
488 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/latex/wx/wx.rtf -twice -winhelp
491 $(DOCDIR)/latex/porting/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
492 cd $(DOCDIR)\latex\porting
493 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/latex/porting/porting.rtf -twice -winhelp
496 $(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
497 cd $(DOCDIR)\latex\proplist
498 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/prop.rtf -twice -winhelp
501 $(DOCDIR)/latex/techref/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
502 cd $(DOCDIR)\latex\techref
503 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/latex/techref/techref.rtf -twice -winhelp
506 $(DOCDIR)/pdf/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex
507 cd $(DOCDIR)\latex\wx
508 -copy *.wmf $(DOCDIR)\pdf
509 -copy *.bmp $(DOCDIR)\pdf
510 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/pdf/wx.rtf -twice -rtf
513 $(DOCDIR)/pdf/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
514 cd $(DOCDIR)\latex\porting
515 -copy *.wmf $(DOCDIR)\pdf
516 -copy *.bmp $(DOCDIR)\pdf
517 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/pdf/porting.rtf -twice -rtf
520 $(DOCDIR)/pdf/prop.rtf: $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/body.tex $(DOCDIR)/latex/proplist/classes.tex $(DOCDIR)/latex/proplist/changes.tex
521 cd $(DOCDIR)\latex\proplist
522 -copy *.wmf $(DOCDIR)\pdf
523 -copy *.bmp $(DOCDIR)\pdf
524 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/pdf/prop.rtf -twice -rtf
527 $(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
528 cd $(DOCDIR)\latex\techref
529 -copy *.wmf $(DOCDIR)\pdf
530 -copy *.bmp $(DOCDIR)\pdf
531 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/pdf/techref.rtf -twice -rtf
534 $(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
535 cd $(DOCDIR)\latex\wx
536 -mkdir $(DOCDIR)\html\wx
537 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html
538 -erase $(DOCDIR)\html\wx\*.con
539 -erase $(DOCDIR)\html\wx\*.ref
540 -erase $(DOCDIR)\latex\wx\*.con
541 -erase $(DOCDIR)\latex\wx\*.ref
544 $(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp
550 $(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex
551 cd $(DOCDIR)\latex\porting
552 -mkdir $(DOCDIR)\html\porting
553 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html
554 -erase $(DOCDIR)\html\porting\*.con
555 -erase $(DOCDIR)\html\porting\*.ref
556 -erase $(DOCDIR)\latex\porting\*.con
557 -erase $(DOCDIR)\latex\porting\*.ref
560 $(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
561 cd $(DOCDIR)\latex\proplist
562 -mkdir $(DOCDIR)\html\proplist
563 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\html\proplist\prop.htm -twice -html
564 -erase $(DOCDIR)\html\proplist\*.con
565 -erase $(DOCDIR)\html\proplist\*.ref
566 -erase $(DOCDIR)\latex\proplist\*.con
567 -erase $(DOCDIR)\latex\proplist\*.ref
570 $(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex
571 cd $(WXDIR)\docs\latex\wx
580 $(WXDIR)\docs\latex\porting\porting.dvi: $(DOCDIR)/latex/porting/porting.tex
581 cd $(WXDIR)\docs\latex\porting
590 $(WXDIR)\docs\ps\wx.ps: $(WXDIR)\docs\latex\wx\manual.dvi
591 cd $(WXDIR)\docs\latex\wx
592 -dvips32 -o wx.ps manual
593 move wx.ps $(WXDIR)\docs\ps\wx.ps
596 $(WXDIR)\docs\ps\porting.ps: $(WXDIR)\docs\latex\porting\porting.dvi
597 cd $(WXDIR)\docs\latex\porting
598 -dvips32 -o porting.ps porting
599 move porting.ps $(WXDIR)\docs\ps\porting.ps
602 $(WXDIR)\docs\latex\wx\referenc.dvi: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/referenc.tex
603 cd $(WXDIR)\docs\latex\wx
612 $(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi
613 cd $(WXDIR)\docs\latex\wx
614 -dvips32 -o referenc.ps referenc
615 move referenc.ps $(WXDIR)\docs\ps\referenc.ps
618 # In order to force document reprocessing
620 -touch $(WXDIR)\docs\latex\wx\manual.tex
622 updatedocs: touchmanual alldocs
624 # Start Word, running the GeneratePDF macro. MakeManual.dot should be in the
625 # Office StartUp folder, and PDFMaker should be installed.
626 updatepdf: # touchmanual pdfrtf
627 start $(WAITFLAG) "winword d:\wx2\wxWindows\docs\latex\pdf\wx.rtf /mGeneratePDF"
631 # Can't use this or we'll have to distribute all tmake files with wxWindows
632 # makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
635 cd $(WXWIN)\distrib\msw\tmake
636 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
637 copy makefile.$(MFTYPE) $(WXWIN)\src\msw