]> git.saurik.com Git - wxWidgets.git/blob - src/os2/makefile.va
Made changes to allow build with new mingw32/gcc-2.95
[wxWidgets.git] / src / os2 / makefile.va
1 #
2 # File: makefile.va
3 # Author: Dave Webster
4 # Created: 1999
5 # Updated:
6 # Copyright: (c) 1999, Dave Webster
7 #
8 # "%W% %G%"
9 #
10 # Makefile : Builds wxWindows library wx.lib for VisualAge C++
11 # Arguments:
12 #
13 # FINAL=1 argument to nmake to build version with no debugging info.
14 # dll builds a library (wxdll.lib) suitable for creating DLLs
15 #
16 !include <..\makeva.env>
17
18 THISDIR=$(WXWIN)\src\os2
19
20 !if "$(WXMAKINGDLL)" == "1"
21 LIBTARGET=$(WXDIR)\lib\$(WXLIBNAME).dll
22 DUMMYOBJ=$D\dummydll.obj
23 !else
24 LIBTARGET=$(WXLIB)
25 DUMMYOBJ=$D\dummy.obj
26 !endif
27
28 # Please set these according to the settings in setup.h, so we can include
29 # the appropriate libraries in wx.lib
30
31 # This one overrides the others, to be consistent with the settings in wx_setup.h
32 MINIMAL_WXWINDOWS_SETUP=0
33
34 PERIPH_LIBS=
35 PERIPH_TARGET=
36 PERIPH_CLEAN_TARGET=
37
38 # These are absolute paths, so that the compiler
39 # generates correct __FILE__ symbols for debugging.
40 # Otherwise you don't be able to double-click on a memory
41 # error to load that file.
42 GENDIR=$(WXDIR)\src\generic
43 COMMDIR=$(WXDIR)\src\common
44 OS2DIR=$(WXDIR)\src\os2
45 HTMLDIR = $(WXDIR)\src\html
46
47 {..\generic}.cpp{..\generic\$D}.obj:
48 @echo $<
49 icc @<<
50 $(CPPFLAGS) /Fo$@ /Tp $<
51 <<
52
53 {..\common}.cpp{..\common\$D}.obj:
54 @echo $<
55 icc @<<
56 $(CPPFLAGS) /Fo$@ /Tp $<
57 <<
58
59 {..\os2}.cpp{..\os2\$D}.obj:
60 @echo $<
61 icc @<<
62 $(CPPFLAGS) /Fo$@ /Tp $<
63 <<
64
65 {..\html}.cpp{..\html\$D}.obj:
66 @echo $<
67 icc @<<
68 $(CPPFLAGS) /Fo$@ /Tp $<
69 <<
70
71 GENERICOBJS= \
72 ..\generic\$D\choicdgg.obj \
73 ..\generic\$D\gridg.obj \
74 ..\generic\$D\laywin.obj \
75 ..\generic\$D\panelg.obj \
76 ..\generic\$D\progdlgg.obj \
77 ..\generic\$D\prop.obj \
78 ..\generic\$D\propform.obj \
79 ..\generic\$D\proplist.obj \
80 ..\generic\$D\sashwin.obj \
81 ..\generic\$D\scrolwin.obj \
82 ..\generic\$D\splitter.obj \
83 ..\generic\$D\statusbr.obj \
84 ..\generic\$D\tabg.obj \
85 ..\generic\$D\textdlgg.obj \
86 ..\generic\$D\extdlgg.obj \
87 ..\generic\$D\tipdlg.obj \
88 ..\generic\$D\busyinfo.obj
89
90 # ..\generic\$D\imaglist.obj \
91 # ..\generic\$D\treectrl.obj \
92 # ..\generic\$D\listctrl.obj \
93 # ..\generic\$D\notebook.obj \
94
95 # These are generic things that don't need to be compiled on PM,
96 # but sometimes it's useful to do so for testing purposes.
97 NONESSENTIALOBJS= \
98 ..\generic\$D\printps.obj \
99 ..\generic\$D\prntdlgg.obj \
100 ..\generic\$D\msgdlgg.obj \
101 ..\generic\$D\helpxlp.obj \
102 ..\generic\$D\colrdlgg.obj \
103 ..\generic\$D\fontdlgg.obj
104
105 COMMONOBJS = \
106 ..\common\$D\cmndata.obj \
107 ..\common\$D\config.obj \
108 ..\common\$D\dcbase.obj \
109 ..\common\$D\db.obj \
110 ..\common\$D\dbtable.obj \
111 ..\common\$D\docview.obj \
112 ..\common\$D\docmdi.obj \
113 ..\common\$D\dynarray.obj \
114 ..\common\$D\dynlib.obj \
115 ..\common\$D\event.obj \
116 ..\common\$D\file.obj \
117 ..\common\$D\filefn.obj \
118 ..\common\$D\fileconf.obj \
119 ..\common\$D\framecmn.obj \
120 ..\common\$D\ftp.obj \
121 ..\common\$D\gdicmn.obj \
122 ..\common\$D\image.obj \
123 ..\common\$D\imagbmp.obj \
124 ..\common\$D\imagjpeg.obj \
125 ..\common\$D\imagpng.obj \
126 ..\common\$D\imaggif.obj \
127 ..\common\$D\intl.obj \
128 ..\common\$D\ipcbase.obj \
129 ..\common\$D\helpbase.obj \
130 ..\common\$D\layout.obj \
131 ..\common\$D\log.obj \
132 ..\common\$D\memory.obj \
133 ..\common\$D\mimetype.obj \
134 ..\common\$D\module.obj \
135 ..\common\$D\odbc.obj \
136 ..\common\$D\object.obj \
137 ..\common\$D\prntbase.obj \
138 ..\common\$D\resource.obj \
139 ..\common\$D\tbarbase.obj \
140 ..\common\$D\tbarsmpl.obj \
141 ..\common\$D\textfile.obj \
142 ..\common\$D\timercmn.obj \
143 ..\common\$D\utilscmn.obj \
144 ..\common\$D\validate.obj \
145 ..\common\$D\valgen.obj \
146 ..\common\$D\valtext.obj \
147 ..\common\$D\date.obj \
148 ..\common\$D\hash.obj \
149 ..\common\$D\list.obj \
150 ..\common\$D\paper.obj \
151 ..\common\$D\string.obj \
152 ..\common\$D\socket.obj \
153 ..\common\$D\sckaddr.obj \
154 ..\common\$D\sckint.obj \
155 ..\common\$D\sckfile.obj \
156 ..\common\$D\sckipc.obj \
157 ..\common\$D\sckstrm.obj \
158 ..\common\$D\url.obj \
159 ..\common\$D\http.obj \
160 ..\common\$D\protocol.obj \
161 ..\common\$D\time.obj \
162 ..\common\$D\tokenzr.obj \
163 ..\common\$D\wxexpr.obj \
164 ..\common\$D\y_tab.obj \
165 ..\common\$D\extended.obj \
166 ..\common\$D\process.obj \
167 ..\common\$D\wfstream.obj \
168 ..\common\$D\mstream.obj \
169 ..\common\$D\zstream.obj \
170 ..\common\$D\stream.obj \
171 ..\common\$D\datstrm.obj \
172 ..\common\$D\objstrm.obj \
173 ..\common\$D\variant.obj \
174 ..\common\$D\dlgcmn.obj \
175 ..\common\$D\wincmn.obj \
176 ..\common\$D\txtstrm.obj \
177 ..\common\$D\wxchar.obj \
178 ..\common\$D\unzip.obj \
179 ..\common\$D\zipstream.obj \
180 ..\common\$D\filesys.obj \
181 ..\common\$D\fs_inet.obj \
182 ..\common\$D\fs_zip.obj
183
184
185 OS2OBJS = \
186 ..\os2\$D\window.obj \
187
188 HTMLOBJS = \
189 ..\html\$D\htmlcell.obj \
190 ..\html\$D\htmlfilter.obj \
191 ..\html\$D\htmlhelp.obj \
192 ..\html\$D\htmlhelp_io.obj \
193 ..\html\$D\htmlparser.obj \
194 ..\html\$D\htmltag.obj \
195 ..\html\$D\htmlwin.obj \
196 ..\html\$D\htmlwinparser.obj \
197 ..\html\$D\mod_fonts.obj \
198 ..\html\$D\mod_hline.obj \
199 ..\html\$D\mod_image.obj \
200 ..\html\$D\mod_layout.obj \
201 ..\html\$D\mod_links.obj \
202 ..\html\$D\mod_list.obj \
203 ..\html\$D\mod_pre.obj \
204 ..\html\$D\mod_tables.obj \
205 ..\html\$D\search.obj
206
207 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
208 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(NONESSENTIALOBJS) $(OS2OBJS)
209
210 # Normal, static library
211 all: $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
212
213 dirs: $(OS2DIR)\$D $(COMMDIR)\$D $(GENDIR)\$D $(HTMLDIR)\$D
214
215
216 test: $(OS2DIR)\$D\wave.obj
217 test2: ..\common\Debug\config.obj
218
219 $D:
220 md $D
221
222 $(COMMDIR)\$D:
223 md $(COMMDIR)\$D
224
225 $(OS2DIR)\$D:
226 md $(OS2DIR)\$D
227
228 $(GENDIR)\$D:
229 md $(GENDIR)\$D
230
231 $(HTMLDIR)\$D:
232 md $(HTMLDIR)\$D
233
234 # wxWindows library as DLL
235 dll:
236 nmake -f makefile.va all FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=$(NEW_WXLIBNAME)
237
238 cleandll:
239 nmake -f makefile.va clean FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=$(NEW_WXLIBNAME)
240
241 # wxWindows + app as DLL. Only affects main.cpp.
242 dllapp:
243 nmake -f makefile.va all FINAL=$(FINAL) DLL=1
244
245 # wxWindows + app as DLL, for Netscape plugin - remove DllMain.
246 dllnp:
247 nmake -f makefile.va all FINAL=$(FINAL) DLL=1
248
249 # Use this to make dummy.obj and generate a PCH.
250 # You might use the dll target, then the pch target, in order to
251 # generate a DLL, then a PCH/dummy.obj for compiling your applications with.
252 #
253 # Explanation: Normally, when compiling a static version of wx.lib, your dummy.obj/PCH
254 # are associated with wx.lib. When using a DLL version of wxWindows, however,
255 # the DLL is compiled without a PCH, so you only need it for compiling the app.
256 # In fact headers are compiled differently depending on whether a DLL is being made
257 # or an app is calling the DLL exported functionality (WXDLLEXPORT is different
258 # in each case) so you couldn't use the same PCH.
259 pch:
260 nmake -f makefile.va pch1 WXUSINGDLL=1 FINAL=$(FINAL) NEW_WXLIBNAME=$(NEW_WXLIBNAME)
261
262 pch1: dirs $(DUMMYOBJ)
263 echo $(DUMMYOBJ)
264
265 !if "$(WXMAKINGDLL)" != "1"
266
267 ### Static library
268
269 $(WXDIR)\lib\wx.lib: $D\dummy.obj $(OBJECTS) $(PERIPH_LIBS)
270 del $(LIBTARGET)
271 ilib $(LINKFLAGS) $@ @<<
272 $**
273 <<
274
275 !else
276
277 # Update the import library
278 $(WXDIR)\lib\wx200.lib: $(OBJECTS)
279 implib $(WXDIR)\lib\wx200.lib $(WXDIR)\lib\wx200.def
280
281 # Update the dynamic link library
282 $(WXDIR)\lib\wx200.dll: $(OBJECTS) $(WXDIR)\lib\wx200.lib
283 icc @<<
284 /B" $(LINKFLAGS)" /Fe$@
285 $(LIBS)
286 $(OBJECTS)
287 $(WXDIR)\lib\wx200.def
288 <<
289
290 !endif
291
292 $D\dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\os2\setup.h
293 icc $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummy.obj /Tp dummy.cpp
294
295 $D\dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\os2\setup.h
296 icc @<<
297 $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummydll.obj /c /Tp dummydll.cpp
298 <<
299
300 # If taking wxWindows from CVS, setup.h doesn't exist yet.
301 $(WXDIR)\include\wx\os2\setup.h: $(WXDIR)\include\wx\os2\setup0.h
302 copy "$(WXDIR)"\include\wx\os2\setup.h "$(WXDIR)"\include\wx\os2\setup.bak
303 copy "$(WXDIR)"\include\wx\os2\setup0.h "$(WXDIR)"\include\wx\os2\setup.h
304
305 ..\common\$D\extended.obj: ..\common\extended.c
306 icc @<<
307 $(CPPFLAGS2) /Fo$@ $(COMMDIR)\extended.c
308 <<
309
310 ..\common\$D\y_tab.obj: ..\common\y_tab.c ..\common\lex_yy.c
311 icc @<<
312 $(CPPFLAGS2) /DUSE_DEFINE /DYY_USE_PROTOS /Fo$@ ..\common\y_tab.c
313 <<
314
315 ..\common\y_tab.c: ..\common\dosyacc.c
316 copy "..\common"\dosyacc.c "..\common"\y_tab.c
317
318 ..\common\lex_yy.c: ..\common\doslex.c
319 copy "..\common"\doslex.c "..\common"\lex_yy.c
320
321 $(OBJECTS): $(WXDIR)/include/wx/setup.h
322
323 ..\common\$D\unzip.obj: ..\common\unzip.c
324 icc @<<
325 $(CPPFLAGS2) /Fo$@ $(COMMDIR)\unzip.c
326 <<
327
328 clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm
329 -erase $(LIBTARGET)
330 -erase ..\..\lib\wx200.dll
331 -erase ..\..\lib\wx200.lib
332 -erase $(GENDIR)\$D\*.obj
333 -erase $(COMMDIR)\$D\*.obj
334 -erase $(COMMDIR)\\y_tab.c
335 -erase $(COMMDIR)\lex_yy.c
336 -erase $(OS2DIR)\$D\*.obj
337 -rmdir $(D)
338 -rmdir ole\$(D)
339 -rmdir ..\generic\$(D)
340 -rmdir ..\common\$(D)
341
342 cleanall: clean
343