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 implib -c $(LIBTARGET) $(WXLIBDIR)\wx.dll
188 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
189 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
191 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
194 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
197 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
198 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
200 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
201 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
203 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
206 $_ = $project{"WXMSWOBJS"};
210 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
211 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
213 $text .= $_ . "\n\n";
217 ########################################################
218 # Common objects (always compiled)
221 $_ = $project{"WXCOMMONOBJS"};
225 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
228 $text .= $_ . "\n\n";
232 ########################################################
233 # Generic objects (not always compiled, depending on
234 # whether platforms have native implementations)
237 $_ = $project{"WXGENERICOBJS"};
243 $text .= $_ . "\n\n";
247 ########################################################
248 # HTML objects (always compiled)
251 $_ = $project{"WXHTMLOBJS"};
257 $text .= $_ . "\n\n";
274 make -f makefile.b32 all_execs
284 make -f makefile.b32 clean
289 make -f makefile.b32 lib
294 make -f makefile.b32 clean
304 make -f makefile.b32 clean
309 make -f makefile.b32 lib
314 make -f makefile.b32 clean
320 -H=$(WXDIR)\src\msw\wx32.csm
328 -w-hid # virtual function A hides virtual function B
332 -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff
333 -I$(WXDIR)\include\wx\msw\gnuwin32
335 -L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk
345 clean: $(PERIPH_CLEAN_TARGET)
347 -erase $(WXLIBDIR)\wx.dll
348 -erase $(WXLIBDIR)\wx.tds
349 -erase $(WXLIBDIR)\wx.il?
355 -erase ..\common\y_tab.c
356 -erase ..\common\lex_yy.c
362 docs: allhlp allhtml allpdfrtf
364 hlp: wxhlp portinghlp
365 wxhlp: $(DOCDIR)/winhelp/wx.hlp
366 prophlp: $(DOCDIR)/winhelp/prop.hlp
367 refhlp: $(DOCDIR)/winhelp/techref.hlp
368 rtf: $(DOCDIR)/winhelp/wx.rtf
369 proprtf: $(DOCDIR)/winhelp/prop.rtf
370 pdfrtf: $(DOCDIR)/pdf/wx.rtf
371 proppdfrtf: $(DOCDIR)/pdf/prop.rtf
372 refpdfrtf: $(DOCDIR)/pdf/techref.rtf
373 html: wxhtml portinghtml
374 wxhtml: $(DOCDIR)\html\wx\wx.htm
375 htmlhelp: $(DOCDIR)\html\wx\wx.chm
376 prophtml: $(DOCDIR)\html\proplist\prop.htm
378 wxps: $(WXDIR)\docs\ps\wx.ps
379 propps: $(WXDIR)\docs\ps\prop.ps
380 referencps: $(WXDIR)\docs\ps\referenc.ps
382 portinghtml: $(DOCDIR)\html\porting\port.htm
383 portingrtf: $(DOCDIR)/winhelp/porting.rtf
384 portinghlp: $(DOCDIR)/winhelp/porting.hlp
385 portingpdfrtf: $(DOCDIR)/pdf/porting.rtf
386 portingps: $(WXDIR)\docs\ps\porting.ps
388 allhlp: wxhlp portinghlp prophlp
389 cd $(WXDIR)\utils\dialoged\src
390 make -f makefile.b32 hlp
393 # cd $(WXDIR)\utils\wxhelp\src
394 # make -f makefile.b32 hlp
395 # cd $(WXDIR)\utils\tex2rtf\src
396 # make -f makefile.b32 hlp
397 # cd $(WXDIR)\utils\wxgraph\src
398 # make -f makefile.b32 hlp
399 # cd $(WXDIR)\utils\wxchart\src
400 # make -f makefile.b32 hlp
401 # cd $(WXDIR)\utils\wxtree\src
402 # make -f makefile.b32 hlp
403 # cd $(WXDIR)\utils\wxbuild\src
404 # make -f makefile.b32 hlp
405 # cd $(WXDIR)\utils\wxgrid\src
406 # make -f makefile.b32 hlp
408 allhtml: wxhtml portinghtml prophtml
409 cd $(WXDIR)\utils\dialoged\src
410 make -f makefile.b32 html
413 # make -f makefile.b32 html
414 # cd $(WXDIR)\utils\dialoged\src
415 # make -f makefile.b32 html
416 # cd $(WXDIR)\utils\hytext\src
417 # make -f makefile.b32 html
418 # cd $(WXDIR)\utils\wxhelp\src
419 # make -f makefile.b32 html
420 # cd $(WXDIR)\utils\tex2rtf\src
421 # make -f makefile.b32 html
422 # cd $(WXDIR)\utils\wxgraph\src
423 # make -f makefile.b32 html
424 # cd $(WXDIR)\utils\wxchart\src
425 # make -f makefile.b32 html
426 # cd $(WXDIR)\utils\wxtree\src
427 # make -f makefile.b32 html
429 allps: wxps referencps portingps propps
430 cd $(WXDIR)\utils\dialoged\src
431 make -f makefile.b32 ps
434 allpdfrtf: pdfrtf portingpdfrtf proppdfrtf
435 cd $(WXDIR)\utils\dialoged\src
436 make -f makefile.b32 pdfrtf
439 # cd $(WXDIR)\utils\wxhelp\src
440 # make -f makefile.b32 ps
441 # cd $(WXDIR)\utils\tex2rtf\src
442 # make -f makefile.b32 ps
443 # cd $(WXDIR)\utils\wxgraph\src
444 # make -f makefile.b32 ps
445 # cd $(WXDIR)\utils\wxchart\src
446 # make -f makefile.b32 ps
447 # cd $(WXDIR)\utils\wxtree\src
448 # make -f makefile.b32 ps
451 $(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj
452 cd $(DOCDIR)/latex/wx
455 move wx.hlp $(DOCDIR)\winhelp\wx.hlp
456 move wx.cnt $(DOCDIR)\winhelp\wx.cnt
459 $(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOCDIR)/latex/porting/porting.hpj
460 cd $(DOCDIR)/latex/porting
463 move porting.hlp $(DOCDIR)\winhelp\porting.hlp
464 move porting.cnt $(DOCDIR)\winhelp\porting.cnt
467 $(DOCDIR)/winhelp/prop.hlp: $(DOCDIR)/latex/proplist/prop.rtf $(DOCDIR)/latex/proplist/prop.hpj
468 cd $(DOCDIR)/latex/proplist
471 move prop.hlp $(DOCDIR)\winhelp\prop.hlp
472 move prop.cnt $(DOCDIR)\winhelp\prop.cnt
475 $(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj
476 cd $(DOCDIR)/latex/techref
479 move techref.hlp $(DOCDIR)\winhelp\techref.hlp
480 move techref.cnt $(DOCDIR)\winhelp\techref.cnt
483 $(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
484 cd $(DOCDIR)\latex\wx
485 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/latex/wx/wx.rtf -twice -winhelp
488 $(DOCDIR)/latex/porting/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
489 cd $(DOCDIR)\latex\porting
490 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/latex/porting/porting.rtf -twice -winhelp
493 $(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
494 cd $(DOCDIR)\latex\proplist
495 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/prop.rtf -twice -winhelp
498 $(DOCDIR)/latex/techref/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
499 cd $(DOCDIR)\latex\techref
500 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/latex/techref/techref.rtf -twice -winhelp
503 $(DOCDIR)/pdf/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex
504 cd $(DOCDIR)\latex\wx
505 -copy *.wmf $(DOCDIR)\pdf
506 -copy *.bmp $(DOCDIR)\pdf
507 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/pdf/wx.rtf -twice -rtf
510 $(DOCDIR)/pdf/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
511 cd $(DOCDIR)\latex\porting
512 -copy *.wmf $(DOCDIR)\pdf
513 -copy *.bmp $(DOCDIR)\pdf
514 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/pdf/porting.rtf -twice -rtf
517 $(DOCDIR)/pdf/prop.rtf: $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/body.tex $(DOCDIR)/latex/proplist/classes.tex $(DOCDIR)/latex/proplist/changes.tex
518 cd $(DOCDIR)\latex\proplist
519 -copy *.wmf $(DOCDIR)\pdf
520 -copy *.bmp $(DOCDIR)\pdf
521 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/pdf/prop.rtf -twice -rtf
524 $(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
525 cd $(DOCDIR)\latex\techref
526 -copy *.wmf $(DOCDIR)\pdf
527 -copy *.bmp $(DOCDIR)\pdf
528 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/pdf/techref.rtf -twice -rtf
531 $(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
532 cd $(DOCDIR)\latex\wx
533 -mkdir $(DOCDIR)\html\wx
534 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html
535 -erase $(DOCDIR)\html\wx\*.con
536 -erase $(DOCDIR)\html\wx\*.ref
537 -erase $(DOCDIR)\latex\wx\*.con
538 -erase $(DOCDIR)\latex\wx\*.ref
541 $(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp
547 $(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex
548 cd $(DOCDIR)\latex\porting
549 -mkdir $(DOCDIR)\html\porting
550 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html
551 -erase $(DOCDIR)\html\porting\*.con
552 -erase $(DOCDIR)\html\porting\*.ref
553 -erase $(DOCDIR)\latex\porting\*.con
554 -erase $(DOCDIR)\latex\porting\*.ref
557 $(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
558 cd $(DOCDIR)\latex\proplist
559 -mkdir $(DOCDIR)\html\proplist
560 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\html\proplist\prop.htm -twice -html
561 -erase $(DOCDIR)\html\proplist\*.con
562 -erase $(DOCDIR)\html\proplist\*.ref
563 -erase $(DOCDIR)\latex\proplist\*.con
564 -erase $(DOCDIR)\latex\proplist\*.ref
567 $(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex
568 cd $(WXDIR)\docs\latex\wx
577 $(WXDIR)\docs\latex\porting\porting.dvi: $(DOCDIR)/latex/porting/porting.tex
578 cd $(WXDIR)\docs\latex\porting
587 $(WXDIR)\docs\ps\wx.ps: $(WXDIR)\docs\latex\wx\manual.dvi
588 cd $(WXDIR)\docs\latex\wx
589 -dvips32 -o wx.ps manual
590 move wx.ps $(WXDIR)\docs\ps\wx.ps
593 $(WXDIR)\docs\ps\porting.ps: $(WXDIR)\docs\latex\porting\porting.dvi
594 cd $(WXDIR)\docs\latex\porting
595 -dvips32 -o porting.ps porting
596 move porting.ps $(WXDIR)\docs\ps\porting.ps
599 $(WXDIR)\docs\latex\wx\referenc.dvi: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/referenc.tex
600 cd $(WXDIR)\docs\latex\wx
609 $(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi
610 cd $(WXDIR)\docs\latex\wx
611 -dvips32 -o referenc.ps referenc
612 move referenc.ps $(WXDIR)\docs\ps\referenc.ps
615 # In order to force document reprocessing
617 -touch $(WXDIR)\docs\latex\wx\manual.tex
619 updatedocs: touchmanual alldocs
621 # Start Word, running the GeneratePDF macro. MakeManual.dot should be in the
622 # Office StartUp folder, and PDFMaker should be installed.
623 updatepdf: # touchmanual pdfrtf
624 start $(WAITFLAG) "winword d:\wx2\wxWindows\docs\latex\pdf\wx.rtf /mGeneratePDF"
628 # Can't use this or we'll have to distribute all tmake files with wxWindows
629 # makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
632 cd $(WXWIN)\distrib\msw\tmake
633 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
634 copy makefile.$(MFTYPE) $(WXWIN)\src\msw