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 if ( $wxGeneric{$file} =~ /\b(G|16|U)\b/ ) {
22 $file =~ s/cp?p?$/obj/;
23 $project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " "
26 foreach $file (sort keys %wxCommon) {
27 $file =~ s/cp?p?$/obj/;
28 $project{"WXCOMMONOBJS"} .= "\$(MSWDIR)\\" . $file . " "
31 foreach $file (sort keys %wxMSW) {
32 next if $wxMSW{$file} =~ /\b16\b/;
34 if ( file =~ /automtn/ ) {
35 #! comment in old makefile.b32 seems to imply that this file can't
36 #! be compiled with Borland (leads to crash in oleauto sample)
40 $file =~ s/cp?p?$/obj/;
41 $project{"WXMSWOBJS"} .= "\$(MSWDIR)\\" . $file . " "
45 # This file was automatically generated by tmake at #$ Now()
46 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
50 # Author: Julian Smart
57 # Makefile : Builds wxWindows library wx.lib for MS Windows,
58 # and Borland C++ (32-bit).
61 !error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
65 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
70 # Set all these to 1 if you want to build a dynamic library
76 !include $(WXDIR)\src\makeb32.env
78 # Please set these according to the settings in wx_setup.h, so we can include
79 # the appropriate libraries in wx.lib
87 !if "$(USE_CTL3D)" == "1"
88 #Use WIN32S/WIN95 32 bit version ctl3d32.dll under win95 (Andre Beltman)
89 PERIPH_LIBS=$(WXDIR)\lib\ctl3d32.lib $(PERIPH_LIBS)
90 PERIPH_TARGET=ctl3d $(PERIPH_TARGET)
91 PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET)
94 !if "$(USE_XPM_IN_MSW)" == "1"
95 PERIPH_LIBS=$(WXLIB)\xpm.lib $(PERIPH_LIBS)
96 PERIPH_TARGET=xpm $(PERIPH_TARGET)
97 PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
100 #PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(PERIPH_LIBS)
102 PERIPH_TARGET=zlib png jpeg $(PERIPH_TARGET)
103 PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg $(PERIPH_CLEAN_TARGET)
109 LIBS= cw32 import32 ole2w32
119 DOCDIR = $(WXDIR)\docs
121 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
124 # $(MSWDIR)\colrdlgg.obj \
125 # $(MSWDIR)\fontdlgg.obj \
126 # $(MSWDIR)\helpxlp.obj \
127 # $(MSWDIR)\msgdlgg.obj \
128 # $(MSWDIR)\printps.obj \
129 # $(MSWDIR)\prntdlgg.obj \
130 # $(MSWDIR)\listctrl.obj \
131 # $(MSWDIR)\notebook.obj \
132 # $(MSWDIR)\treectrl.obj
135 $(MSWDIR)\y_tab.obj \
136 #$ ExpandList("WXCOMMONOBJS");
138 MSWOBJS = #$ ExpandList("WXMSWOBJS");
140 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
144 wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
146 all: all_libs all_execs
150 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
152 tlib $(LIBTARGET) /P512 @&&!
153 +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
158 $(LIBTARGET): $(DUMMY).obj $(OBJECTS)
160 -erase $(WXLIBDIR)\wx.dll
161 tlink32 $(LINK_FLAGS) /v @&&!
165 $(PERIPH_LIBS) $(LIBS)
168 implib -c $(LIBTARGET) $(WXLIBDIR)\wx.dll
172 dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
173 dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
175 $(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
178 # $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
181 $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
182 copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
184 $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
185 copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
187 # $(OBJECTS): $(WXDIR)\include\wx\setup.h
190 $_ = $project{"WXMSWOBJS"};
195 $text .= $_ . "\n\n";
199 ########################################################
200 # Common objects (always compiled)
203 $_ = $project{"WXCOMMONOBJS"};
209 $text .= $_ . "\n\n";
213 ########################################################
214 # Generic objects (not always compiled, depending on
215 # whether platforms have native implementations)
218 $_ = $project{"WXGENERICOBJS"};
224 $text .= $_ . "\n\n";
241 make -f makefile.b32 all_execs
246 make -f makefile.b32 -DCFG=$(CFG) -DFINAL=$(FINAL) -DWXWIN=$(WXDIR) -DDEBUG=$(DEBUG)
251 make -f makefile.b32 clean
261 make -f makefile.b32 clean
266 make -f makefile.b32 lib
271 make -f makefile.b32 clean
281 make -f makefile.b32 clean
286 -H=$(WXDIR)\src\msw\wx32.csm
293 -w-hid # virtual function A hides virtual function B
297 -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm
298 -I$(WXDIR)\include\wx\msw\gnuwin32
310 #-I$(WXDIR)\src\common\wxxpm\libxpm.34b\lib
313 clean: $(PERIPH_CLEAN_TARGET)
319 -erase ..\common\y_tab.c
320 -erase ..\common\lex_yy.c