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)
158 ARCHINCDIR=$(WXDIR)\lib\msw
159 ARCHSETUPH=$(ARCHINCDIR)\wx\setup.h
163 wx: $(ARCHINCDIR)\wx makesetuph makearchsetuph $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
167 # Copy the in-CVS setup0.h to setup.h if necessary
169 cd $(WXDIR)\include\wx\msw
170 if not exist setup.h copy setup0.h setup.h
173 # Copy include\wx\msw\setup.h to the architecture-specific location
175 copy $(WXDIR)\include\wx\msw\setup.h $(ARCHSETUPH)
180 -mkdir $(ARCHINCDIR)\wx
184 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
186 tlib "$(LIBTARGET)" /P1024 @&&!
187 +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
192 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
194 -erase $(WXLIBDIR)\wx.dll
195 $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&!
199 $(PERIPH_LIBS) $(LIBS)
202 -erase $(WXLIBDIR)\version.res
203 brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc
204 implib -c $(LIBTARGET) $(WXLIBDIR)\wx.dll
208 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
209 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res
211 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
214 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
217 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
218 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
220 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
221 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
223 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
226 $_ = $project{"WXMSWOBJS"};
230 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
231 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
233 $text .= $_ . "\n\n";
237 ########################################################
238 # Common objects (always compiled)
241 $_ = $project{"WXCOMMONOBJS"};
245 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
248 $text .= $_ . "\n\n";
252 ########################################################
253 # Generic objects (not always compiled, depending on
254 # whether platforms have native implementations)
257 $_ = $project{"WXGENERICOBJS"};
263 $text .= $_ . "\n\n";
267 ########################################################
268 # HTML objects (always compiled)
271 $_ = $project{"WXHTMLOBJS"};
277 $text .= $_ . "\n\n";
294 make -f makefile.b32 all_execs
304 make -f makefile.b32 clean
309 make -f makefile.b32 lib
314 make -f makefile.b32 clean
324 make -f makefile.b32 clean
328 cd $(WXDIR)\src\regex
329 make -f makefile.b32 lib
333 cd $(WXDIR)\src\regex
334 make -f makefile.b32 clean
339 make -f makefile.b32 lib
344 make -f makefile.b32 clean
350 -H=$(WXDIR)\src\msw\wx32.csm
358 -w-hid # virtual function A hides virtual function B
361 -I$(ARCHINCDIR);-I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff
362 -I$(WXDIR)\include\wx\msw\gnuwin32
364 -L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk
374 clean: $(PERIPH_CLEAN_TARGET)
376 -erase $(WXLIBDIR)\wx.dll
377 -erase $(WXLIBDIR)\wx.tds
378 -erase $(WXLIBDIR)\wx.il?
384 -erase ..\common\y_tab.c
385 -erase ..\common\lex_yy.c
391 docs: allhlp allhtml allpdfrtf
393 hlp: wxhlp portinghlp
394 wxhlp: $(DOCDIR)/winhelp/wx.hlp
395 prophlp: $(DOCDIR)/winhelp/prop.hlp
396 refhlp: $(DOCDIR)/winhelp/techref.hlp
397 rtf: $(DOCDIR)/winhelp/wx.rtf
398 proprtf: $(DOCDIR)/winhelp/prop.rtf
399 pdfrtf: $(DOCDIR)/pdf/wx.rtf
400 proppdfrtf: $(DOCDIR)/pdf/prop.rtf
401 refpdfrtf: $(DOCDIR)/pdf/techref.rtf
402 html: wxhtml portinghtml
403 wxhtml: $(DOCDIR)\html\wx\wx.htm
404 htmlhelp: $(DOCDIR)\html\wx\wx.chm
405 prophtml: $(DOCDIR)\html\proplist\prop.htm
407 wxps: $(WXDIR)\docs\ps\wx.ps
408 propps: $(WXDIR)\docs\ps\prop.ps
409 referencps: $(WXDIR)\docs\ps\referenc.ps
411 portinghtml: $(DOCDIR)\html\porting\port.htm
412 portingrtf: $(DOCDIR)/winhelp/porting.rtf
413 portinghlp: $(DOCDIR)/winhelp/porting.hlp
414 portingpdfrtf: $(DOCDIR)/pdf/porting.rtf
415 portingps: $(WXDIR)\docs\ps\porting.ps
417 allhlp: wxhlp portinghlp prophlp
418 cd $(WXDIR)\utils\dialoged\src
419 make -f makefile.b32 hlp
422 # cd $(WXDIR)\utils\wxhelp\src
423 # make -f makefile.b32 hlp
424 # cd $(WXDIR)\utils\tex2rtf\src
425 # make -f makefile.b32 hlp
426 # cd $(WXDIR)\utils\wxgraph\src
427 # make -f makefile.b32 hlp
428 # cd $(WXDIR)\utils\wxchart\src
429 # make -f makefile.b32 hlp
430 # cd $(WXDIR)\utils\wxtree\src
431 # make -f makefile.b32 hlp
432 # cd $(WXDIR)\utils\wxbuild\src
433 # make -f makefile.b32 hlp
434 # cd $(WXDIR)\utils\wxgrid\src
435 # make -f makefile.b32 hlp
437 allhtml: wxhtml portinghtml prophtml
438 cd $(WXDIR)\utils\dialoged\src
439 make -f makefile.b32 html
442 # make -f makefile.b32 html
443 # cd $(WXDIR)\utils\dialoged\src
444 # make -f makefile.b32 html
445 # cd $(WXDIR)\utils\hytext\src
446 # make -f makefile.b32 html
447 # cd $(WXDIR)\utils\wxhelp\src
448 # make -f makefile.b32 html
449 # cd $(WXDIR)\utils\tex2rtf\src
450 # make -f makefile.b32 html
451 # cd $(WXDIR)\utils\wxgraph\src
452 # make -f makefile.b32 html
453 # cd $(WXDIR)\utils\wxchart\src
454 # make -f makefile.b32 html
455 # cd $(WXDIR)\utils\wxtree\src
456 # make -f makefile.b32 html
458 allps: wxps referencps portingps propps
459 cd $(WXDIR)\utils\dialoged\src
460 make -f makefile.b32 ps
463 allpdfrtf: pdfrtf portingpdfrtf proppdfrtf
464 cd $(WXDIR)\utils\dialoged\src
465 make -f makefile.b32 pdfrtf
468 # cd $(WXDIR)\utils\wxhelp\src
469 # make -f makefile.b32 ps
470 # cd $(WXDIR)\utils\tex2rtf\src
471 # make -f makefile.b32 ps
472 # cd $(WXDIR)\utils\wxgraph\src
473 # make -f makefile.b32 ps
474 # cd $(WXDIR)\utils\wxchart\src
475 # make -f makefile.b32 ps
476 # cd $(WXDIR)\utils\wxtree\src
477 # make -f makefile.b32 ps
480 $(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj
481 cd $(DOCDIR)/latex/wx
484 move wx.hlp $(DOCDIR)\winhelp\wx.hlp
485 move wx.cnt $(DOCDIR)\winhelp\wx.cnt
488 $(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOCDIR)/latex/porting/porting.hpj
489 cd $(DOCDIR)/latex/porting
492 move porting.hlp $(DOCDIR)\winhelp\porting.hlp
493 move porting.cnt $(DOCDIR)\winhelp\porting.cnt
496 $(DOCDIR)/winhelp/prop.hlp: $(DOCDIR)/latex/proplist/prop.rtf $(DOCDIR)/latex/proplist/prop.hpj
497 cd $(DOCDIR)/latex/proplist
500 move prop.hlp $(DOCDIR)\winhelp\prop.hlp
501 move prop.cnt $(DOCDIR)\winhelp\prop.cnt
504 $(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj
505 cd $(DOCDIR)/latex/techref
508 move techref.hlp $(DOCDIR)\winhelp\techref.hlp
509 move techref.cnt $(DOCDIR)\winhelp\techref.cnt
512 $(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
513 cd $(DOCDIR)\latex\wx
514 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/latex/wx/wx.rtf -twice -winhelp
517 $(DOCDIR)/latex/porting/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
518 cd $(DOCDIR)\latex\porting
519 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/latex/porting/porting.rtf -twice -winhelp
522 $(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
523 cd $(DOCDIR)\latex\proplist
524 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/prop.rtf -twice -winhelp
527 $(DOCDIR)/latex/techref/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
528 cd $(DOCDIR)\latex\techref
529 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/latex/techref/techref.rtf -twice -winhelp
532 $(DOCDIR)/pdf/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex
533 cd $(DOCDIR)\latex\wx
534 -copy *.wmf $(DOCDIR)\pdf
535 -copy *.bmp $(DOCDIR)\pdf
536 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/pdf/wx.rtf -twice -rtf
539 $(DOCDIR)/pdf/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
540 cd $(DOCDIR)\latex\porting
541 -copy *.wmf $(DOCDIR)\pdf
542 -copy *.bmp $(DOCDIR)\pdf
543 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/pdf/porting.rtf -twice -rtf
546 $(DOCDIR)/pdf/prop.rtf: $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/body.tex $(DOCDIR)/latex/proplist/classes.tex $(DOCDIR)/latex/proplist/changes.tex
547 cd $(DOCDIR)\latex\proplist
548 -copy *.wmf $(DOCDIR)\pdf
549 -copy *.bmp $(DOCDIR)\pdf
550 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/pdf/prop.rtf -twice -rtf
553 $(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
554 cd $(DOCDIR)\latex\techref
555 -copy *.wmf $(DOCDIR)\pdf
556 -copy *.bmp $(DOCDIR)\pdf
557 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/pdf/techref.rtf -twice -rtf
560 $(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
561 cd $(DOCDIR)\latex\wx
562 -mkdir $(DOCDIR)\html\wx
563 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html
564 -erase $(DOCDIR)\html\wx\*.con
565 -erase $(DOCDIR)\html\wx\*.ref
566 -erase $(DOCDIR)\latex\wx\*.con
567 -erase $(DOCDIR)\latex\wx\*.ref
570 $(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp
576 $(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex
577 cd $(DOCDIR)\latex\porting
578 -mkdir $(DOCDIR)\html\porting
579 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html
580 -erase $(DOCDIR)\html\porting\*.con
581 -erase $(DOCDIR)\html\porting\*.ref
582 -erase $(DOCDIR)\latex\porting\*.con
583 -erase $(DOCDIR)\latex\porting\*.ref
586 $(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
587 cd $(DOCDIR)\latex\proplist
588 -mkdir $(DOCDIR)\html\proplist
589 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\html\proplist\prop.htm -twice -html
590 -erase $(DOCDIR)\html\proplist\*.con
591 -erase $(DOCDIR)\html\proplist\*.ref
592 -erase $(DOCDIR)\latex\proplist\*.con
593 -erase $(DOCDIR)\latex\proplist\*.ref
596 $(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex
597 cd $(WXDIR)\docs\latex\wx
606 $(WXDIR)\docs\latex\porting\porting.dvi: $(DOCDIR)/latex/porting/porting.tex
607 cd $(WXDIR)\docs\latex\porting
616 $(WXDIR)\docs\ps\wx.ps: $(WXDIR)\docs\latex\wx\manual.dvi
617 cd $(WXDIR)\docs\latex\wx
618 -dvips32 -o wx.ps manual
619 move wx.ps $(WXDIR)\docs\ps\wx.ps
622 $(WXDIR)\docs\ps\porting.ps: $(WXDIR)\docs\latex\porting\porting.dvi
623 cd $(WXDIR)\docs\latex\porting
624 -dvips32 -o porting.ps porting
625 move porting.ps $(WXDIR)\docs\ps\porting.ps
628 $(WXDIR)\docs\latex\wx\referenc.dvi: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/referenc.tex
629 cd $(WXDIR)\docs\latex\wx
638 $(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi
639 cd $(WXDIR)\docs\latex\wx
640 -dvips32 -o referenc.ps referenc
641 move referenc.ps $(WXDIR)\docs\ps\referenc.ps
644 # In order to force document reprocessing
646 -touch $(WXDIR)\docs\latex\wx\manual.tex
648 updatedocs: touchmanual alldocs
650 # Start Word, running the GeneratePDF macro. MakeManual.dot should be in the
651 # Office StartUp folder, and PDFMaker should be installed.
652 updatepdf: # touchmanual pdfrtf
653 start $(WAITFLAG) "winword d:\wx2\wxWindows\docs\latex\pdf\wx.rtf /mGeneratePDF"
657 # Can't use this or we'll have to distribute all tmake files with wxWindows
658 # makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
661 cd $(WXWIN)\distrib\msw\tmake
662 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
663 copy makefile.$(MFTYPE) $(WXWIN)\src\msw