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 = "\$(OBJ_PATH)\\" . $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 = "\$(OBJ_PATH)\\" . $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"} .= "\$(OBJ_PATH)\\" . $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 regex $(PERIPH_TARGET)
89 PERIPH_CLEAN_TARGET=clean_zlib clean_regex $(PERIPH_CLEAN_TARGET)
95 LIBS= cw32mti import32 ole2w32 odbc32 zlib regex
106 DOCDIR = $(WXDIR)\docs
109 #$ ExpandList("WXCOMMONOBJS");
111 MSWOBJS = #$ ExpandList("WXMSWOBJS");
113 OBJECTS = $(COMMONOBJS) $(MSWOBJS)
117 wx: $(ARCHINCDIR)\wx makesetuph makearchsetuph makeoutdir $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
124 # Copy the in-CVS setup0.h to setup.h if necessary
126 cd $(WXDIR)\include\wx\msw
127 if not exist setup.h copy setup0.h setup.h
130 # Copy include\wx\msw\setup.h to the architecture-specific location
132 copy $(WXDIR)\include\wx\msw\setup.h $(ARCHSETUPH)
137 -mkdir $(ARCHINCDIR)\wx
142 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
144 tlib "$(WXLIB)" /P1024 @&&!
145 +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
150 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
153 $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&!
155 $(WXLIBDIR)\$(WXLIBNAME)
157 $(PERIPH_LIBS) $(LIBS)
160 implib -c $(LIBTARGET) $(WXLIBDIR)\$(WXLIBNAME).dll
163 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
164 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res
167 brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc
170 $_ = $project{"WXMSWOBJS"};
174 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
177 if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
179 $text .= $_ . "\n\n";
183 ########################################################
184 # Common objects (always compiled)
187 $_ = $project{"WXCOMMONOBJS"};
191 $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
194 $text .= $_ . "\n\n";
201 ${MAKE} -f makefile.b32
206 ${MAKE} -f makefile.b32
211 ${MAKE} -f makefile.b32 all_execs
218 ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib
223 ${MAKE} -f makefile.b32 clean
228 cd $(WXDIR)\src\regex
229 ${MAKE} -f makefile.b32 wxUSE_GUI=0 lib
233 cd $(WXDIR)\src\regex
234 ${MAKE} -f makefile.b32 clean
242 -H=$(WXDIR)\src\msw\wx32.csm
250 -w-hid # virtual function A hides virtual function B
254 -I$(ARCHINCDIR);$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff;$(THISDIR)
255 -I$(WXDIR)\include\wx\msw\gnuwin32
257 -L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk
267 clean: $(PERIPH_CLEAN_TARGET)
268 -$(RM) $(WXLIBDIR)\*.tds
269 -$(RM) $(WXLIBDIR)\*.il?
270 -$(RM) $(OBJ_PATH)\*.obj
271 -$(RM) $(OBJ_PATH)\*.pch
272 -$(RM) $(OBJ_PATH)\*.csm
273 -$(RM) $(OBJ_PATH)\"wx32.#??"
276 -$(RM) $(OBJ_PATH)\*.cfg
279 cleanall: clean cleancfg
283 cd $(WXWIN)\distrib\msw\tmake
284 perl -S tmake -tb32base wxwin.pro -o makebase.b32
285 copy makebase.b32 $(WXWIN)\src\msw