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 %wxCommon) {
25 $isCFile = $file =~ /\.c$/;
26 $file =~ s/cp?p?$/obj/;
27 $obj = "\$(MSWDIR)\\" . $file . " ";
28 $project{"WXCOMMONOBJS"} .= $obj;
29 $project{"WXCOBJS"} .= $obj if $isCFile;
32 foreach $file (sort keys %wxMSW) {
33 next if $wxMSW{$file} =~ /\b16\b/;
35 if ( $file =~ /^automtn/ ) {
36 #! comment in old makefile.b32 seems to imply that this file can't
37 #! be compiled with Borland (leads to crash in oleauto sample)
41 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
42 $file =~ s/cp?p?$/obj/;
43 my $obj = "\$(MSWDIR)\\" . $file . " ";
45 $project{"WXMSWOBJS"} .= $obj;
47 #! remember that this file is in ole subdir
48 $project{"WXOLEOBJS"} .= $obj;
54 # This file was automatically generated by tmake at #$ Now()
55 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
59 # Author: Julian Smart
66 # Makefile : Builds wxWindows library wx.lib for MS Windows,
67 # and Borland C++ (32-bit).
70 !error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
74 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
79 # Set all these to 1 if you want to build a dynamic library
85 !include $(WXDIR)\src\makeb32.env
87 # Please set these according to the settings in wx_setup.h, so we can include
88 # the appropriate libraries in wx.lib
96 !if "$(USE_CTL3D)" == "1"
97 #Use WIN32S/WIN95 32 bit version ctl3d32.dll under win95 (Andre Beltman)
98 PERIPH_LIBS=$(WXDIR)\lib\ctl3d32.lib $(PERIPH_LIBS)
99 PERIPH_TARGET=ctl3d $(PERIPH_TARGET)
100 PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET)
103 !if "$(USE_XPM_IN_MSW)" == "1"
104 PERIPH_LIBS=$(WXLIB)\xpm.lib $(PERIPH_LIBS)
105 PERIPH_TARGET=xpm $(PERIPH_TARGET)
106 PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
109 #PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(PERIPH_LIBS)
111 PERIPH_TARGET=zlib png jpeg $(PERIPH_TARGET)
112 PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg $(PERIPH_CLEAN_TARGET)
118 LIBS= cw32 import32 ole2w32
128 DOCDIR = $(WXDIR)\docs
130 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
133 # $(MSWDIR)\colrdlgg.obj \
134 # $(MSWDIR)\fontdlgg.obj \
135 # $(MSWDIR)\helpxlp.obj \
136 # $(MSWDIR)\msgdlgg.obj \
137 # $(MSWDIR)\printps.obj \
138 # $(MSWDIR)\prntdlgg.obj \
139 # $(MSWDIR)\listctrl.obj \
140 # $(MSWDIR)\notebook.obj \
141 # $(MSWDIR)\treectrl.obj
144 $(MSWDIR)\y_tab.obj \
145 #$ ExpandList("WXCOMMONOBJS");
147 MSWOBJS = #$ ExpandList("WXMSWOBJS");
149 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
153 wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
155 all: all_libs all_execs
159 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
161 tlib $(LIBTARGET) /P1024 @&&!
162 +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
167 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
169 -erase $(WXLIBDIR)\wx.dll
170 tlink32 $(LINK_FLAGS) /v @&&!
174 $(PERIPH_LIBS) $(LIBS)
177 implib -c $(LIBTARGET) $(WXLIBDIR)\wx.dll
181 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
182 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
184 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
187 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
190 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
191 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
193 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
194 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
196 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
199 $_ = $project{"WXMSWOBJS"};
203 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
205 $text .= $_ . "\n\n";
209 ########################################################
210 # Common objects (always compiled)
213 $_ = $project{"WXCOMMONOBJS"};
217 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
220 $text .= $_ . "\n\n";
224 ########################################################
225 # Generic objects (not always compiled, depending on
226 # whether platforms have native implementations)
229 $_ = $project{"WXGENERICOBJS"};
235 $text .= $_ . "\n\n";
252 make -f makefile.b32 all_execs
257 make -f makefile.b32 -DCFG=$(CFG) -DFINAL=$(FINAL) -DWXWIN=$(WXDIR) -DDEBUG=$(DEBUG)
262 make -f makefile.b32 clean
272 make -f makefile.b32 clean
277 make -f makefile.b32 lib
282 make -f makefile.b32 clean
292 make -f makefile.b32 clean
297 -H=$(WXDIR)\src\msw\wx32.csm
304 -w-hid # virtual function A hides virtual function B
308 -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm
309 -I$(WXDIR)\include\wx\msw\gnuwin32
321 #-I$(WXDIR)\src\common\wxxpm\libxpm.34b\lib
324 clean: $(PERIPH_CLEAN_TARGET)
330 -erase ..\common\y_tab.c
331 -erase ..\common\lex_yy.c
337 makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
338 cd $(WXWIN)\distrib\msw\tmake
339 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
340 copy makefile.$(MFTYPE) $(WXWIN)\src\msw