6 # Copyright: (c) 1999, Dave Webster
10 # Makefile : Builds wxWindows library wx.lib for VisualAge C++
13 # FINAL=1 argument to nmake to build version with no debugging info.
14 # dll builds a library (wxdll.lib) suitable for creating DLLs
16 !include <..\makeva.env>
18 THISDIR=$(WXWIN)\src\os2
20 !if "$(WXMAKINGDLL)" == "1"
21 LIBTARGET=$(WXDIR)\lib\$(WXLIBNAME).dll
22 DUMMYOBJ=$D\dummydll.obj
28 # Please set these according to the settings in setup.h, so we can include
29 # the appropriate libraries in wx.lib
31 # This one overrides the others, to be consistent with the settings in wx_setup.h
32 MINIMAL_WXWINDOWS_SETUP=0
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
47 {..\generic}.cpp{..\generic\$D}.obj:
50 $(CPPFLAGS) /Fo$@ /Tp $<
53 {..\common}.cpp{..\common\$D}.obj:
56 $(CPPFLAGS) /Fo$@ /Tp $<
59 {..\os2}.cpp{..\os2\$D}.obj:
62 $(CPPFLAGS) /Fo$@ /Tp $<
65 {..\html}.cpp{..\html\$D}.obj:
68 $(CPPFLAGS) /Fo$@ /Tp $<
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
90 # ..\generic\$D\imaglist.obj \
91 # ..\generic\$D\treectrl.obj \
92 # ..\generic\$D\listctrl.obj \
93 # ..\generic\$D\notebook.obj \
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.
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
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
187 ..\os2\$D\dialog.obj \
188 ..\os2\$D\frame.obj \
189 ..\os2\$D\window.obj \
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
210 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
211 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(NONESSENTIALOBJS) $(OS2OBJS)
213 # Normal, static library
214 all: $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
216 dirs: $(OS2DIR)\$D $(COMMDIR)\$D $(GENDIR)\$D $(HTMLDIR)\$D
219 test: $(OS2DIR)\$D\wave.obj
220 test2: ..\common\Debug\config.obj
237 # wxWindows library as DLL
239 nmake -f makefile.va all FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=$(NEW_WXLIBNAME)
242 nmake -f makefile.va clean FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=$(NEW_WXLIBNAME)
244 # wxWindows + app as DLL. Only affects main.cpp.
246 nmake -f makefile.va all FINAL=$(FINAL) DLL=1
248 # wxWindows + app as DLL, for Netscape plugin - remove DllMain.
250 nmake -f makefile.va all FINAL=$(FINAL) DLL=1
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.
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.
263 nmake -f makefile.va pch1 WXUSINGDLL=1 FINAL=$(FINAL) NEW_WXLIBNAME=$(NEW_WXLIBNAME)
265 pch1: dirs $(DUMMYOBJ)
268 !if "$(WXMAKINGDLL)" != "1"
272 $(WXDIR)\lib\wx.lib: $D\dummy.obj $(OBJECTS) $(PERIPH_LIBS)
275 ilib $(LINKFLAGS) $@ @<<
281 # Update the import library
282 $(WXDIR)\lib\wx200.lib: $(OBJECTS)
283 implib $(WXDIR)\lib\wx200.lib $(WXDIR)\lib\wx200.def
285 # Update the dynamic link library
286 $(WXDIR)\lib\wx200.dll: $(OBJECTS) $(WXDIR)\lib\wx200.lib
288 /B" $(LINKFLAGS)" /Fe$@
291 $(WXDIR)\lib\wx200.def
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
299 $D\dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\os2\setup.h
301 $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummydll.obj /c /Tp dummydll.cpp
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
309 ..\common\$D\extended.obj: ..\common\extended.c
311 $(CPPFLAGS2) /Fo$@ $(COMMDIR)\extended.c
314 ..\common\$D\y_tab.obj: ..\common\y_tab.c ..\common\lex_yy.c
316 $(CPPFLAGS2) /DUSE_DEFINE /DYY_USE_PROTOS /Fo$@ ..\common\y_tab.c
319 ..\common\y_tab.c: ..\common\dosyacc.c
320 copy "..\common"\dosyacc.c "..\common"\y_tab.c
322 ..\common\lex_yy.c: ..\common\doslex.c
323 copy "..\common"\doslex.c "..\common"\lex_yy.c
325 $(OBJECTS): $(WXDIR)/include/wx/setup.h
327 ..\common\$D\unzip.obj: ..\common\unzip.c
329 $(CPPFLAGS2) /Fo$@ $(COMMDIR)\unzip.c
332 clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm
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
343 -rmdir ..\generic\$(D)
344 -rmdir ..\common\$(D)