1 #!#############################################################################
3 #! Purpose: tmake template file from which makebase.b32 is generated by running
4 #! tmake -t b32 wxwin.pro
5 #! Author: Michael Fielding
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 %wxCommon) {
17 next if $wxCommon{$file} !~ /\bB\b/;
19 $isCFile = $file =~ /\.c$/;
20 $file =~ s/cp?p?$/obj/;
21 $obj = "\$(MSWDIR)\\" . $file . " ";
22 $project{"WXCOMMONOBJS"} .= $obj;
23 $project{"WXCOBJS"} .= $obj if $isCFile;
26 foreach $file (sort keys %wxMSW) {
27 next if $wxMSW{$file} !~ /\bB\b/;
29 $isCFile = $file =~ /\.c$/;
31 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
32 $file =~ s/cp?p?$/obj/;
33 my $obj = "\$(MSWDIR)\\" . $file . " ";
35 $project{"WXMSWOBJS"} .= $obj;
37 #! remember that this file is in ole subdir
38 $project{"WXOLEOBJS"} .= $obj;
40 $project{"WXCOBJS"} .= $obj if $isCFile;
43 foreach $file (sort keys %wxBase) {
44 $isCFile = $file =~ /\.c$/;
45 $file =~ s/cp?p?$/obj/;
46 $project{"WXCOMMONOBJS"} .= "\$(MSWDIR)\\" . $file . " ";
47 $project{"WXCOBJS"} .= $obj if $isCFile;
53 # This file was automatically generated by tmake
54 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
58 # Author: Julian Smart
60 # Updated: Michael Fielding, 2002
65 # Makefile : Builds wxWindows library wxbase.lib for MS Windows,
66 # and Borland C++ (32-bit).
68 # BCCDIR now defined in ../makeb32.env
71 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
75 THISDIR = $(WXDIR)\src\msw
77 # Set all these to 1 if you want to build a dynamic library
85 !include $(WXDIR)\src\makeb32.env
88 PERIPH_TARGET=zlib png jpeg tiff regex $(PERIPH_TARGET)
89 PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff clean_regex $(PERIPH_CLEAN_TARGET)
95 LIBS= cw32mti import32 ole2w32 odbc32 zlib winpng jpeg tiff regex
106 DOCDIR = $(WXDIR)\docs
109 $(MSWDIR)\y_tab.obj \
110 #$ ExpandList("WXCOMMONOBJS");
112 MSWOBJS = #$ ExpandList("WXMSWOBJS");
114 OBJECTS = $(COMMONOBJS) $(MSWOBJS)
118 wx: $(ARCHINCDIR)\wx makesetuph makearchsetuph $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
122 # Copy the in-CVS setup0.h to setup.h if necessary
124 cd $(WXDIR)\include\wx\msw
125 if not exist setup.h copy setup0.h setup.h
128 # Copy include\wx\msw\setup.h to the architecture-specific location
130 copy $(WXDIR)\include\wx\msw\setup.h $(ARCHSETUPH)
135 -mkdir $(ARCHINCDIR)\wx
139 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
141 tlib "$(WXLIB)" /P1024 @&&!
142 +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
147 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
150 $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&!
152 $(WXLIBDIR)\$(WXLIBNAME)
154 $(PERIPH_LIBS) $(LIBS)
157 implib -c $(LIBTARGET) $(WXLIBDIR)\$(WXLIBNAME).dll
160 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
161 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res
164 brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc
166 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
169 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
172 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
173 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
175 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
176 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
180 $_ = $project{"WXMSWOBJS"};
184 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
185 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
187 $text .= $_ . "\n\n";
191 ########################################################
192 # Common objects (always compiled)
195 $_ = $project{"WXCOMMONOBJS"};
199 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
202 $text .= $_ . "\n\n";
209 ${MAKE} -f makefile.b32
214 ${MAKE} -f makefile.b32
219 ${MAKE} -f makefile.b32 all_execs
224 ${MAKE} -f makefile.b32 wxUSE_GUI=0
229 ${MAKE} -f makefile.b32 clean
234 ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib
239 ${MAKE} -f makefile.b32 clean
244 ${MAKE} -f makefile.b32 wxUSE_GUI=0
249 ${MAKE} -f makefile.b32 clean
253 cd $(WXDIR)\src\regex
254 ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib
258 cd $(WXDIR)\src\regex
259 ${MAKE} -f makefile.b32 clean
264 ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib
269 ${MAKE} -f makefile.b32 clean
275 -H=$(WXDIR)\src\msw\wx32.csm
283 -w-hid # virtual function A hides virtual function B
287 -I$(ARCHINCDIR);$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff;$(THISDIR)
288 -I$(WXDIR)\include\wx\msw\gnuwin32
290 -L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk
300 clean: $(PERIPH_CLEAN_TARGET)
301 -erase $(WXLIBDIR)\wx.tds
302 -erase $(WXLIBDIR)\wx.il?
307 -erase ..\common\y_tab.c
308 -erase ..\common\lex_yy.c
313 cd $(WXWIN)\distrib\msw\tmake
314 tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
315 copy makefile.$(MFTYPE) $(WXWIN)\src\msw