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't
44 #! be compiled with Borland (leads to crash in oleauto sample)
48 $isCFile = $file =~ /\.c$/;
50 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
51 $file =~ s/cp?p?$/obj/;
52 my $obj = "\$(MSWDIR)\\" . $file . " ";
54 $project{"WXMSWOBJS"} .= $obj;
56 #! remember that this file is in ole subdir
57 $project{"WXOLEOBJS"} .= $obj;
59 $project{"WXCOBJS"} .= $obj if $isCFile;
63 # This file was automatically generated by tmake at #$ Now()
64 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
68 # Author: Julian Smart
75 # Makefile : Builds wxWindows library wx.lib for MS Windows,
76 # and Borland C++ (32-bit).
79 !error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
83 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
87 THISDIR = $(WXDIR)\src\msw
89 # Set all these to 1 if you want to build a dynamic library
95 !include $(WXDIR)\src\makeb32.env
97 # Please set these according to the settings in wx_setup.h, so we can include
98 # 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 !if "$(USE_XPM_IN_MSW)" == "1"
114 PERIPH_LIBS=$(WXLIB)\xpm.lib $(PERIPH_LIBS)
115 PERIPH_TARGET=xpm $(PERIPH_TARGET)
116 PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
119 #PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(PERIPH_LIBS)
121 PERIPH_TARGET=zlib png jpeg $(PERIPH_TARGET)
122 PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg $(PERIPH_CLEAN_TARGET)
128 LIBS= cw32 import32 ole2w32
139 DOCDIR = $(WXDIR)\docs
141 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
144 # $(MSWDIR)\colrdlgg.obj \
145 # $(MSWDIR)\fontdlgg.obj \
146 # $(MSWDIR)\helpxlp.obj \
147 # $(MSWDIR)\msgdlgg.obj \
148 # $(MSWDIR)\printps.obj \
149 # $(MSWDIR)\prntdlgg.obj \
150 # $(MSWDIR)\listctrl.obj \
151 # $(MSWDIR)\notebook.obj \
152 # $(MSWDIR)\treectrl.obj
155 $(MSWDIR)\y_tab.obj \
156 #$ ExpandList("WXCOMMONOBJS");
158 MSWOBJS = #$ ExpandList("WXMSWOBJS");
160 HTMLOBJS = #$ ExpandList("WXHTMLOBJS");
162 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
166 wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
168 all: all_libs all_execs
172 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
174 tlib $(LIBTARGET) /P1024 @&&!
175 +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
180 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
182 -erase $(WXLIBDIR)\wx.dll
183 tlink32 $(LINK_FLAGS) /v @&&!
187 $(PERIPH_LIBS) $(LIBS)
190 implib -c $(LIBTARGET) $(WXLIBDIR)\wx.dll
194 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
195 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
197 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
200 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
203 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
204 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
206 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
207 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
209 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
212 $_ = $project{"WXMSWOBJS"};
216 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
217 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
219 $text .= $_ . "\n\n";
223 ########################################################
224 # Common objects (always compiled)
227 $_ = $project{"WXCOMMONOBJS"};
231 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
234 $text .= $_ . "\n\n";
238 ########################################################
239 # Generic objects (not always compiled, depending on
240 # whether platforms have native implementations)
243 $_ = $project{"WXGENERICOBJS"};
249 $text .= $_ . "\n\n";
253 ########################################################
254 # HTML objects (always compiled)
257 $_ = $project{"WXHTMLOBJS"};
263 $text .= $_ . "\n\n";
280 make -f makefile.b32 all_execs
285 make -f makefile.b32 -DCFG=$(CFG) -DFINAL=$(FINAL) -DWXWIN=$(WXDIR) -DDEBUG=$(DEBUG)
290 make -f makefile.b32 clean
300 make -f makefile.b32 clean
305 make -f makefile.b32 lib
310 make -f makefile.b32 clean
320 make -f makefile.b32 clean
325 -H=$(WXDIR)\src\msw\wx32.csm
333 -w-hid # virtual function A hides virtual function B
337 -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm;$(WXDIR)/src/tiff
338 -I$(WXDIR)\include\wx\msw\gnuwin32
350 #-I$(WXDIR)\src\common\wxxpm\libxpm.34b\lib
353 clean: $(PERIPH_CLEAN_TARGET)
360 -erase ..\common\y_tab.c
361 -erase ..\common\lex_yy.c
367 docs: allhlp allhtml allpdfrtf
369 hlp: wxhlp portinghlp
370 wxhlp: $(DOCDIR)/winhelp/wx.hlp
371 prophlp: $(DOCDIR)/winhelp/prop.hlp
372 refhlp: $(DOCDIR)/winhelp/techref.hlp
373 rtf: $(DOCDIR)/winhelp/wx.rtf
374 proprtf: $(DOCDIR)/winhelp/prop.rtf
375 pdfrtf: $(DOCDIR)/pdf/wx.rtf
376 proppdfrtf: $(DOCDIR)/pdf/prop.rtf
377 refpdfrtf: $(DOCDIR)/pdf/techref.rtf
378 html: wxhtml portinghtml
379 wxhtml: $(DOCDIR)\html\wx\wx.htm
380 htmlhelp: $(DOCDIR)\html\wx\wx.chm
381 prophtml: $(DOCDIR)\html\proplist\prop.htm
383 wxps: $(WXDIR)\docs\ps\wx.ps
384 propps: $(WXDIR)\docs\ps\prop.ps
385 referencps: $(WXDIR)\docs\ps\referenc.ps
387 portinghtml: $(DOCDIR)\html\porting\port.htm
388 portingrtf: $(DOCDIR)/winhelp/porting.rtf
389 portinghlp: $(DOCDIR)/winhelp/porting.hlp
390 portingpdfrtf: $(DOCDIR)/pdf/porting.rtf
391 portingps: $(WXDIR)\docs\ps\porting.ps
393 allhlp: wxhlp portinghlp prophlp
394 cd $(WXDIR)\utils\dialoged\src
395 make -f makefile.b32 hlp
398 # cd $(WXDIR)\utils\wxhelp\src
399 # make -f makefile.b32 hlp
400 # cd $(WXDIR)\utils\tex2rtf\src
401 # make -f makefile.b32 hlp
402 # cd $(WXDIR)\utils\wxgraph\src
403 # make -f makefile.b32 hlp
404 # cd $(WXDIR)\utils\wxchart\src
405 # make -f makefile.b32 hlp
406 # cd $(WXDIR)\utils\wxtree\src
407 # make -f makefile.b32 hlp
408 # cd $(WXDIR)\utils\wxbuild\src
409 # make -f makefile.b32 hlp
410 # cd $(WXDIR)\utils\wxgrid\src
411 # make -f makefile.b32 hlp
413 allhtml: wxhtml portinghtml prophtml
414 cd $(WXDIR)\utils\dialoged\src
415 make -f makefile.b32 html
418 # make -f makefile.b32 html
419 # cd $(WXDIR)\utils\dialoged\src
420 # make -f makefile.b32 html
421 # cd $(WXDIR)\utils\hytext\src
422 # make -f makefile.b32 html
423 # cd $(WXDIR)\utils\wxhelp\src
424 # make -f makefile.b32 html
425 # cd $(WXDIR)\utils\tex2rtf\src
426 # make -f makefile.b32 html
427 # cd $(WXDIR)\utils\wxgraph\src
428 # make -f makefile.b32 html
429 # cd $(WXDIR)\utils\wxchart\src
430 # make -f makefile.b32 html
431 # cd $(WXDIR)\utils\wxtree\src
432 # make -f makefile.b32 html
434 allps: wxps referencps portingps propps
435 cd $(WXDIR)\utils\dialoged\src
436 make -f makefile.b32 ps
439 allpdfrtf: pdfrtf portingpdfrtf proppdfrtf
440 cd $(WXDIR)\utils\dialoged\src
441 make -f makefile.b32 pdfrtf
444 # cd $(WXDIR)\utils\wxhelp\src
445 # make -f makefile.b32 ps
446 # cd $(WXDIR)\utils\tex2rtf\src
447 # make -f makefile.b32 ps
448 # cd $(WXDIR)\utils\wxgraph\src
449 # make -f makefile.b32 ps
450 # cd $(WXDIR)\utils\wxchart\src
451 # make -f makefile.b32 ps
452 # cd $(WXDIR)\utils\wxtree\src
453 # make -f makefile.b32 ps
456 $(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj
457 cd $(DOCDIR)/latex/wx
460 move wx.hlp $(DOCDIR)\winhelp\wx.hlp
461 move wx.cnt $(DOCDIR)\winhelp\wx.cnt
464 $(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOCDIR)/latex/porting/porting.hpj
465 cd $(DOCDIR)/latex/porting
468 move porting.hlp $(DOCDIR)\winhelp\porting.hlp
469 move porting.cnt $(DOCDIR)\winhelp\porting.cnt
472 $(DOCDIR)/winhelp/prop.hlp: $(DOCDIR)/latex/proplist/prop.rtf $(DOCDIR)/latex/proplist/prop.hpj
473 cd $(DOCDIR)/latex/proplist
476 move prop.hlp $(DOCDIR)\winhelp\prop.hlp
477 move prop.cnt $(DOCDIR)\winhelp\prop.cnt
480 $(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj
481 cd $(DOCDIR)/latex/techref
484 move techref.hlp $(DOCDIR)\winhelp\techref.hlp
485 move techref.cnt $(DOCDIR)\winhelp\techref.cnt
488 $(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
489 cd $(DOCDIR)\latex\wx
490 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/latex/wx/wx.rtf -twice -winhelp
493 $(DOCDIR)/latex/porting/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
494 cd $(DOCDIR)\latex\porting
495 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/latex/porting/porting.rtf -twice -winhelp
498 $(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
499 cd $(DOCDIR)\latex\proplist
500 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/prop.rtf -twice -winhelp
503 $(DOCDIR)/latex/techref/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
504 cd $(DOCDIR)\latex\techref
505 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/latex/techref/techref.rtf -twice -winhelp
508 $(DOCDIR)/pdf/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex
509 cd $(DOCDIR)\latex\wx
510 -copy *.wmf $(DOCDIR)\pdf
511 -copy *.bmp $(DOCDIR)\pdf
512 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/pdf/wx.rtf -twice -rtf
515 $(DOCDIR)/pdf/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
516 cd $(DOCDIR)\latex\porting
517 -copy *.wmf $(DOCDIR)\pdf
518 -copy *.bmp $(DOCDIR)\pdf
519 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/pdf/porting.rtf -twice -rtf
522 $(DOCDIR)/pdf/prop.rtf: $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/body.tex $(DOCDIR)/latex/proplist/classes.tex $(DOCDIR)/latex/proplist/changes.tex
523 cd $(DOCDIR)\latex\proplist
524 -copy *.wmf $(DOCDIR)\pdf
525 -copy *.bmp $(DOCDIR)\pdf
526 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/pdf/prop.rtf -twice -rtf
529 $(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
530 cd $(DOCDIR)\latex\techref
531 -copy *.wmf $(DOCDIR)\pdf
532 -copy *.bmp $(DOCDIR)\pdf
533 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/pdf/techref.rtf -twice -rtf
536 $(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
537 cd $(DOCDIR)\latex\wx
538 -mkdir $(DOCDIR)\html\wx
539 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html
540 -erase $(DOCDIR)\html\wx\*.con
541 -erase $(DOCDIR)\html\wx\*.ref
542 -erase $(DOCDIR)\latex\wx\*.con
543 -erase $(DOCDIR)\latex\wx\*.ref
546 $(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp
552 $(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex
553 cd $(DOCDIR)\latex\porting
554 -mkdir $(DOCDIR)\html\porting
555 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html
556 -erase $(DOCDIR)\html\porting\*.con
557 -erase $(DOCDIR)\html\porting\*.ref
558 -erase $(DOCDIR)\latex\porting\*.con
559 -erase $(DOCDIR)\latex\porting\*.ref
562 $(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
563 cd $(DOCDIR)\latex\proplist
564 -mkdir $(DOCDIR)\html\proplist
565 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\html\proplist\prop.htm -twice -html
566 -erase $(DOCDIR)\html\proplist\*.con
567 -erase $(DOCDIR)\html\proplist\*.ref
568 -erase $(DOCDIR)\latex\proplist\*.con
569 -erase $(DOCDIR)\latex\proplist\*.ref
572 $(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex
573 cd $(WXDIR)\docs\latex\wx
582 $(WXDIR)\docs\latex\porting\porting.dvi: $(DOCDIR)/latex/porting/porting.tex
583 cd $(WXDIR)\docs\latex\porting
592 $(WXDIR)\docs\ps\wx.ps: $(WXDIR)\docs\latex\wx\manual.dvi
593 cd $(WXDIR)\docs\latex\wx
594 -dvips32 -o wx.ps manual
595 move wx.ps $(WXDIR)\docs\ps\wx.ps
598 $(WXDIR)\docs\ps\porting.ps: $(WXDIR)\docs\latex\porting\porting.dvi
599 cd $(WXDIR)\docs\latex\porting
600 -dvips32 -o porting.ps porting
601 move porting.ps $(WXDIR)\docs\ps\porting.ps
604 $(WXDIR)\docs\latex\wx\referenc.dvi: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/referenc.tex
605 cd $(WXDIR)\docs\latex\wx
614 $(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi
615 cd $(WXDIR)\docs\latex\wx
616 -dvips32 -o referenc.ps referenc
617 move referenc.ps $(WXDIR)\docs\ps\referenc.ps
620 # In order to force document reprocessing
622 -touch $(WXDIR)\docs\latex\wx\manual.tex
624 updatedocs: touchmanual alldocs
626 # Start Word, running the GeneratePDF macro. MakeManual.dot should be in the
627 # Office StartUp folder, and PDFMaker should be installed.
628 updatepdf: # touchmanual pdfrtf
629 start $(WAITFLAG) "winword d:\wx2\wxWindows\docs\latex\pdf\wx.rtf /mGeneratePDF"
633 # Can't use this or we'll have to distribute all tmake files with wxWindows
634 # makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
637 cd $(WXWIN)\distrib\msw\tmake
638 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
639 copy makefile.$(MFTYPE) $(WXWIN)\src\msw