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 next if $wxCommon{$file} =~ /\b(16|U)\b/;
34 $isCFile = $file =~ /\.c$/;
35 $file =~ s/cp?p?$/obj/;
36 $obj = "\$(MSWDIR)\\" . $file . " ";
37 $project{"WXCOMMONOBJS"} .= $obj;
38 $project{"WXCOBJS"} .= $obj if $isCFile;
41 foreach $file (sort keys %wxMSW) {
42 next if $wxMSW{$file} =~ /\b16\b/;
44 #! if ( $file =~ /^automtn/ ) {
45 #! #! comment in old makefile.b32 seems to imply that this file can not
46 #! #! be compiled with Borland (leads to crash in oleauto sample)
47 #! No longer true, at least for BC++ 5.2
51 $isCFile = $file =~ /\.c$/;
53 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
54 $file =~ s/cp?p?$/obj/;
55 my $obj = "\$(MSWDIR)\\" . $file . " ";
57 $project{"WXMSWOBJS"} .= $obj;
59 #! remember that this file is in ole subdir
60 $project{"WXOLEOBJS"} .= $obj;
62 $project{"WXCOBJS"} .= $obj if $isCFile;
66 # This file was automatically generated by tmake
67 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
71 # Author: Julian Smart
78 # Makefile : Builds wxWindows library wx.lib for MS Windows,
79 # and Borland C++ (32-bit).
82 !error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
86 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
90 THISDIR = $(WXDIR)\src\msw
92 # Set all these to 1 if you want to build a dynamic library
98 !include $(WXDIR)\src\makeb32.env
100 # Please set these according to the settings in wx_setup.h, so we can include
101 # the appropriate libraries in wx.lib
108 !if "$(USE_CTL3D)" == "1"
109 #Use WIN32S/WIN95 32 bit version ctl3d32.dll under win95 (Andre Beltman)
110 PERIPH_LIBS=$(WXDIR)\lib\ctl3d32.lib $(PERIPH_LIBS)
111 PERIPH_TARGET=ctl3d $(PERIPH_TARGET)
112 PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET)
115 #PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(WXDIR)\lib\tiff.lib $(PERIPH_LIBS)
117 PERIPH_TARGET=zlib png jpeg tiff regex $(PERIPH_TARGET)
118 PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff clean_regex $(PERIPH_CLEAN_TARGET)
124 LIBS= cw32mti import32 ole2w32 odbc32 zlib winpng jpeg tiff regex
135 DOCDIR = $(WXDIR)\docs
137 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
140 # $(MSWDIR)\colrdlgg.obj \
141 # $(MSWDIR)\fontdlgg.obj \
142 # $(MSWDIR)\msgdlgg.obj \
143 # $(MSWDIR)\printps.obj \
144 # $(MSWDIR)\prntdlgg.obj \
145 # $(MSWDIR)\listctrl.obj \
146 # $(MSWDIR)\notebook.obj \
147 # $(MSWDIR)\treectrl.obj
150 $(MSWDIR)\y_tab.obj \
151 #$ ExpandList("WXCOMMONOBJS");
153 MSWOBJS = #$ ExpandList("WXMSWOBJS");
155 HTMLOBJS = #$ ExpandList("WXHTMLOBJS");
157 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
161 wx: setuph $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
163 # TODO: put the setup.h under lib
165 cd $(WXDIR)\include\wx\msw
166 if not exist setup.h copy setup0.h setup.h
173 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
175 tlib "$(LIBTARGET)" /P1024 @&&!
176 +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
181 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
183 -erase $(WXLIBDIR)\wx.dll
184 $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&!
188 $(PERIPH_LIBS) $(LIBS)
191 -erase $(WXLIBDIR)\version.res
192 brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc
193 implib -c $(LIBTARGET) $(WXLIBDIR)\wx.dll
197 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
198 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res
200 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
203 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
206 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
207 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
209 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
210 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
212 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
215 $_ = $project{"WXMSWOBJS"};
219 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
220 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
222 $text .= $_ . "\n\n";
226 ########################################################
227 # Common objects (always compiled)
230 $_ = $project{"WXCOMMONOBJS"};
234 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
237 $text .= $_ . "\n\n";
241 ########################################################
242 # Generic objects (not always compiled, depending on
243 # whether platforms have native implementations)
246 $_ = $project{"WXGENERICOBJS"};
252 $text .= $_ . "\n\n";
256 ########################################################
257 # HTML objects (always compiled)
260 $_ = $project{"WXHTMLOBJS"};
266 $text .= $_ . "\n\n";
283 make -f makefile.b32 all_execs
293 make -f makefile.b32 clean
298 make -f makefile.b32 lib
303 make -f makefile.b32 clean
313 make -f makefile.b32 clean
317 cd $(WXDIR)\src\regex
318 make -f makefile.b32 lib
322 cd $(WXDIR)\src\regex
323 make -f makefile.b32 clean
328 make -f makefile.b32 lib
333 make -f makefile.b32 clean
339 -H=$(WXDIR)\src\msw\wx32.csm
347 -w-hid # virtual function A hides virtual function B
350 -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff
351 -I$(WXDIR)\include\wx\msw\gnuwin32
353 -L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk
363 clean: $(PERIPH_CLEAN_TARGET)
365 -erase $(WXLIBDIR)\wx.dll
366 -erase $(WXLIBDIR)\wx.tds
367 -erase $(WXLIBDIR)\wx.il?
373 -erase ..\common\y_tab.c
374 -erase ..\common\lex_yy.c
380 docs: allhlp allhtml allpdfrtf
382 hlp: wxhlp portinghlp
383 wxhlp: $(DOCDIR)/winhelp/wx.hlp
384 prophlp: $(DOCDIR)/winhelp/prop.hlp
385 refhlp: $(DOCDIR)/winhelp/techref.hlp
386 rtf: $(DOCDIR)/winhelp/wx.rtf
387 proprtf: $(DOCDIR)/winhelp/prop.rtf
388 pdfrtf: $(DOCDIR)/pdf/wx.rtf
389 proppdfrtf: $(DOCDIR)/pdf/prop.rtf
390 refpdfrtf: $(DOCDIR)/pdf/techref.rtf
391 html: wxhtml portinghtml
392 wxhtml: $(DOCDIR)\html\wx\wx.htm
393 htmlhelp: $(DOCDIR)\html\wx\wx.chm
394 prophtml: $(DOCDIR)\html\proplist\prop.htm
396 wxps: $(WXDIR)\docs\ps\wx.ps
397 propps: $(WXDIR)\docs\ps\prop.ps
398 referencps: $(WXDIR)\docs\ps\referenc.ps
400 portinghtml: $(DOCDIR)\html\porting\port.htm
401 portingrtf: $(DOCDIR)/winhelp/porting.rtf
402 portinghlp: $(DOCDIR)/winhelp/porting.hlp
403 portingpdfrtf: $(DOCDIR)/pdf/porting.rtf
404 portingps: $(WXDIR)\docs\ps\porting.ps
406 allhlp: wxhlp portinghlp prophlp
407 cd $(WXDIR)\utils\dialoged\src
408 make -f makefile.b32 hlp
411 # cd $(WXDIR)\utils\wxhelp\src
412 # make -f makefile.b32 hlp
413 # cd $(WXDIR)\utils\tex2rtf\src
414 # make -f makefile.b32 hlp
415 # cd $(WXDIR)\utils\wxgraph\src
416 # make -f makefile.b32 hlp
417 # cd $(WXDIR)\utils\wxchart\src
418 # make -f makefile.b32 hlp
419 # cd $(WXDIR)\utils\wxtree\src
420 # make -f makefile.b32 hlp
421 # cd $(WXDIR)\utils\wxbuild\src
422 # make -f makefile.b32 hlp
423 # cd $(WXDIR)\utils\wxgrid\src
424 # make -f makefile.b32 hlp
426 allhtml: wxhtml portinghtml prophtml
427 cd $(WXDIR)\utils\dialoged\src
428 make -f makefile.b32 html
431 # make -f makefile.b32 html
432 # cd $(WXDIR)\utils\dialoged\src
433 # make -f makefile.b32 html
434 # cd $(WXDIR)\utils\hytext\src
435 # make -f makefile.b32 html
436 # cd $(WXDIR)\utils\wxhelp\src
437 # make -f makefile.b32 html
438 # cd $(WXDIR)\utils\tex2rtf\src
439 # make -f makefile.b32 html
440 # cd $(WXDIR)\utils\wxgraph\src
441 # make -f makefile.b32 html
442 # cd $(WXDIR)\utils\wxchart\src
443 # make -f makefile.b32 html
444 # cd $(WXDIR)\utils\wxtree\src
445 # make -f makefile.b32 html
447 allps: wxps referencps portingps propps
448 cd $(WXDIR)\utils\dialoged\src
449 make -f makefile.b32 ps
452 allpdfrtf: pdfrtf portingpdfrtf proppdfrtf
453 cd $(WXDIR)\utils\dialoged\src
454 make -f makefile.b32 pdfrtf
457 # cd $(WXDIR)\utils\wxhelp\src
458 # make -f makefile.b32 ps
459 # cd $(WXDIR)\utils\tex2rtf\src
460 # make -f makefile.b32 ps
461 # cd $(WXDIR)\utils\wxgraph\src
462 # make -f makefile.b32 ps
463 # cd $(WXDIR)\utils\wxchart\src
464 # make -f makefile.b32 ps
465 # cd $(WXDIR)\utils\wxtree\src
466 # make -f makefile.b32 ps
469 $(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj
470 cd $(DOCDIR)/latex/wx
473 move wx.hlp $(DOCDIR)\winhelp\wx.hlp
474 move wx.cnt $(DOCDIR)\winhelp\wx.cnt
477 $(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOCDIR)/latex/porting/porting.hpj
478 cd $(DOCDIR)/latex/porting
481 move porting.hlp $(DOCDIR)\winhelp\porting.hlp
482 move porting.cnt $(DOCDIR)\winhelp\porting.cnt
485 $(DOCDIR)/winhelp/prop.hlp: $(DOCDIR)/latex/proplist/prop.rtf $(DOCDIR)/latex/proplist/prop.hpj
486 cd $(DOCDIR)/latex/proplist
489 move prop.hlp $(DOCDIR)\winhelp\prop.hlp
490 move prop.cnt $(DOCDIR)\winhelp\prop.cnt
493 $(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj
494 cd $(DOCDIR)/latex/techref
497 move techref.hlp $(DOCDIR)\winhelp\techref.hlp
498 move techref.cnt $(DOCDIR)\winhelp\techref.cnt
501 $(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
502 cd $(DOCDIR)\latex\wx
503 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/latex/wx/wx.rtf -twice -winhelp
506 $(DOCDIR)/latex/porting/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
507 cd $(DOCDIR)\latex\porting
508 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/latex/porting/porting.rtf -twice -winhelp
511 $(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
512 cd $(DOCDIR)\latex\proplist
513 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/prop.rtf -twice -winhelp
516 $(DOCDIR)/latex/techref/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
517 cd $(DOCDIR)\latex\techref
518 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/latex/techref/techref.rtf -twice -winhelp
521 $(DOCDIR)/pdf/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex
522 cd $(DOCDIR)\latex\wx
523 -copy *.wmf $(DOCDIR)\pdf
524 -copy *.bmp $(DOCDIR)\pdf
525 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/pdf/wx.rtf -twice -rtf
528 $(DOCDIR)/pdf/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
529 cd $(DOCDIR)\latex\porting
530 -copy *.wmf $(DOCDIR)\pdf
531 -copy *.bmp $(DOCDIR)\pdf
532 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/pdf/porting.rtf -twice -rtf
535 $(DOCDIR)/pdf/prop.rtf: $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/body.tex $(DOCDIR)/latex/proplist/classes.tex $(DOCDIR)/latex/proplist/changes.tex
536 cd $(DOCDIR)\latex\proplist
537 -copy *.wmf $(DOCDIR)\pdf
538 -copy *.bmp $(DOCDIR)\pdf
539 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/pdf/prop.rtf -twice -rtf
542 $(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
543 cd $(DOCDIR)\latex\techref
544 -copy *.wmf $(DOCDIR)\pdf
545 -copy *.bmp $(DOCDIR)\pdf
546 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/pdf/techref.rtf -twice -rtf
549 $(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
550 cd $(DOCDIR)\latex\wx
551 -mkdir $(DOCDIR)\html\wx
552 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html
553 -erase $(DOCDIR)\html\wx\*.con
554 -erase $(DOCDIR)\html\wx\*.ref
555 -erase $(DOCDIR)\latex\wx\*.con
556 -erase $(DOCDIR)\latex\wx\*.ref
559 $(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp
565 $(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex
566 cd $(DOCDIR)\latex\porting
567 -mkdir $(DOCDIR)\html\porting
568 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html
569 -erase $(DOCDIR)\html\porting\*.con
570 -erase $(DOCDIR)\html\porting\*.ref
571 -erase $(DOCDIR)\latex\porting\*.con
572 -erase $(DOCDIR)\latex\porting\*.ref
575 $(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
576 cd $(DOCDIR)\latex\proplist
577 -mkdir $(DOCDIR)\html\proplist
578 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\html\proplist\prop.htm -twice -html
579 -erase $(DOCDIR)\html\proplist\*.con
580 -erase $(DOCDIR)\html\proplist\*.ref
581 -erase $(DOCDIR)\latex\proplist\*.con
582 -erase $(DOCDIR)\latex\proplist\*.ref
585 $(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex
586 cd $(WXDIR)\docs\latex\wx
595 $(WXDIR)\docs\latex\porting\porting.dvi: $(DOCDIR)/latex/porting/porting.tex
596 cd $(WXDIR)\docs\latex\porting
605 $(WXDIR)\docs\ps\wx.ps: $(WXDIR)\docs\latex\wx\manual.dvi
606 cd $(WXDIR)\docs\latex\wx
607 -dvips32 -o wx.ps manual
608 move wx.ps $(WXDIR)\docs\ps\wx.ps
611 $(WXDIR)\docs\ps\porting.ps: $(WXDIR)\docs\latex\porting\porting.dvi
612 cd $(WXDIR)\docs\latex\porting
613 -dvips32 -o porting.ps porting
614 move porting.ps $(WXDIR)\docs\ps\porting.ps
617 $(WXDIR)\docs\latex\wx\referenc.dvi: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/referenc.tex
618 cd $(WXDIR)\docs\latex\wx
627 $(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi
628 cd $(WXDIR)\docs\latex\wx
629 -dvips32 -o referenc.ps referenc
630 move referenc.ps $(WXDIR)\docs\ps\referenc.ps
633 # In order to force document reprocessing
635 -touch $(WXDIR)\docs\latex\wx\manual.tex
637 updatedocs: touchmanual alldocs
639 # Start Word, running the GeneratePDF macro. MakeManual.dot should be in the
640 # Office StartUp folder, and PDFMaker should be installed.
641 updatepdf: # touchmanual pdfrtf
642 start $(WAITFLAG) "winword d:\wx2\wxWindows\docs\latex\pdf\wx.rtf /mGeneratePDF"
646 # Can't use this or we'll have to distribute all tmake files with wxWindows
647 # makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
650 cd $(WXWIN)\distrib\msw\tmake
651 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
652 copy makefile.$(MFTYPE) $(WXWIN)\src\msw