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 $isCFile = $file =~ /\.c$/;
43 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
44 $file =~ s/cp?p?$/obj/;
45 my $obj = "\$(MSWDIR)\\" . $file . " ";
47 $project{"WXMSWOBJS"} .= $obj;
49 #! remember that this file is in ole subdir
50 $project{"WXOLEOBJS"} .= $obj;
52 $project{"WXCOBJS"} .= $obj if $isCFile;
56 # This file was automatically generated by tmake at #$ Now()
57 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
61 # Author: Julian Smart
68 # Makefile : Builds wxWindows library wx.lib for MS Windows,
69 # and Borland C++ (32-bit).
72 !error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
76 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
81 # Set all these to 1 if you want to build a dynamic library
87 !include $(WXDIR)\src\makeb32.env
89 # Please set these according to the settings in wx_setup.h, so we can include
90 # the appropriate libraries in wx.lib
98 !if "$(USE_CTL3D)" == "1"
99 #Use WIN32S/WIN95 32 bit version ctl3d32.dll under win95 (Andre Beltman)
100 PERIPH_LIBS=$(WXDIR)\lib\ctl3d32.lib $(PERIPH_LIBS)
101 PERIPH_TARGET=ctl3d $(PERIPH_TARGET)
102 PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET)
105 !if "$(USE_XPM_IN_MSW)" == "1"
106 PERIPH_LIBS=$(WXLIB)\xpm.lib $(PERIPH_LIBS)
107 PERIPH_TARGET=xpm $(PERIPH_TARGET)
108 PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
111 #PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(PERIPH_LIBS)
113 PERIPH_TARGET=zlib png jpeg $(PERIPH_TARGET)
114 PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg $(PERIPH_CLEAN_TARGET)
120 LIBS= cw32 import32 ole2w32
130 DOCDIR = $(WXDIR)\docs
132 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
135 # $(MSWDIR)\colrdlgg.obj \
136 # $(MSWDIR)\fontdlgg.obj \
137 # $(MSWDIR)\helpxlp.obj \
138 # $(MSWDIR)\msgdlgg.obj \
139 # $(MSWDIR)\printps.obj \
140 # $(MSWDIR)\prntdlgg.obj \
141 # $(MSWDIR)\listctrl.obj \
142 # $(MSWDIR)\notebook.obj \
143 # $(MSWDIR)\treectrl.obj
146 $(MSWDIR)\y_tab.obj \
147 #$ ExpandList("WXCOMMONOBJS");
149 MSWOBJS = #$ ExpandList("WXMSWOBJS");
151 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
155 wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
157 all: all_libs all_execs
161 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
163 tlib $(LIBTARGET) /P1024 @&&!
164 +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
169 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
171 -erase $(WXLIBDIR)\wx.dll
172 tlink32 $(LINK_FLAGS) /v @&&!
176 $(PERIPH_LIBS) $(LIBS)
179 implib -c $(LIBTARGET) $(WXLIBDIR)\wx.dll
183 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
184 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
186 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
189 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
192 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
193 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
195 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
196 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
198 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
201 $_ = $project{"WXMSWOBJS"};
205 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
206 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
208 $text .= $_ . "\n\n";
212 ########################################################
213 # Common objects (always compiled)
216 $_ = $project{"WXCOMMONOBJS"};
220 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
223 $text .= $_ . "\n\n";
227 ########################################################
228 # Generic objects (not always compiled, depending on
229 # whether platforms have native implementations)
232 $_ = $project{"WXGENERICOBJS"};
238 $text .= $_ . "\n\n";
255 make -f makefile.b32 all_execs
260 make -f makefile.b32 -DCFG=$(CFG) -DFINAL=$(FINAL) -DWXWIN=$(WXDIR) -DDEBUG=$(DEBUG)
265 make -f makefile.b32 clean
275 make -f makefile.b32 clean
280 make -f makefile.b32 lib
285 make -f makefile.b32 clean
295 make -f makefile.b32 clean
300 -H=$(WXDIR)\src\msw\wx32.csm
307 -w-hid # virtual function A hides virtual function B
311 -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm
312 -I$(WXDIR)\include\wx\msw\gnuwin32
324 #-I$(WXDIR)\src\common\wxxpm\libxpm.34b\lib
327 clean: $(PERIPH_CLEAN_TARGET)
333 -erase ..\common\y_tab.c
334 -erase ..\common\lex_yy.c
340 # Can't use this or we'll have to distribute all tmake files with wxWindows
341 # makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
344 cd $(WXWIN)\distrib\msw\tmake
345 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
346 copy makefile.$(MFTYPE) $(WXWIN)\src\msw