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
25 COMTEMPTGT1=$(WXDIR)\lib\wxcom1.lib
26 COMTEMPTGT2=$(WXDIR)\lib\wxcom2.lib
27 GENTEMPTGT=$(WXDIR)\lib\wxgen.lib
28 NONESTEMPTGT=$(WXDIR)\lib\wxnones.lib
29 OS2TEMPTGT=$(WXDIR)\lib\wxos2.lib
33 # Please set these according to the settings in setup.h, so we can include
34 # the appropriate libraries in wx.lib
36 # This one overrides the others, to be consistent with the settings in wx_setup.h
37 MINIMAL_WXWINDOWS_SETUP=0
43 # These are absolute paths, so that the compiler
44 # generates correct __FILE__ symbols for debugging.
45 # Otherwise you don't be able to double-click on a memory
46 # error to load that file.
47 GENDIR=$(WXDIR)\src\generic
48 COMMDIR=$(WXDIR)\src\common
49 OS2DIR=$(WXDIR)\src\os2
50 HTMLDIR = $(WXDIR)\src\html
52 {..\generic}.cpp{..\generic\$D}.obj:
55 $(CPPFLAGS) /Fo$@ /Tp $<
58 {..\common}.cpp{..\common\$D}.obj:
61 $(CPPFLAGS) /Fo$@ /Tp $<
64 {..\os2}.cpp{..\os2\$D}.obj:
67 $(CPPFLAGS) /Fo$@ /Tp $<
70 {..\html}.cpp{..\html\$D}.obj:
73 $(CPPFLAGS) /Fo$@ /Tp $<
77 ..\generic\$D\caret.obj \
78 ..\generic\$D\choicdgg.obj \
79 ..\generic\$D\gridg.obj \
80 ..\generic\$D\laywin.obj \
81 ..\generic\$D\panelg.obj \
82 ..\generic\$D\progdlgg.obj \
83 ..\generic\$D\prop.obj \
84 ..\generic\$D\propform.obj \
85 ..\generic\$D\proplist.obj \
86 ..\generic\$D\sashwin.obj \
87 ..\generic\$D\scrolwin.obj \
88 ..\generic\$D\splitter.obj \
89 ..\generic\$D\statusbr.obj \
90 ..\generic\$D\tabg.obj \
91 ..\generic\$D\textdlgg.obj \
92 ..\generic\$D\tipdlg.obj \
93 ..\generic\$D\busyinfo.obj
95 # ..\generic\$D\imaglist.obj \
96 # ..\generic\$D\treectrl.obj \
97 # ..\generic\$D\listctrl.obj \
98 # ..\generic\$D\notebook.obj \
119 # These are generic things that don't need to be compiled on PM,
120 # but sometimes it's useful to do so for testing purposes.
122 ..\generic\$D\printps.obj \
123 ..\generic\$D\prntdlgg.obj \
124 ..\generic\$D\msgdlgg.obj \
125 ..\generic\$D\helpxlp.obj \
126 ..\generic\$D\colrdlgg.obj \
127 ..\generic\$D\fontdlgg.obj
130 ..\common\$D\cmndata.obj \
131 ..\common\$D\config.obj \
132 ..\common\$D\dcbase.obj \
133 ..\common\$D\db.obj \
134 ..\common\$D\dbtable.obj \
135 ..\common\$D\docview.obj \
136 ..\common\$D\docmdi.obj \
137 ..\common\$D\dynarray.obj \
138 ..\common\$D\dynlib.obj \
139 ..\common\$D\event.obj \
140 ..\common\$D\file.obj \
141 ..\common\$D\filefn.obj \
142 ..\common\$D\fileconf.obj \
143 ..\common\$D\framecmn.obj \
144 ..\common\$D\ftp.obj \
145 ..\common\$D\gdicmn.obj \
146 ..\common\$D\image.obj \
147 ..\common\$D\imagbmp.obj \
148 ..\common\$D\imagjpeg.obj \
149 ..\common\$D\imagpng.obj \
150 ..\common\$D\imaggif.obj \
151 ..\common\$D\intl.obj \
152 ..\common\$D\ipcbase.obj \
153 ..\common\$D\helpbase.obj \
154 ..\common\$D\layout.obj \
155 ..\common\$D\log.obj \
156 ..\common\$D\memory.obj \
157 ..\common\$D\mimetype.obj \
158 ..\common\$D\module.obj \
159 ..\common\$D\odbc.obj \
160 ..\common\$D\object.obj \
161 ..\common\$D\prntbase.obj \
162 ..\common\$D\resource.obj \
163 ..\common\$D\tbarbase.obj \
164 ..\common\$D\tbarsmpl.obj \
165 ..\common\$D\textfile.obj \
166 ..\common\$D\timercmn.obj \
167 ..\common\$D\utilscmn.obj \
168 ..\common\$D\validate.obj \
169 ..\common\$D\valgen.obj \
170 ..\common\$D\valtext.obj \
171 ..\common\$D\date.obj \
172 ..\common\$D\hash.obj \
173 ..\common\$D\list.obj \
174 ..\common\$D\paper.obj \
175 ..\common\$D\string.obj \
176 ..\common\$D\socket.obj \
177 ..\common\$D\sckaddr.obj \
178 ..\common\$D\sckfile.obj \
179 ..\common\$D\sckipc.obj \
180 ..\common\$D\sckstrm.obj \
181 ..\common\$D\url.obj \
182 ..\common\$D\http.obj \
183 ..\common\$D\protocol.obj \
184 ..\common\$D\time.obj \
185 ..\common\$D\tokenzr.obj \
186 ..\common\$D\wxexpr.obj \
187 ..\common\$D\y_tab.obj \
188 ..\common\$D\extended.obj \
189 ..\common\$D\process.obj \
190 ..\common\$D\wfstream.obj \
191 ..\common\$D\mstream.obj \
192 ..\common\$D\zstream.obj \
193 ..\common\$D\stream.obj \
194 ..\common\$D\datstrm.obj \
195 ..\common\$D\objstrm.obj \
196 ..\common\$D\variant.obj \
197 ..\common\$D\dlgcmn.obj \
198 ..\common\$D\wincmn.obj \
199 ..\common\$D\txtstrm.obj \
200 ..\common\$D\wxchar.obj \
201 ..\common\$D\unzip.obj \
202 ..\common\$D\filesys.obj \
203 ..\common\$D\fs_inet.obj \
204 ..\common\$D\fs_zip.obj
286 ..\os2\$D\accel.obj \
288 ..\os2\$D\bitmap.obj \
289 ..\os2\$D\bmpbuttn.obj \
290 ..\os2\$D\brush.obj \
291 ..\os2\$D\button.obj \
292 ..\os2\$D\checkbox.obj \
293 ..\os2\$D\checklst.obj \
294 ..\os2\$D\choice.obj \
295 ..\os2\$D\clipbrd.obj \
296 ..\os2\$D\colordlg.obj \
297 ..\os2\$D\colour.obj \
298 ..\os2\$D\combobox.obj \
299 ..\os2\$D\control.obj \
300 ..\os2\$D\cursor.obj \
303 ..\os2\$D\dcclient.obj \
304 ..\os2\$D\dcmemory.obj \
305 ..\os2\$D\dcprint.obj \
306 ..\os2\$D\dcscreen.obj \
307 ..\os2\$D\dialog.obj \
308 ..\os2\$D\frame.obj \
338 ..\html\$D\htmlcell.obj \
339 ..\html\$D\htmlfilter.obj \
340 ..\html\$D\htmlhelp.obj \
341 ..\html\$D\htmlhelp_io.obj \
342 ..\html\$D\htmlparser.obj \
343 ..\html\$D\htmltag.obj \
344 ..\html\$D\htmlwin.obj \
345 ..\html\$D\htmlwinparser.obj \
346 ..\html\$D\mod_fonts.obj \
347 ..\html\$D\mod_hline.obj \
348 ..\html\$D\mod_image.obj \
349 ..\html\$D\mod_layout.obj \
350 ..\html\$D\mod_links.obj \
351 ..\html\$D\mod_list.obj \
352 ..\html\$D\mod_pre.obj \
353 ..\html\$D\mod_tables.obj \
354 ..\html\$D\search.obj
356 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
357 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(NONESSENTIALOBJS) $(OS2OBJS)
359 # Normal, static library
360 all: $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
362 dirs: $(OS2DIR)\$D $(COMMDIR)\$D $(GENDIR)\$D $(HTMLDIR)\$D
365 test: $(OS2DIR)\$D\wave.obj
366 test2: ..\common\Debug\config.obj
384 copy ..\common\$D\cmndata.obj
385 copy ..\common\$D\config.obj
386 copy ..\common\$D\dcbase.obj
387 copy ..\common\$D\db.obj
388 copy ..\common\$D\dbtable.obj
389 copy ..\common\$D\docview.obj
390 copy ..\common\$D\docmdi.obj
391 copy ..\common\$D\dynarray.obj
392 copy ..\common\$D\dynlib.obj
393 copy ..\common\$D\event.obj
394 copy ..\common\$D\file.obj
395 copy ..\common\$D\filefn.obj
396 copy ..\common\$D\fileconf.obj
397 copy ..\common\$D\framecmn.obj
398 copy ..\common\$D\ftp.obj
399 copy ..\common\$D\gdicmn.obj
400 copy ..\common\$D\image.obj
401 copy ..\common\$D\imagbmp.obj
402 copy ..\common\$D\imagjpeg.obj
403 copy ..\common\$D\imagpng.obj
404 copy ..\common\$D\imaggif.obj
405 copy ..\common\$D\intl.obj
406 copy ..\common\$D\ipcbase.obj
407 copy ..\common\$D\helpbase.obj
408 copy ..\common\$D\layout.obj
409 copy ..\common\$D\log.obj
410 copy ..\common\$D\memory.obj
411 copy ..\common\$D\mimetype.obj
412 copy ..\common\$D\module.obj
413 copy ..\common\$D\odbc.obj
414 copy ..\common\$D\object.obj
415 copy ..\common\$D\prntbase.obj
416 copy ..\common\$D\resource.obj
417 copy ..\common\$D\tbarbase.obj
418 copy ..\common\$D\tbarsmpl.obj
419 copy ..\common\$D\textfile.obj
420 copy ..\common\$D\timercmn.obj
421 copy ..\common\$D\utilscmn.obj
422 copy ..\common\$D\validate.obj
423 copy ..\common\$D\valgen.obj
424 copy ..\common\$D\valtext.obj
425 copy ..\common\$D\date.obj
426 copy ..\common\$D\hash.obj
427 copy ..\common\$D\list.obj
428 copy ..\common\$D\paper.obj
431 copy ..\common\$D\string.obj
432 copy ..\common\$D\socket.obj
433 copy ..\common\$D\sckaddr.obj
434 copy ..\common\$D\sckfile.obj
435 copy ..\common\$D\sckipc.obj
436 copy ..\common\$D\sckstrm.obj
437 copy ..\common\$D\url.obj
438 copy ..\common\$D\http.obj
439 copy ..\common\$D\protocol.obj
440 copy ..\common\$D\time.obj
441 copy ..\common\$D\tokenzr.obj
442 copy ..\common\$D\wxexpr.obj
443 copy ..\common\$D\y_tab.obj
444 copy ..\common\$D\extended.obj
445 copy ..\common\$D\process.obj
446 copy ..\common\$D\wfstream.obj
447 copy ..\common\$D\mstream.obj
448 copy ..\common\$D\zstream.obj
449 copy ..\common\$D\stream.obj
450 copy ..\common\$D\datstrm.obj
451 copy ..\common\$D\objstrm.obj
452 copy ..\common\$D\variant.obj
453 copy ..\common\$D\dlgcmn.obj
454 copy ..\common\$D\wincmn.obj
455 copy ..\common\$D\txtstrm.obj
456 copy ..\common\$D\wxchar.obj
457 copy ..\common\$D\unzip.obj
458 copy ..\common\$D\filesys.obj
459 copy ..\common\$D\fs_inet.obj
460 copy ..\common\$D\fs_zip.obj
463 copy ..\generic\$D\caret.obj
464 copy ..\generic\$D\choicdgg.obj
465 copy ..\generic\$D\gridg.obj
466 copy ..\generic\$D\laywin.obj
467 copy ..\generic\$D\panelg.obj
468 copy ..\generic\$D\progdlgg.obj
469 copy ..\generic\$D\prop.obj
470 copy ..\generic\$D\propform.obj
471 copy ..\generic\$D\proplist.obj
472 copy ..\generic\$D\sashwin.obj
473 copy ..\generic\$D\scrolwin.obj
474 copy ..\generic\$D\splitter.obj
475 copy ..\generic\$D\statusbr.obj
476 copy ..\generic\$D\tabg.obj
477 copy ..\generic\$D\textdlgg.obj
478 copy ..\generic\$D\tipdlg.obj
479 copy ..\generic\$D\busyinfo.obj
482 copy ..\os2\$D\accel.obj
483 copy ..\os2\$D\app.obj
484 copy ..\os2\$D\bitmap.obj
485 copy ..\os2\$D\bmpbuttn.obj
486 copy ..\os2\$D\brush.obj
487 copy ..\os2\$D\button.obj
488 copy ..\os2\$D\checkbox.obj
489 copy ..\os2\$D\checklst.obj
490 copy ..\os2\$D\choice.obj
491 copy ..\os2\$D\clipbrd.obj
492 copy ..\os2\$D\colordlg.obj
493 copy ..\os2\$D\colour.obj
494 copy ..\os2\$D\combobox.obj
495 copy ..\os2\$D\control.obj
496 copy ..\os2\$D\cursor.obj
497 copy ..\os2\$D\data.obj
498 copy ..\os2\$D\dc.obj
499 copy ..\os2\$D\dcclient.obj
500 copy ..\os2\$D\dcmemory.obj
501 copy ..\os2\$D\dcprint.obj
502 copy ..\os2\$D\dcscreen.obj
503 copy ..\os2\$D\dialog.obj
504 copy ..\os2\$D\frame.obj
505 copy ..\os2\$D\window.obj
507 # wxWindows library as DLL
509 nmake -f makefile.va all FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=$(NEW_WXLIBNAME)
512 nmake -f makefile.va clean FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=$(NEW_WXLIBNAME)
514 # wxWindows + app as DLL. Only affects main.cpp.
516 nmake -f makefile.va all FINAL=$(FINAL) DLL=1
518 # wxWindows + app as DLL, for Netscape plugin - remove DllMain.
520 nmake -f makefile.va all FINAL=$(FINAL) DLL=1
522 # Use this to make dummy.obj and generate a PCH.
523 # You might use the dll target, then the pch target, in order to
524 # generate a DLL, then a PCH/dummy.obj for compiling your applications with.
526 # Explanation: Normally, when compiling a static version of wx.lib, your dummy.obj/PCH
527 # are associated with wx.lib. When using a DLL version of wxWindows, however,
528 # the DLL is compiled without a PCH, so you only need it for compiling the app.
529 # In fact headers are compiled differently depending on whether a DLL is being made
530 # or an app is calling the DLL exported functionality (WXDLLEXPORT is different
531 # in each case) so you couldn't use the same PCH.
533 nmake -f makefile.va pch1 WXUSINGDLL=1 FINAL=$(FINAL) NEW_WXLIBNAME=$(NEW_WXLIBNAME)
535 pch1: dirs $(DUMMYOBJ)
538 !if "$(WXMAKINGDLL)" != "1"
542 $(WXDIR)\lib\wxcom1.lib: $(COMLIBOBJS1)
543 touch $(WXDIR)\lib\wxcom1.lib
544 del $(WXDIR)\lib\wxcom1.lib
545 ilib $(LIBFLAGS) $@ @<<
549 $(WXDIR)\lib\wxcom2.lib: $(COMLIBOBJS2)
550 touch $(WXDIR)\lib\wxcom2.lib
551 del $(WXDIR)\lib\wxcom2.lib
552 ilib $(LIBFLAGS) $@ @<<
556 $(WXDIR)\lib\wxgen.lib: $(GENLIBOBJS)
557 touch $(WXDIR)\lib\wxgen.lib
558 del $(WXDIR)\lib\wxgen.lib
559 ilib $(LIBFLAGS) $@ @<<
563 $(WXDIR)\lib\wxnones.lib: $(NONESSENTIALOBJS)
564 touch $(WXDIR)\lib\wxnones.lib
565 del $(WXDIR)\lib\wxnones.lib
566 ilib $(LIBFLAGS) $@ @<<
570 $(WXDIR)\lib\wxos2.lib: $(OS2LIBOBJS)
571 touch $(WXDIR)\lib\wxos2.lib
572 del $(WXDIR)\lib\wxos2.lib
573 ilib $(LIBFLAGS) $@ @<<
578 $(WXDIR)\lib\wx.lib: \
588 ilib $(LIBFLAGS) $@ @<<
599 # Update the import library
600 $(WXDIR)\lib\wx200.lib: $(OBJECTS)
601 implib $(WXDIR)\lib\wx200.lib $(WXDIR)\lib\wx200.def
603 # Update the dynamic link library
604 $(WXDIR)\lib\wx200.dll: $(OBJECTS) $(WXDIR)\lib\wx200.lib
606 /B" $(LINKFLAGS)" /Fe$@
609 $(WXDIR)\lib\wx200.def
614 $D\dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\os2\setup.h
615 icc $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummy.obj /Tp dummy.cpp
617 $D\dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\os2\setup.h
619 $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummydll.obj /c /Tp dummydll.cpp
622 # If taking wxWindows from CVS, setup.h doesn't exist yet.
623 $(WXDIR)\include\wx\os2\setup.h: $(WXDIR)\include\wx\os2\setup0.h
624 copy "$(WXDIR)"\include\wx\os2\setup.h "$(WXDIR)"\include\wx\os2\setup.bak
625 copy "$(WXDIR)"\include\wx\os2\setup0.h "$(WXDIR)"\include\wx\os2\setup.h
627 ..\common\$D\extended.obj: ..\common\extended.c
629 $(CPPFLAGS2) /Fo$@ $(COMMDIR)\extended.c
632 ..\common\$D\y_tab.obj: ..\common\y_tab.c ..\common\lex_yy.c
634 $(CPPFLAGS2) /DUSE_DEFINE /DYY_USE_PROTOS /Fo$@ ..\common\y_tab.c
637 ..\common\y_tab.c: ..\common\dosyacc.c
638 copy "..\common"\dosyacc.c "..\common"\y_tab.c
640 ..\common\lex_yy.c: ..\common\doslex.c
641 copy "..\common"\doslex.c "..\common"\lex_yy.c
643 $(OBJECTS): $(WXDIR)/include/wx/setup.h
645 ..\common\$D\unzip.obj: ..\common\unzip.c
647 $(CPPFLAGS2) /Fo$@ $(COMMDIR)\unzip.c
650 clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm
652 -erase ..\..\lib\wx200.dll
653 -erase ..\..\lib\wx200.lib
654 -erase $(GENDIR)\$D\*.obj
655 -erase $(COMMDIR)\$D\*.obj
656 -erase $(COMMDIR)\\y_tab.c
657 -erase $(COMMDIR)\lex_yy.c
658 -erase $(OS2DIR)\$D\*.obj
661 -rmdir ..\generic\$(D)
662 -rmdir ..\common\$(D)