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).
81 # BCCDIR now defined in ../makeb32.env
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 regex $(PERIPH_TARGET)
116 PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff clean_regex $(PERIPH_CLEAN_TARGET)
122 LIBS= cw32mti import32 ole2w32 odbc32 zlib winpng jpeg tiff regex
133 DOCDIR = $(WXDIR)\docs
135 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
138 # $(MSWDIR)\colrdlgg.obj \
139 # $(MSWDIR)\fontdlgg.obj \
140 # $(MSWDIR)\msgdlgg.obj \
141 # $(MSWDIR)\printps.obj \
142 # $(MSWDIR)\prntdlgg.obj \
143 # $(MSWDIR)\listctrl.obj \
144 # $(MSWDIR)\notebook.obj \
145 # $(MSWDIR)\treectrl.obj
148 $(MSWDIR)\y_tab.obj \
149 #$ ExpandList("WXCOMMONOBJS");
151 MSWOBJS = #$ ExpandList("WXMSWOBJS");
153 HTMLOBJS = #$ ExpandList("WXHTMLOBJS");
155 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
159 wx: $(ARCHINCDIR)\wx makesetuph makearchsetuph $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
163 # Copy the in-CVS setup0.h to setup.h if necessary
165 cd $(WXDIR)\include\wx\msw
166 if not exist setup.h copy setup0.h setup.h
169 # Copy include\wx\msw\setup.h to the architecture-specific location
171 copy $(WXDIR)\include\wx\msw\setup.h $(ARCHSETUPH)
176 -mkdir $(ARCHINCDIR)\wx
181 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
183 tlib "$(LIBTARGET)" /P1024 $(LINKDEBUGFLAGS) @&&!
184 +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
189 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
192 $(LINK) $(LINK_FLAGS) $(LINKDEBUGFLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk @&&!
196 $(PERIPH_LIBS) $(LIBS)
199 implib -c $(LIBTARGET) $(WXDLL)
202 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
203 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res
206 brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc
208 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
211 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
214 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
215 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
217 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
218 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
220 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
223 $_ = $project{"WXMSWOBJS"};
227 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
228 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
230 $text .= $_ . "\n\n";
234 ########################################################
235 # Common objects (always compiled)
238 $_ = $project{"WXCOMMONOBJS"};
242 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
245 $text .= $_ . "\n\n";
249 ########################################################
250 # Generic objects (not always compiled, depending on
251 # whether platforms have native implementations)
254 $_ = $project{"WXGENERICOBJS"};
260 $text .= $_ . "\n\n";
264 ########################################################
265 # HTML objects (always compiled)
268 $_ = $project{"WXHTMLOBJS"};
274 $text .= $_ . "\n\n";
281 ${MAKE} -f makefile.b32
286 ${MAKE} -f makefile.b32
291 ${MAKE} -f makefile.b32 all_execs
296 ${MAKE} -f makefile.b32
301 ${MAKE} -f makefile.b32 clean
306 ${MAKE} -f makefile.b32 lib
311 ${MAKE} -f makefile.b32 clean
316 ${MAKE} -f makefile.b32
321 ${MAKE} -f makefile.b32 clean
325 cd $(WXDIR)\src\regex
326 ${MAKE} -f makefile.b32 lib
330 cd $(WXDIR)\src\regex
331 ${MAKE} -f makefile.b32 clean
336 ${MAKE} -f makefile.b32 lib
341 ${MAKE} -f makefile.b32 clean
347 -H=$(WXDIR)\src\msw\wx32.csm
355 -w-hid # virtual function A hides virtual function B
358 -I$(ARCHINCDIR);$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff
359 -I$(WXDIR)\include\wx\msw\gnuwin32
361 -L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk
371 clean: $(PERIPH_CLEAN_TARGET)
372 -erase $(WXLIBDIR)\wx.tds
373 -erase $(WXLIBDIR)\wx.il?
378 -erase ..\common\y_tab.c
379 -erase ..\common\lex_yy.c
385 docs: allhlp allhtml allpdfrtf
387 hlp: wxhlp portinghlp
388 wxhlp: $(DOCDIR)/winhelp/wx.hlp
389 prophlp: $(DOCDIR)/winhelp/prop.hlp
390 refhlp: $(DOCDIR)/winhelp/techref.hlp
391 rtf: $(DOCDIR)/winhelp/wx.rtf
392 proprtf: $(DOCDIR)/winhelp/prop.rtf
393 pdfrtf: $(DOCDIR)/pdf/wx.rtf
394 proppdfrtf: $(DOCDIR)/pdf/prop.rtf
395 refpdfrtf: $(DOCDIR)/pdf/techref.rtf
396 html: wxhtml portinghtml
397 wxhtml: $(DOCDIR)\html\wx\wx.htm
398 htmlhelp: $(DOCDIR)\html\wx\wx.chm
399 prophtml: $(DOCDIR)\html\proplist\prop.htm
401 wxps: $(WXDIR)\docs\ps\wx.ps
402 propps: $(WXDIR)\docs\ps\prop.ps
403 referencps: $(WXDIR)\docs\ps\referenc.ps
405 portinghtml: $(DOCDIR)\html\porting\port.htm
406 portingrtf: $(DOCDIR)/winhelp/porting.rtf
407 portinghlp: $(DOCDIR)/winhelp/porting.hlp
408 portingpdfrtf: $(DOCDIR)/pdf/porting.rtf
409 portingps: $(WXDIR)\docs\ps\porting.ps
411 allhlp: wxhlp portinghlp prophlp
412 cd $(WXDIR)\utils\dialoged\src
413 ${MAKE} -f makefile.b32 hlp
416 # cd $(WXDIR)\utils\wxhelp\src
417 # ${MAKE} -f makefile.b32 hlp
418 # cd $(WXDIR)\utils\tex2rtf\src
419 # ${MAKE} -f makefile.b32 hlp
420 # cd $(WXDIR)\utils\wxgraph\src
421 # ${MAKE} -f makefile.b32 hlp
422 # cd $(WXDIR)\utils\wxchart\src
423 # ${MAKE} -f makefile.b32 hlp
424 # cd $(WXDIR)\utils\wxtree\src
425 # ${MAKE} -f makefile.b32 hlp
426 # cd $(WXDIR)\utils\wxbuild\src
427 # ${MAKE} -f makefile.b32 hlp
428 # cd $(WXDIR)\utils\wxgrid\src
429 # ${MAKE} -f makefile.b32 hlp
431 allhtml: wxhtml portinghtml prophtml
432 cd $(WXDIR)\utils\dialoged\src
433 ${MAKE} -f makefile.b32 html
436 # ${MAKE} -f makefile.b32 html
437 # cd $(WXDIR)\utils\dialoged\src
438 # ${MAKE} -f makefile.b32 html
439 # cd $(WXDIR)\utils\hytext\src
440 # ${MAKE} -f makefile.b32 html
441 # cd $(WXDIR)\utils\wxhelp\src
442 # ${MAKE} -f makefile.b32 html
443 # cd $(WXDIR)\utils\tex2rtf\src
444 # ${MAKE} -f makefile.b32 html
445 # cd $(WXDIR)\utils\wxgraph\src
446 # ${MAKE} -f makefile.b32 html
447 # cd $(WXDIR)\utils\wxchart\src
448 # ${MAKE} -f makefile.b32 html
449 # cd $(WXDIR)\utils\wxtree\src
450 # ${MAKE} -f makefile.b32 html
452 allps: wxps referencps portingps propps
453 cd $(WXDIR)\utils\dialoged\src
454 ${MAKE} -f makefile.b32 ps
457 allpdfrtf: pdfrtf portingpdfrtf proppdfrtf
458 cd $(WXDIR)\utils\dialoged\src
459 ${MAKE} -f makefile.b32 pdfrtf
462 # cd $(WXDIR)\utils\wxhelp\src
463 # ${MAKE} -f makefile.b32 ps
464 # cd $(WXDIR)\utils\tex2rtf\src
465 # ${MAKE} -f makefile.b32 ps
466 # cd $(WXDIR)\utils\wxgraph\src
467 # ${MAKE} -f makefile.b32 ps
468 # cd $(WXDIR)\utils\wxchart\src
469 # ${MAKE} -f makefile.b32 ps
470 # cd $(WXDIR)\utils\wxtree\src
471 # ${MAKE} -f makefile.b32 ps
474 $(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj
475 cd $(DOCDIR)/latex/wx
478 move wx.hlp $(DOCDIR)\winhelp\wx.hlp
479 move wx.cnt $(DOCDIR)\winhelp\wx.cnt
482 $(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOCDIR)/latex/porting/porting.hpj
483 cd $(DOCDIR)/latex/porting
486 move porting.hlp $(DOCDIR)\winhelp\porting.hlp
487 move porting.cnt $(DOCDIR)\winhelp\porting.cnt
490 $(DOCDIR)/winhelp/prop.hlp: $(DOCDIR)/latex/proplist/prop.rtf $(DOCDIR)/latex/proplist/prop.hpj
491 cd $(DOCDIR)/latex/proplist
494 move prop.hlp $(DOCDIR)\winhelp\prop.hlp
495 move prop.cnt $(DOCDIR)\winhelp\prop.cnt
498 $(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj
499 cd $(DOCDIR)/latex/techref
502 move techref.hlp $(DOCDIR)\winhelp\techref.hlp
503 move techref.cnt $(DOCDIR)\winhelp\techref.cnt
506 $(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
507 cd $(DOCDIR)\latex\wx
508 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/latex/wx/wx.rtf -twice -winhelp
511 $(DOCDIR)/latex/porting/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
512 cd $(DOCDIR)\latex\porting
513 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/latex/porting/porting.rtf -twice -winhelp
516 $(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
517 cd $(DOCDIR)\latex\proplist
518 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/prop.rtf -twice -winhelp
521 $(DOCDIR)/latex/techref/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
522 cd $(DOCDIR)\latex\techref
523 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/latex/techref/techref.rtf -twice -winhelp
526 $(DOCDIR)/pdf/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex
527 cd $(DOCDIR)\latex\wx
528 -copy *.wmf $(DOCDIR)\pdf
529 -copy *.bmp $(DOCDIR)\pdf
530 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/pdf/wx.rtf -twice -rtf
533 $(DOCDIR)/pdf/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
534 cd $(DOCDIR)\latex\porting
535 -copy *.wmf $(DOCDIR)\pdf
536 -copy *.bmp $(DOCDIR)\pdf
537 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/pdf/porting.rtf -twice -rtf
540 $(DOCDIR)/pdf/prop.rtf: $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/body.tex $(DOCDIR)/latex/proplist/classes.tex $(DOCDIR)/latex/proplist/changes.tex
541 cd $(DOCDIR)\latex\proplist
542 -copy *.wmf $(DOCDIR)\pdf
543 -copy *.bmp $(DOCDIR)\pdf
544 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/pdf/prop.rtf -twice -rtf
547 $(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
548 cd $(DOCDIR)\latex\techref
549 -copy *.wmf $(DOCDIR)\pdf
550 -copy *.bmp $(DOCDIR)\pdf
551 -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/pdf/techref.rtf -twice -rtf
554 $(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
555 cd $(DOCDIR)\latex\wx
556 -mkdir $(DOCDIR)\html\wx
557 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html
558 -erase $(DOCDIR)\html\wx\*.con
559 -erase $(DOCDIR)\html\wx\*.ref
560 -erase $(DOCDIR)\latex\wx\*.con
561 -erase $(DOCDIR)\latex\wx\*.ref
564 $(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp
570 $(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex
571 cd $(DOCDIR)\latex\porting
572 -mkdir $(DOCDIR)\html\porting
573 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html
574 -erase $(DOCDIR)\html\porting\*.con
575 -erase $(DOCDIR)\html\porting\*.ref
576 -erase $(DOCDIR)\latex\porting\*.con
577 -erase $(DOCDIR)\latex\porting\*.ref
580 $(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
581 cd $(DOCDIR)\latex\proplist
582 -mkdir $(DOCDIR)\html\proplist
583 -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\html\proplist\prop.htm -twice -html
584 -erase $(DOCDIR)\html\proplist\*.con
585 -erase $(DOCDIR)\html\proplist\*.ref
586 -erase $(DOCDIR)\latex\proplist\*.con
587 -erase $(DOCDIR)\latex\proplist\*.ref
590 $(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex
591 cd $(WXDIR)\docs\latex\wx
600 $(WXDIR)\docs\latex\porting\porting.dvi: $(DOCDIR)/latex/porting/porting.tex
601 cd $(WXDIR)\docs\latex\porting
610 $(WXDIR)\docs\ps\wx.ps: $(WXDIR)\docs\latex\wx\manual.dvi
611 cd $(WXDIR)\docs\latex\wx
612 -dvips32 -o wx.ps manual
613 move wx.ps $(WXDIR)\docs\ps\wx.ps
616 $(WXDIR)\docs\ps\porting.ps: $(WXDIR)\docs\latex\porting\porting.dvi
617 cd $(WXDIR)\docs\latex\porting
618 -dvips32 -o porting.ps porting
619 move porting.ps $(WXDIR)\docs\ps\porting.ps
622 $(WXDIR)\docs\latex\wx\referenc.dvi: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/referenc.tex
623 cd $(WXDIR)\docs\latex\wx
632 $(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi
633 cd $(WXDIR)\docs\latex\wx
634 -dvips32 -o referenc.ps referenc
635 move referenc.ps $(WXDIR)\docs\ps\referenc.ps
638 # In order to force document reprocessing
640 -touch $(WXDIR)\docs\latex\wx\manual.tex
642 updatedocs: touchmanual alldocs
644 # Start Word, running the GeneratePDF macro. MakeManual.dot should be in the
645 # Office StartUp folder, and PDFMaker should be installed.
646 updatepdf: # touchmanual pdfrtf
647 start $(WAITFLAG) "winword d:\wx2\wxWindows\docs\latex\pdf\wx.rtf /mGeneratePDF"
651 # Can't use this or we'll have to distribute all tmake files with wxWindows
652 # makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
655 cd $(WXWIN)\distrib\msw\tmake
656 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
657 copy makefile.$(MFTYPE) $(WXWIN)\src\msw