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 {..\os2}.c{..\os2\$D}.obj:
73 $(CPPFLAGS) /Fo$@ /Tp $<
76 {..\html}.cpp{..\html\$D}.obj:
79 $(CPPFLAGS) /Fo$@ /Tp $<
83 ..\generic\$D\caret.obj \
84 ..\generic\$D\choicdgg.obj \
85 ..\generic\$D\gridg.obj \
86 ..\generic\$D\laywin.obj \
87 ..\generic\$D\panelg.obj \
88 ..\generic\$D\progdlgg.obj \
89 ..\generic\$D\prop.obj \
90 ..\generic\$D\propform.obj \
91 ..\generic\$D\proplist.obj \
92 ..\generic\$D\sashwin.obj \
93 ..\generic\$D\scrolwin.obj \
94 ..\generic\$D\splitter.obj \
95 ..\generic\$D\statusbr.obj \
96 ..\generic\$D\tabg.obj \
97 ..\generic\$D\textdlgg.obj \
98 ..\generic\$D\tipdlg.obj \
99 ..\generic\$D\busyinfo.obj
101 # ..\generic\$D\imaglist.obj \
102 # ..\generic\$D\treectrl.obj \
103 # ..\generic\$D\listctrl.obj \
104 # ..\generic\$D\notebook.obj \
125 # These are generic things that don't need to be compiled on PM,
126 # but sometimes it's useful to do so for testing purposes.
128 ..\generic\$D\printps.obj \
129 ..\generic\$D\prntdlgg.obj \
130 ..\generic\$D\msgdlgg.obj \
131 ..\generic\$D\helpxlp.obj \
132 ..\generic\$D\colrdlgg.obj \
133 ..\generic\$D\fontdlgg.obj
136 ..\common\$D\cmndata.obj \
137 ..\common\$D\config.obj \
138 ..\common\$D\dcbase.obj \
139 ..\common\$D\db.obj \
140 ..\common\$D\dbtable.obj \
141 ..\common\$D\docview.obj \
142 ..\common\$D\docmdi.obj \
143 ..\common\$D\dynarray.obj \
144 ..\common\$D\dynlib.obj \
145 ..\common\$D\event.obj \
146 ..\common\$D\file.obj \
147 ..\common\$D\filefn.obj \
148 ..\common\$D\fileconf.obj \
149 ..\common\$D\framecmn.obj \
150 ..\common\$D\ftp.obj \
151 ..\common\$D\gdicmn.obj \
152 ..\common\$D\image.obj \
153 ..\common\$D\imagbmp.obj \
154 ..\common\$D\imagjpeg.obj \
155 ..\common\$D\imagpng.obj \
156 ..\common\$D\imaggif.obj \
157 ..\common\$D\intl.obj \
158 ..\common\$D\ipcbase.obj \
159 ..\common\$D\helpbase.obj \
160 ..\common\$D\layout.obj \
161 ..\common\$D\log.obj \
162 ..\common\$D\memory.obj \
163 ..\common\$D\mimetype.obj \
164 ..\common\$D\module.obj \
165 ..\common\$D\odbc.obj \
166 ..\common\$D\object.obj \
167 ..\common\$D\prntbase.obj \
168 ..\common\$D\resource.obj \
169 ..\common\$D\tbarbase.obj \
170 ..\common\$D\tbarsmpl.obj \
171 ..\common\$D\textfile.obj \
172 ..\common\$D\timercmn.obj \
173 ..\common\$D\utilscmn.obj \
174 ..\common\$D\validate.obj \
175 ..\common\$D\valgen.obj \
176 ..\common\$D\valtext.obj \
177 ..\common\$D\date.obj \
178 ..\common\$D\hash.obj \
179 ..\common\$D\list.obj \
180 ..\common\$D\paper.obj \
181 ..\common\$D\string.obj \
182 ..\common\$D\socket.obj \
183 ..\common\$D\sckaddr.obj \
184 ..\common\$D\sckfile.obj \
185 ..\common\$D\sckipc.obj \
186 ..\common\$D\sckstrm.obj \
187 ..\common\$D\url.obj \
188 ..\common\$D\http.obj \
189 ..\common\$D\protocol.obj \
190 ..\common\$D\time.obj \
191 ..\common\$D\tokenzr.obj \
192 ..\common\$D\wxexpr.obj \
193 ..\common\$D\y_tab.obj \
194 ..\common\$D\extended.obj \
195 ..\common\$D\process.obj \
196 ..\common\$D\wfstream.obj \
197 ..\common\$D\mstream.obj \
198 ..\common\$D\zstream.obj \
199 ..\common\$D\stream.obj \
200 ..\common\$D\datstrm.obj \
201 ..\common\$D\objstrm.obj \
202 ..\common\$D\variant.obj \
203 ..\common\$D\dlgcmn.obj \
204 ..\common\$D\wincmn.obj \
205 ..\common\$D\txtstrm.obj \
206 ..\common\$D\wxchar.obj \
207 ..\common\$D\unzip.obj \
208 ..\common\$D\filesys.obj \
209 ..\common\$D\fs_inet.obj \
210 ..\common\$D\fs_zip.obj
292 ..\os2\$D\accel.obj \
294 ..\os2\$D\bitmap.obj \
295 ..\os2\$D\bmpbuttn.obj \
296 ..\os2\$D\brush.obj \
297 ..\os2\$D\button.obj \
298 ..\os2\$D\checkbox.obj \
299 ..\os2\$D\checklst.obj \
300 ..\os2\$D\choice.obj \
301 ..\os2\$D\clipbrd.obj \
302 ..\os2\$D\colordlg.obj \
303 ..\os2\$D\colour.obj \
304 ..\os2\$D\combobox.obj \
305 ..\os2\$D\control.obj \
306 ..\os2\$D\cursor.obj \
309 ..\os2\$D\dcclient.obj \
310 ..\os2\$D\dcmemory.obj \
311 ..\os2\$D\dcprint.obj \
312 ..\os2\$D\dcscreen.obj \
313 ..\os2\$D\dialog.obj \
314 ..\os2\$D\dirdlg.obj \
316 ..\os2\$D\filedlg.obj \
318 ..\os2\$D\fontdlg.obj \
319 ..\os2\$D\frame.obj \
320 ..\os2\$D\gauge.obj \
321 ..\os2\$D\gdiobj.obj \
322 ..\os2\$D\gsocket.obj \
323 ..\os2\$D\helpwin.obj \
325 ..\os2\$D\imaglist.obj \
326 ..\os2\$D\iniconf.obj \
327 ..\os2\$D\joystick.obj \
328 ..\os2\$D\listbox.obj \
329 ..\os2\$D\listctrl.obj \
333 ..\os2\$D\menuitem.obj \
334 ..\os2\$D\metafile.obj \
335 ..\os2\$D\minifram.obj \
336 ..\os2\$D\msgdlg.obj \
337 ..\os2\$D\nativdlg.obj \
338 ..\os2\$D\notebook.obj \
339 ..\os2\$D\ownerdrw.obj \
340 ..\os2\$D\palette.obj \
342 ..\os2\$D\pngread.obj \
343 ..\os2\$D\print.obj \
344 ..\os2\$D\radiobox.obj \
345 ..\os2\$D\radiobut.obj \
406 ..\html\$D\htmlcell.obj \
407 ..\html\$D\htmlfilter.obj \
408 ..\html\$D\htmlhelp.obj \
409 ..\html\$D\htmlhelp_io.obj \
410 ..\html\$D\htmlparser.obj \
411 ..\html\$D\htmltag.obj \
412 ..\html\$D\htmlwin.obj \
413 ..\html\$D\htmlwinparser.obj \
414 ..\html\$D\mod_fonts.obj \
415 ..\html\$D\mod_hline.obj \
416 ..\html\$D\mod_image.obj \
417 ..\html\$D\mod_layout.obj \
418 ..\html\$D\mod_links.obj \
419 ..\html\$D\mod_list.obj \
420 ..\html\$D\mod_pre.obj \
421 ..\html\$D\mod_tables.obj \
422 ..\html\$D\search.obj
424 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
425 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(NONESSENTIALOBJS) $(OS2OBJS)
427 # Normal, static library
428 all: $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
430 dirs: $(OS2DIR)\$D $(COMMDIR)\$D $(GENDIR)\$D $(HTMLDIR)\$D
433 test: $(OS2DIR)\$D\wave.obj
434 test2: ..\common\Debug\config.obj
452 copy ..\common\$D\cmndata.obj
453 copy ..\common\$D\config.obj
454 copy ..\common\$D\dcbase.obj
455 copy ..\common\$D\db.obj
456 copy ..\common\$D\dbtable.obj
457 copy ..\common\$D\docview.obj
458 copy ..\common\$D\docmdi.obj
459 copy ..\common\$D\dynarray.obj
460 copy ..\common\$D\dynlib.obj
461 copy ..\common\$D\event.obj
462 copy ..\common\$D\file.obj
463 copy ..\common\$D\filefn.obj
464 copy ..\common\$D\fileconf.obj
465 copy ..\common\$D\framecmn.obj
466 copy ..\common\$D\ftp.obj
467 copy ..\common\$D\gdicmn.obj
468 copy ..\common\$D\image.obj
469 copy ..\common\$D\imagbmp.obj
470 copy ..\common\$D\imagjpeg.obj
471 copy ..\common\$D\imagpng.obj
472 copy ..\common\$D\imaggif.obj
473 copy ..\common\$D\intl.obj
474 copy ..\common\$D\ipcbase.obj
475 copy ..\common\$D\helpbase.obj
476 copy ..\common\$D\layout.obj
477 copy ..\common\$D\log.obj
478 copy ..\common\$D\memory.obj
479 copy ..\common\$D\mimetype.obj
480 copy ..\common\$D\module.obj
481 copy ..\common\$D\odbc.obj
482 copy ..\common\$D\object.obj
483 copy ..\common\$D\prntbase.obj
484 copy ..\common\$D\resource.obj
485 copy ..\common\$D\tbarbase.obj
486 copy ..\common\$D\tbarsmpl.obj
487 copy ..\common\$D\textfile.obj
488 copy ..\common\$D\timercmn.obj
489 copy ..\common\$D\utilscmn.obj
490 copy ..\common\$D\validate.obj
491 copy ..\common\$D\valgen.obj
492 copy ..\common\$D\valtext.obj
493 copy ..\common\$D\date.obj
494 copy ..\common\$D\hash.obj
495 copy ..\common\$D\list.obj
496 copy ..\common\$D\paper.obj
499 copy ..\common\$D\string.obj
500 copy ..\common\$D\socket.obj
501 copy ..\common\$D\sckaddr.obj
502 copy ..\common\$D\sckfile.obj
503 copy ..\common\$D\sckipc.obj
504 copy ..\common\$D\sckstrm.obj
505 copy ..\common\$D\url.obj
506 copy ..\common\$D\http.obj
507 copy ..\common\$D\protocol.obj
508 copy ..\common\$D\time.obj
509 copy ..\common\$D\tokenzr.obj
510 copy ..\common\$D\wxexpr.obj
511 copy ..\common\$D\y_tab.obj
512 copy ..\common\$D\extended.obj
513 copy ..\common\$D\process.obj
514 copy ..\common\$D\wfstream.obj
515 copy ..\common\$D\mstream.obj
516 copy ..\common\$D\zstream.obj
517 copy ..\common\$D\stream.obj
518 copy ..\common\$D\datstrm.obj
519 copy ..\common\$D\objstrm.obj
520 copy ..\common\$D\variant.obj
521 copy ..\common\$D\dlgcmn.obj
522 copy ..\common\$D\wincmn.obj
523 copy ..\common\$D\txtstrm.obj
524 copy ..\common\$D\wxchar.obj
525 copy ..\common\$D\unzip.obj
526 copy ..\common\$D\filesys.obj
527 copy ..\common\$D\fs_inet.obj
528 copy ..\common\$D\fs_zip.obj
531 copy ..\generic\$D\caret.obj
532 copy ..\generic\$D\choicdgg.obj
533 copy ..\generic\$D\gridg.obj
534 copy ..\generic\$D\laywin.obj
535 copy ..\generic\$D\panelg.obj
536 copy ..\generic\$D\progdlgg.obj
537 copy ..\generic\$D\prop.obj
538 copy ..\generic\$D\propform.obj
539 copy ..\generic\$D\proplist.obj
540 copy ..\generic\$D\sashwin.obj
541 copy ..\generic\$D\scrolwin.obj
542 copy ..\generic\$D\splitter.obj
543 copy ..\generic\$D\statusbr.obj
544 copy ..\generic\$D\tabg.obj
545 copy ..\generic\$D\textdlgg.obj
546 copy ..\generic\$D\tipdlg.obj
547 copy ..\generic\$D\busyinfo.obj
550 copy ..\os2\$D\accel.obj
551 copy ..\os2\$D\app.obj
552 copy ..\os2\$D\bitmap.obj
553 copy ..\os2\$D\bmpbuttn.obj
554 copy ..\os2\$D\brush.obj
555 copy ..\os2\$D\button.obj
556 copy ..\os2\$D\checkbox.obj
557 copy ..\os2\$D\checklst.obj
558 copy ..\os2\$D\choice.obj
559 copy ..\os2\$D\clipbrd.obj
560 copy ..\os2\$D\colordlg.obj
561 copy ..\os2\$D\colour.obj
562 copy ..\os2\$D\combobox.obj
563 copy ..\os2\$D\control.obj
564 copy ..\os2\$D\cursor.obj
565 copy ..\os2\$D\data.obj
566 copy ..\os2\$D\dc.obj
567 copy ..\os2\$D\dcclient.obj
568 copy ..\os2\$D\dcmemory.obj
569 copy ..\os2\$D\dcprint.obj
570 copy ..\os2\$D\dcscreen.obj
571 copy ..\os2\$D\dialog.obj
572 copy ..\os2\$D\dirdlg.obj
573 copy ..\os2\$D\dnd.obj
574 copy ..\os2\$D\filedlg.obj
575 copy ..\os2\$D\font.obj
576 copy ..\os2\$D\fontdlg.obj
577 copy ..\os2\$D\frame.obj
578 copy ..\os2\$D\gauge.obj
579 copy ..\os2\$D\gdiobj.obj
580 copy ..\os2\$D\gsocket.obj
581 copy ..\os2\$D\helpwin.obj
582 copy ..\os2\$D\icon.obj
583 copy ..\os2\$D\imaglist.obj
584 copy ..\os2\$D\iniconf.obj
585 copy ..\os2\$D\joystick.obj
586 copy ..\os2\$D\listbox.obj
587 copy ..\os2\$D\listctrl.obj
588 copy ..\os2\$D\main.obj
589 copy ..\os2\$D\mdi.obj
590 copy ..\os2\$D\menu.obj
591 copy ..\os2\$D\menuitem.obj
592 copy ..\os2\$D\metafile.obj
593 copy ..\os2\$D\minifram.obj
594 copy ..\os2\$D\msgdlg.obj
595 copy ..\os2\$D\nativdlg.obj
596 copy ..\os2\$D\notebook.obj
597 copy ..\os2\$D\ownerdrw.obj
598 copy ..\os2\$D\pallet.obj
599 copy ..\os2\$D\pen.obj
600 copy ..\os2\$D\pngread.obj
601 copy ..\os2\$D\print.obj
602 copy ..\os2\$D\radiobox.obj
603 copy ..\os2\$D\radiobut.obj
604 copy ..\os2\$D\window.obj
606 # wxWindows library as DLL
608 nmake -f makefile.va all FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=$(NEW_WXLIBNAME)
611 nmake -f makefile.va clean FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=$(NEW_WXLIBNAME)
613 # wxWindows + app as DLL. Only affects main.cpp.
615 nmake -f makefile.va all FINAL=$(FINAL) DLL=1
617 # wxWindows + app as DLL, for Netscape plugin - remove DllMain.
619 nmake -f makefile.va all FINAL=$(FINAL) DLL=1
621 # Use this to make dummy.obj and generate a PCH.
622 # You might use the dll target, then the pch target, in order to
623 # generate a DLL, then a PCH/dummy.obj for compiling your applications with.
625 # Explanation: Normally, when compiling a static version of wx.lib, your dummy.obj/PCH
626 # are associated with wx.lib. When using a DLL version of wxWindows, however,
627 # the DLL is compiled without a PCH, so you only need it for compiling the app.
628 # In fact headers are compiled differently depending on whether a DLL is being made
629 # or an app is calling the DLL exported functionality (WXDLLEXPORT is different
630 # in each case) so you couldn't use the same PCH.
632 nmake -f makefile.va pch1 WXUSINGDLL=1 FINAL=$(FINAL) NEW_WXLIBNAME=$(NEW_WXLIBNAME)
634 pch1: dirs $(DUMMYOBJ)
637 !if "$(WXMAKINGDLL)" != "1"
641 $(WXDIR)\lib\wxcom1.lib: $(COMLIBOBJS1)
642 touch $(WXDIR)\lib\wxcom1.lib
643 del $(WXDIR)\lib\wxcom1.lib
644 ilib $(LIBFLAGS) $@ @<<
648 $(WXDIR)\lib\wxcom2.lib: $(COMLIBOBJS2)
649 touch $(WXDIR)\lib\wxcom2.lib
650 del $(WXDIR)\lib\wxcom2.lib
651 ilib $(LIBFLAGS) $@ @<<
655 $(WXDIR)\lib\wxgen.lib: $(GENLIBOBJS)
656 touch $(WXDIR)\lib\wxgen.lib
657 del $(WXDIR)\lib\wxgen.lib
658 ilib $(LIBFLAGS) $@ @<<
662 $(WXDIR)\lib\wxnones.lib: $(NONESSENTIALOBJS)
663 touch $(WXDIR)\lib\wxnones.lib
664 del $(WXDIR)\lib\wxnones.lib
665 ilib $(LIBFLAGS) $@ @<<
669 $(WXDIR)\lib\wxos2.lib: $(OS2LIBOBJS)
670 touch $(WXDIR)\lib\wxos2.lib
671 del $(WXDIR)\lib\wxos2.lib
672 ilib $(LIBFLAGS) $@ @<<
677 $(WXDIR)\lib\wx.lib: \
687 ilib $(LIBFLAGS) $@ @<<
698 # Update the import library
699 $(WXDIR)\lib\wx200.lib: $(OBJECTS)
700 implib $(WXDIR)\lib\wx200.lib $(WXDIR)\lib\wx200.def
702 # Update the dynamic link library
703 $(WXDIR)\lib\wx200.dll: $(OBJECTS) $(WXDIR)\lib\wx200.lib
705 /B" $(LINKFLAGS)" /Fe$@
708 $(WXDIR)\lib\wx200.def
713 $D\dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\os2\setup.h
714 icc $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummy.obj /Tp dummy.cpp
716 $D\dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\os2\setup.h
718 $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummydll.obj /c /Tp dummydll.cpp
721 # If taking wxWindows from CVS, setup.h doesn't exist yet.
722 $(WXDIR)\include\wx\os2\setup.h: $(WXDIR)\include\wx\os2\setup0.h
723 copy "$(WXDIR)"\include\wx\os2\setup.h "$(WXDIR)"\include\wx\os2\setup.bak
724 copy "$(WXDIR)"\include\wx\os2\setup0.h "$(WXDIR)"\include\wx\os2\setup.h
726 ..\common\$D\extended.obj: ..\common\extended.c
728 $(CPPFLAGS2) /Fo$@ $(COMMDIR)\extended.c
731 ..\common\$D\y_tab.obj: ..\common\y_tab.c ..\common\lex_yy.c
733 $(CPPFLAGS2) /DUSE_DEFINE /DYY_USE_PROTOS /Fo$@ ..\common\y_tab.c
736 ..\common\y_tab.c: ..\common\dosyacc.c
737 copy "..\common"\dosyacc.c "..\common"\y_tab.c
739 ..\common\lex_yy.c: ..\common\doslex.c
740 copy "..\common"\doslex.c "..\common"\lex_yy.c
742 $(OBJECTS): $(WXDIR)/include/wx/setup.h
744 ..\common\$D\unzip.obj: ..\common\unzip.c
746 $(CPPFLAGS2) /Fo$@ $(COMMDIR)\unzip.c
749 clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm
751 -erase ..\..\lib\wx200.dll
752 -erase ..\..\lib\wx200.lib
753 -erase $(GENDIR)\$D\*.obj
754 -erase $(COMMDIR)\$D\*.obj
755 -erase $(COMMDIR)\\y_tab.c
756 -erase $(COMMDIR)\lex_yy.c
757 -erase $(OS2DIR)\$D\*.obj
760 -rmdir ..\generic\$(D)
761 -rmdir ..\common\$(D)