]> git.saurik.com Git - wxWidgets.git/blob - src/os2/makefile.va
Fixed include gsockunix.h line
[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\dc.obj \
187 ..\os2\$D\dialog.obj \
188 ..\os2\$D\frame.obj \
189 ..\os2\$D\window.obj \
190
191 HTMLOBJS = \
192 ..\html\$D\htmlcell.obj \
193 ..\html\$D\htmlfilter.obj \
194 ..\html\$D\htmlhelp.obj \
195 ..\html\$D\htmlhelp_io.obj \
196 ..\html\$D\htmlparser.obj \
197 ..\html\$D\htmltag.obj \
198 ..\html\$D\htmlwin.obj \
199 ..\html\$D\htmlwinparser.obj \
200 ..\html\$D\mod_fonts.obj \
201 ..\html\$D\mod_hline.obj \
202 ..\html\$D\mod_image.obj \
203 ..\html\$D\mod_layout.obj \
204 ..\html\$D\mod_links.obj \
205 ..\html\$D\mod_list.obj \
206 ..\html\$D\mod_pre.obj \
207 ..\html\$D\mod_tables.obj \
208 ..\html\$D\search.obj
209
210 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
211 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(NONESSENTIALOBJS) $(OS2OBJS)
212
213 # Normal, static library
214 all: $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
215
216 dirs: $(OS2DIR)\$D $(COMMDIR)\$D $(GENDIR)\$D $(HTMLDIR)\$D
217
218
219 test: $(OS2DIR)\$D\wave.obj
220 test2: ..\common\Debug\config.obj
221
222 $D:
223 md $D
224
225 $(COMMDIR)\$D:
226 md $(COMMDIR)\$D
227
228 $(OS2DIR)\$D:
229 md $(OS2DIR)\$D
230
231 $(GENDIR)\$D:
232 md $(GENDIR)\$D
233
234 $(HTMLDIR)\$D:
235 md $(HTMLDIR)\$D
236
237 # wxWindows library as DLL
238 dll:
239 nmake -f makefile.va all FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=$(NEW_WXLIBNAME)
240
241 cleandll:
242 nmake -f makefile.va clean FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=$(NEW_WXLIBNAME)
243
244 # wxWindows + app as DLL. Only affects main.cpp.
245 dllapp:
246 nmake -f makefile.va all FINAL=$(FINAL) DLL=1
247
248 # wxWindows + app as DLL, for Netscape plugin - remove DllMain.
249 dllnp:
250 nmake -f makefile.va all FINAL=$(FINAL) DLL=1
251
252 # Use this to make dummy.obj and generate a PCH.
253 # You might use the dll target, then the pch target, in order to
254 # generate a DLL, then a PCH/dummy.obj for compiling your applications with.
255 #
256 # Explanation: Normally, when compiling a static version of wx.lib, your dummy.obj/PCH
257 # are associated with wx.lib. When using a DLL version of wxWindows, however,
258 # the DLL is compiled without a PCH, so you only need it for compiling the app.
259 # In fact headers are compiled differently depending on whether a DLL is being made
260 # or an app is calling the DLL exported functionality (WXDLLEXPORT is different
261 # in each case) so you couldn't use the same PCH.
262 pch:
263 nmake -f makefile.va pch1 WXUSINGDLL=1 FINAL=$(FINAL) NEW_WXLIBNAME=$(NEW_WXLIBNAME)
264
265 pch1: dirs $(DUMMYOBJ)
266 echo $(DUMMYOBJ)
267
268 !if "$(WXMAKINGDLL)" != "1"
269
270 ### Static library
271
272 $(WXDIR)\lib\wx.lib: $D\dummy.obj $(OBJECTS) $(PERIPH_LIBS)
273 touch $(LIBTARGET)
274 del $(LIBTARGET)
275 ilib $(LINKFLAGS) $@ @<<
276 $**
277 <<
278
279 !else
280
281 # Update the import library
282 $(WXDIR)\lib\wx200.lib: $(OBJECTS)
283 implib $(WXDIR)\lib\wx200.lib $(WXDIR)\lib\wx200.def
284
285 # Update the dynamic link library
286 $(WXDIR)\lib\wx200.dll: $(OBJECTS) $(WXDIR)\lib\wx200.lib
287 icc @<<
288 /B" $(LINKFLAGS)" /Fe$@
289 $(LIBS)
290 $(OBJECTS)
291 $(WXDIR)\lib\wx200.def
292 <<
293
294 !endif
295
296 $D\dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\os2\setup.h
297 icc $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummy.obj /Tp dummy.cpp
298
299 $D\dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\os2\setup.h
300 icc @<<
301 $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummydll.obj /c /Tp dummydll.cpp
302 <<
303
304 # If taking wxWindows from CVS, setup.h doesn't exist yet.
305 $(WXDIR)\include\wx\os2\setup.h: $(WXDIR)\include\wx\os2\setup0.h
306 copy "$(WXDIR)"\include\wx\os2\setup.h "$(WXDIR)"\include\wx\os2\setup.bak
307 copy "$(WXDIR)"\include\wx\os2\setup0.h "$(WXDIR)"\include\wx\os2\setup.h
308
309 ..\common\$D\extended.obj: ..\common\extended.c
310 icc @<<
311 $(CPPFLAGS2) /Fo$@ $(COMMDIR)\extended.c
312 <<
313
314 ..\common\$D\y_tab.obj: ..\common\y_tab.c ..\common\lex_yy.c
315 icc @<<
316 $(CPPFLAGS2) /DUSE_DEFINE /DYY_USE_PROTOS /Fo$@ ..\common\y_tab.c
317 <<
318
319 ..\common\y_tab.c: ..\common\dosyacc.c
320 copy "..\common"\dosyacc.c "..\common"\y_tab.c
321
322 ..\common\lex_yy.c: ..\common\doslex.c
323 copy "..\common"\doslex.c "..\common"\lex_yy.c
324
325 $(OBJECTS): $(WXDIR)/include/wx/setup.h
326
327 ..\common\$D\unzip.obj: ..\common\unzip.c
328 icc @<<
329 $(CPPFLAGS2) /Fo$@ $(COMMDIR)\unzip.c
330 <<
331
332 clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm
333 -erase $(LIBTARGET)
334 -erase ..\..\lib\wx200.dll
335 -erase ..\..\lib\wx200.lib
336 -erase $(GENDIR)\$D\*.obj
337 -erase $(COMMDIR)\$D\*.obj
338 -erase $(COMMDIR)\\y_tab.c
339 -erase $(COMMDIR)\lex_yy.c
340 -erase $(OS2DIR)\$D\*.obj
341 -rmdir $(D)
342 -rmdir ole\$(D)
343 -rmdir ..\generic\$(D)
344 -rmdir ..\common\$(D)
345
346 cleanall: clean
347