]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tmake/basevc.t
Added code to the template to copy setup0.h to setup.h if setup.h does not exist...
[wxWidgets.git] / distrib / msw / tmake / basevc.t
CommitLineData
c0b2a21e
GT
1#!#############################################################################
2#! File: basevc.t
3#! Purpose: tmake template file from which makebase.vc is generated by running
4#! tmake -t basevc wxwin.pro -o makebase.vc
5#! Author: Mark Johnson
6#! Created: 12.03.2001
7#! Version: $Id$
8#!#############################################################################
9#${
10 #! include the code which parses filelist.txt file and initializes
11 #! %wxCommon, %wxGeneric and %wxMSW hashes.
12 IncludeTemplate("filelist.t");
13
14 #! now transform these hashes into $project tags
15 foreach $file (sort keys %wxCommon) {
16 next if $wxCommon{$file} !~ /\bB\b/;
17
18 $file =~ s/cp?p?$/obj/;
19 $project{"WXCOMMONOBJS"} .= "..\\common\\\$D\\" . $file . " "
20 }
21
22 foreach $file (sort keys %wxMSW) {
23 next if $wxMSW{$file} !~ /\bB\b/;
24
25 $file =~ s/cp?p?$/obj/;
26 $project{"WXMSWOBJS"} .= "..\\msw\\\$D\\" . $file . " "
27 }
28
29 foreach $file (sort keys %wxBase) {
30 $file =~ s/cp?p?$/obj/;
31 $project{"WXCOMMONOBJS"} .= "..\\common\\\$D\\" . $file . " "
32 }
33#$}
34# This file was automatically generated by tmake at #$ Now()
35# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BASEVC.T!
36
37# File: makebase.vc
38# Author: Mark Johnson
39# Created: 12 March 2001
40# Updated:
41# Copyright: (c) 1997, Julian Smart
42#
43# "%W% %G%"
44#
45# Makefile : Builds wxWindows library wxBase(d).lib for VC++ (32-bit)
46# Arguments:
47#
48# FINAL=1 argument to nmake to build version with no debugging info.
49#
50# wxUSE_GUI=0 argument to build wxWindows version with no GUI (Console)
51# - makevc.env changes lib name to wxBase(d).lib
52#
53wxUSE_GUI = 0
54!include <../makevc.env>
55
56THISDIR=$(WXWIN)\src\msw
57
58LIBTARGET=$(WXLIB)
59DUMMYOBJ=$D/dummy.obj
60
61# This one overrides the others, to be consistent with the settings in setup.h
62MINIMAL_WXWINDOWS_SETUP=0
63
64PERIPH_LIBS=
65PERIPH_TARGET=
66PERIPH_CLEAN_TARGET=
67
68# These are absolute paths, so that the compiler
69# generates correct __FILE__ symbols for debugging.
70# Otherwise you don't be able to double-click on a memory
71# error to load that file.
72COMMDIR=$(WXDIR)\src\common
73MSWDIR=$(WXDIR)\src\msw
74
75{../common}.cpp{../common/$D}.obj:
76 cl @<<
77$(CPPFLAGS) /Fo$@ /c /Tp $<
78<<
79
80{../common}.c{../common/$D}.obj:
81 cl @<<
82$(CPPFLAGS2) /Fo$@ /c /Tc $<
83<<
84
85{../msw}.cpp{../msw/$D}.obj:
86 cl @<<
87$(CPPFLAGS) /Fo$@ /c /Tp $<
88<<
89
90{../msw}.c{../msw/$D}.obj:
91 cl @<<
92$(CPPFLAGS2) /Fo$@ /c /Tc $<
93<<
94
95COMMONOBJS = \
96 ..\common\$D\y_tab.obj \
97 #$ ExpandList("WXCOMMONOBJS");
98
99MSWOBJS = #$ ExpandList("WXMSWOBJS");
100
101OBJECTS = $(COMMONOBJS) $(MSWOBJS)
102
103# Normal, static library
104#all: setuph dirs $(DUMMYOBJ) $(OBJECTS) $(PERIPH_TARGET) png zlib xpm jpeg tiff $(LIBTARGET)
105all: setuph dirs $(DUMMYOBJ) $(OBJECTS) $(PERIPH_TARGET) zlib $(LIBTARGET)
106
107setuph:
108 cd $(WXDIR)\include\wx\msw
109 if not exist setup.h copy setup0.h setup.h
110 cd $(WXDIR)\src\msw
111
112dirs: $(MSWDIR)\$D $(COMMDIR)\$D
113
114$D:
115 mkdir $D
116
117$(COMMDIR)\$D:
118 mkdir $(COMMDIR)\$D
119
120$(MSWDIR)\$D:
121 mkdir $(MSWDIR)\$D
122
123### Static library
124
125$(WXDIR)\lib\$(WXLIBNAME).lib: $D\dummy.obj $(OBJECTS)
126 -erase $(LIBTARGET)
127 $(implib) @<<
128-out:$@
129-machine:$(CPU)
130$(OBJECTS) $D\dummy.obj $(PERIPH_LIBS)
131<<
132
133$D\dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\msw\setup.h
134 cl $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummy.obj /c /Tp dummy.cpp
135########################################################
136
137..\common\$D\y_tab.obj: ..\common\y_tab.c ..\common\lex_yy.c
138 cl @<<
139$(CPPFLAGS2) /c ..\common\y_tab.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
140<<
141
142..\common\y_tab.c: ..\common\dosyacc.c
143 copy "..\common"\dosyacc.c "..\common"\y_tab.c
144
145..\common\lex_yy.c: ..\common\doslex.c
146 copy "..\common"\doslex.c "..\common"\lex_yy.c
147
148$(OBJECTS): $(WXDIR)/include/wx/setup.h
149
150..\common\$D\unzip.obj: ..\common\unzip.c
151 cl @<<
152$(CPPFLAGS2) /c $(COMMDIR)\unzip.c /Fo$@
153<<
154
155png:
156 cd $(WXDIR)\src\png
157 nmake -f makefile.vc FINAL=$(FINAL) DLL=$(DLL) WXMAKINGDLL=$(WXMAKINGDLL) CRTFLAG=$(CRTFLAG)
158 cd $(WXDIR)\src\msw
159
160clean_png:
161 cd $(WXDIR)\src\png
162 nmake -f makefile.vc clean
163 cd $(WXDIR)\src\msw
164
165zlib:
166 cd $(WXDIR)\src\zlib
167 nmake -f makefile.vc FINAL=$(FINAL) DLL=$(DLL) WXMAKINGDLL=$(WXMAKINGDLL) CRTFLAG=$(CRTFLAG)
168 cd $(WXDIR)\src\msw
169
170clean_zlib:
171 cd $(WXDIR)\src\zlib
172 nmake -f makefile.vc clean
173 cd $(WXDIR)\src\msw
174
175jpeg:
176 cd $(WXDIR)\src\jpeg
177 nmake -f makefile.vc FINAL=$(FINAL) DLL=$(DLL) WXMAKINGDLL=$(WXMAKINGDLL) CRTFLAG=$(CRTFLAG) all
178 cd $(WXDIR)\src\msw
179
180clean_jpeg:
181 cd $(WXDIR)\src\jpeg
182 nmake -f makefile.vc clean
183 cd $(WXDIR)\src\msw
184
185tiff:
186 cd $(WXDIR)\src\tiff
187 nmake -f makefile.vc FINAL=$(FINAL) DLL=$(DLL) WXMAKINGDLL=$(WXMAKINGDLL) CRTFLAG=$(CRTFLAG) all
188 cd $(WXDIR)\src\msw
189
190clean_tiff:
191 cd $(WXDIR)\src\tiff
192 nmake -f makefile.vc clean
193 cd $(WXDIR)\src\msw
194
195xpm:
196 cd $(WXDIR)\src\xpm
197 nmake -f makefile.vc FINAL=$(FINAL) DLL=$(DLL) WXMAKINGDLL=$(WXMAKINGDLL) CRTFLAG=$(CRTFLAG)
198 cd $(WXDIR)\src\msw
199
200clean_xpm:
201 cd $(WXDIR)\src\xpm
202 nmake -f makefile.vc clean
203 cd $(WXDIR)\src\msw
204
205cleanall: clean clean_png clean_zlib clean_xpm clean_jpeg clean_tiff
206 -erase ..\..\lib\wx$(WXVERSION)$(LIBEXT).lib
207 -erase ..\..\lib\wx$(WXVERSION)$(LIBEXT).exp
208 -erase ..\..\lib\wx$(WXVERSION)$(LIBEXT).pdb
209 -erase ..\..\lib\wx$(WXVERSION)$(LIBEXT).ilk
210
211
212clean: $(PERIPH_CLEAN_TARGET)
213 -erase $(LIBTARGET)
214 -erase $(COMMDIR)\$D\*.obj
215 -erase $(COMMDIR)\$D\*.pdb
216 -erase $(COMMDIR)\$D\*.sbr
217 -erase $(COMMDIR)\$D\*.idb
218 -erase $(COMMDIR)\$D\*.pch
219 -erase $(COMMDIR)\y_tab.c
220 -erase $(COMMDIR)\lex_yy.c
221 -erase $(MSWDIR)\$D\*.idb
222 -erase $(MSWDIR)\$D\*.pdb
223 -erase $(MSWDIR)\$D\*.pch
224 -erase $(MSWDIR)\$D\*.obj
225 -erase $(MSWDIR)\$D\*.sbr
226 -erase $(MSWDIR)\$D\*.pdb
227 -rmdir $(D)
228 -rmdir ..\common\$(D)
229