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 OS2TEMPTGT1=$(WXDIR)\lib\wxos21.lib
30 OS2TEMPTGT2=$(WXDIR)\lib\wxos22.lib
34 # Please set these according to the settings in setup.h, so we can include
35 # the appropriate libraries in wx.lib
37 # This one overrides the others, to be consistent with the settings in wx_setup.h
38 MINIMAL_WXWINDOWS_SETUP=0
44 # These are absolute paths, so that the compiler
45 # generates correct __FILE__ symbols for debugging.
46 # Otherwise you don't be able to double-click on a memory
47 # error to load that file.
48 GENDIR=$(WXDIR)\src\generic
49 COMMDIR=$(WXDIR)\src\common
50 OS2DIR=$(WXDIR)\src\os2
51 HTMLDIR = $(WXDIR)\src\html
53 {..\generic}.cpp{..\generic\$D}.obj:
56 $(CPPFLAGS) /Fo$@ /Tp $<
59 {..\common}.cpp{..\common\$D}.obj:
62 $(CPPFLAGS) /Fo$@ /Tp $<
65 {..\os2}.cpp{..\os2\$D}.obj:
68 $(CPPFLAGS) /Fo$@ /Tp $<
71 {..\os2}.c{..\os2\$D}.obj:
74 $(CPPFLAGS) /Fo$@ /Tp $<
77 {..\html}.cpp{..\html\$D}.obj:
80 $(CPPFLAGS) /Fo$@ /Tp $<
84 ..\generic\$D\caret.obj \
85 ..\generic\$D\choicdgg.obj \
86 ..\generic\$D\gridg.obj \
87 ..\generic\$D\laywin.obj \
88 ..\generic\$D\panelg.obj \
89 ..\generic\$D\progdlgg.obj \
90 ..\generic\$D\prop.obj \
91 ..\generic\$D\propform.obj \
92 ..\generic\$D\proplist.obj \
93 ..\generic\$D\sashwin.obj \
94 ..\generic\$D\scrolwin.obj \
95 ..\generic\$D\splitter.obj \
96 ..\generic\$D\statusbr.obj \
97 ..\generic\$D\tabg.obj \
98 ..\generic\$D\textdlgg.obj \
99 ..\generic\$D\tipdlg.obj \
100 ..\generic\$D\busyinfo.obj
102 # ..\generic\$D\imaglist.obj \
103 # ..\generic\$D\treectrl.obj \
104 # ..\generic\$D\listctrl.obj \
105 # ..\generic\$D\notebook.obj \
126 # These are generic things that don't need to be compiled on PM,
127 # but sometimes it's useful to do so for testing purposes.
129 ..\generic\$D\printps.obj \
130 ..\generic\$D\prntdlgg.obj \
131 ..\generic\$D\msgdlgg.obj \
132 ..\generic\$D\helpxlp.obj \
133 ..\generic\$D\colrdlgg.obj \
134 ..\generic\$D\fontdlgg.obj
137 ..\common\$D\cmndata.obj \
138 ..\common\$D\config.obj \
139 ..\common\$D\dcbase.obj \
140 ..\common\$D\db.obj \
141 ..\common\$D\dbtable.obj \
142 ..\common\$D\docview.obj \
143 ..\common\$D\docmdi.obj \
144 ..\common\$D\dynarray.obj \
145 ..\common\$D\dynlib.obj \
146 ..\common\$D\event.obj \
147 ..\common\$D\file.obj \
148 ..\common\$D\filefn.obj \
149 ..\common\$D\fileconf.obj \
150 ..\common\$D\framecmn.obj \
151 ..\common\$D\ftp.obj \
152 ..\common\$D\gdicmn.obj \
153 ..\common\$D\image.obj \
154 ..\common\$D\imagbmp.obj \
155 ..\common\$D\imagjpeg.obj \
156 ..\common\$D\imagpng.obj \
157 ..\common\$D\imaggif.obj \
158 ..\common\$D\intl.obj \
159 ..\common\$D\ipcbase.obj \
160 ..\common\$D\helpbase.obj \
161 ..\common\$D\layout.obj \
162 ..\common\$D\log.obj \
163 ..\common\$D\memory.obj \
164 ..\common\$D\mimetype.obj \
165 ..\common\$D\module.obj \
166 ..\common\$D\odbc.obj \
167 ..\common\$D\object.obj \
168 ..\common\$D\prntbase.obj \
169 ..\common\$D\resource.obj \
170 ..\common\$D\tbarbase.obj \
171 ..\common\$D\tbarsmpl.obj \
172 ..\common\$D\textfile.obj \
173 ..\common\$D\timercmn.obj \
174 ..\common\$D\utilscmn.obj \
175 ..\common\$D\validate.obj \
176 ..\common\$D\valgen.obj \
177 ..\common\$D\valtext.obj \
178 ..\common\$D\date.obj \
179 ..\common\$D\hash.obj \
180 ..\common\$D\list.obj \
181 ..\common\$D\paper.obj \
182 ..\common\$D\string.obj \
183 ..\common\$D\socket.obj \
184 ..\common\$D\sckaddr.obj \
185 ..\common\$D\sckfile.obj \
186 ..\common\$D\sckipc.obj \
187 ..\common\$D\sckstrm.obj \
188 ..\common\$D\url.obj \
189 ..\common\$D\http.obj \
190 ..\common\$D\protocol.obj \
191 ..\common\$D\time.obj \
192 ..\common\$D\tokenzr.obj \
193 ..\common\$D\wxexpr.obj \
194 ..\common\$D\y_tab.obj \
195 ..\common\$D\extended.obj \
196 ..\common\$D\process.obj \
197 ..\common\$D\wfstream.obj \
198 ..\common\$D\mstream.obj \
199 ..\common\$D\zstream.obj \
200 ..\common\$D\stream.obj \
201 ..\common\$D\datstrm.obj \
202 ..\common\$D\objstrm.obj \
203 ..\common\$D\variant.obj \
204 ..\common\$D\dlgcmn.obj \
205 ..\common\$D\wincmn.obj \
206 ..\common\$D\txtstrm.obj \
207 ..\common\$D\wxchar.obj \
208 ..\common\$D\unzip.obj \
209 ..\common\$D\filesys.obj \
210 ..\common\$D\fs_inet.obj \
211 ..\common\$D\fs_zip.obj
293 ..\os2\$D\accel.obj \
295 ..\os2\$D\bitmap.obj \
296 ..\os2\$D\bmpbuttn.obj \
297 ..\os2\$D\brush.obj \
298 ..\os2\$D\button.obj \
299 ..\os2\$D\checkbox.obj \
300 ..\os2\$D\checklst.obj \
301 ..\os2\$D\choice.obj \
302 ..\os2\$D\clipbrd.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\pnghand.obj \
343 ..\os2\$D\print.obj \
344 ..\os2\$D\radiobox.obj \
345 ..\os2\$D\radiobut.obj \
346 ..\os2\$D\region.obj \
347 ..\os2\$D\scrolbar.obj \
348 ..\os2\$D\settings.obj \
349 ..\os2\$D\slider.obj \
350 ..\os2\$D\spinbutt.obj \
351 ..\os2\$D\spinctrl.obj \
352 ..\os2\$D\statbmp.obj \
353 ..\os2\$D\statbox.obj \
423 ..\html\$D\htmlcell.obj \
424 ..\html\$D\htmlfilter.obj \
425 ..\html\$D\htmlhelp.obj \
426 ..\html\$D\htmlhelp_io.obj \
427 ..\html\$D\htmlparser.obj \
428 ..\html\$D\htmltag.obj \
429 ..\html\$D\htmlwin.obj \
430 ..\html\$D\htmlwinparser.obj \
431 ..\html\$D\mod_fonts.obj \
432 ..\html\$D\mod_hline.obj \
433 ..\html\$D\mod_image.obj \
434 ..\html\$D\mod_layout.obj \
435 ..\html\$D\mod_links.obj \
436 ..\html\$D\mod_list.obj \
437 ..\html\$D\mod_pre.obj \
438 ..\html\$D\mod_tables.obj \
439 ..\html\$D\search.obj
441 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
442 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(NONESSENTIALOBJS) $(OS2OBJS)
444 # Normal, static library
445 all: $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
447 dirs: $(OS2DIR)\$D $(COMMDIR)\$D $(GENDIR)\$D $(HTMLDIR)\$D
450 test: $(OS2DIR)\$D\wave.obj
451 test2: ..\common\Debug\config.obj
469 copy ..\common\$D\cmndata.obj
470 copy ..\common\$D\config.obj
471 copy ..\common\$D\dcbase.obj
472 copy ..\common\$D\db.obj
473 copy ..\common\$D\dbtable.obj
474 copy ..\common\$D\docview.obj
475 copy ..\common\$D\docmdi.obj
476 copy ..\common\$D\dynarray.obj
477 copy ..\common\$D\dynlib.obj
478 copy ..\common\$D\event.obj
479 copy ..\common\$D\file.obj
480 copy ..\common\$D\filefn.obj
481 copy ..\common\$D\fileconf.obj
482 copy ..\common\$D\framecmn.obj
483 copy ..\common\$D\ftp.obj
484 copy ..\common\$D\gdicmn.obj
485 copy ..\common\$D\image.obj
486 copy ..\common\$D\imagbmp.obj
487 copy ..\common\$D\imagjpeg.obj
488 copy ..\common\$D\imagpng.obj
489 copy ..\common\$D\imaggif.obj
490 copy ..\common\$D\intl.obj
491 copy ..\common\$D\ipcbase.obj
492 copy ..\common\$D\helpbase.obj
493 copy ..\common\$D\layout.obj
494 copy ..\common\$D\log.obj
495 copy ..\common\$D\memory.obj
496 copy ..\common\$D\mimetype.obj
497 copy ..\common\$D\module.obj
498 copy ..\common\$D\odbc.obj
499 copy ..\common\$D\object.obj
500 copy ..\common\$D\prntbase.obj
501 copy ..\common\$D\resource.obj
502 copy ..\common\$D\tbarbase.obj
503 copy ..\common\$D\tbarsmpl.obj
504 copy ..\common\$D\textfile.obj
505 copy ..\common\$D\timercmn.obj
506 copy ..\common\$D\utilscmn.obj
507 copy ..\common\$D\validate.obj
508 copy ..\common\$D\valgen.obj
509 copy ..\common\$D\valtext.obj
510 copy ..\common\$D\date.obj
511 copy ..\common\$D\hash.obj
512 copy ..\common\$D\list.obj
513 copy ..\common\$D\paper.obj
516 copy ..\common\$D\string.obj
517 copy ..\common\$D\socket.obj
518 copy ..\common\$D\sckaddr.obj
519 copy ..\common\$D\sckfile.obj
520 copy ..\common\$D\sckipc.obj
521 copy ..\common\$D\sckstrm.obj
522 copy ..\common\$D\url.obj
523 copy ..\common\$D\http.obj
524 copy ..\common\$D\protocol.obj
525 copy ..\common\$D\time.obj
526 copy ..\common\$D\tokenzr.obj
527 copy ..\common\$D\wxexpr.obj
528 copy ..\common\$D\y_tab.obj
529 copy ..\common\$D\extended.obj
530 copy ..\common\$D\process.obj
531 copy ..\common\$D\wfstream.obj
532 copy ..\common\$D\mstream.obj
533 copy ..\common\$D\zstream.obj
534 copy ..\common\$D\stream.obj
535 copy ..\common\$D\datstrm.obj
536 copy ..\common\$D\objstrm.obj
537 copy ..\common\$D\variant.obj
538 copy ..\common\$D\dlgcmn.obj
539 copy ..\common\$D\wincmn.obj
540 copy ..\common\$D\txtstrm.obj
541 copy ..\common\$D\wxchar.obj
542 copy ..\common\$D\unzip.obj
543 copy ..\common\$D\filesys.obj
544 copy ..\common\$D\fs_inet.obj
545 copy ..\common\$D\fs_zip.obj
548 copy ..\generic\$D\caret.obj
549 copy ..\generic\$D\choicdgg.obj
550 copy ..\generic\$D\gridg.obj
551 copy ..\generic\$D\laywin.obj
552 copy ..\generic\$D\panelg.obj
553 copy ..\generic\$D\progdlgg.obj
554 copy ..\generic\$D\prop.obj
555 copy ..\generic\$D\propform.obj
556 copy ..\generic\$D\proplist.obj
557 copy ..\generic\$D\sashwin.obj
558 copy ..\generic\$D\scrolwin.obj
559 copy ..\generic\$D\splitter.obj
560 copy ..\generic\$D\statusbr.obj
561 copy ..\generic\$D\tabg.obj
562 copy ..\generic\$D\textdlgg.obj
563 copy ..\generic\$D\tipdlg.obj
564 copy ..\generic\$D\busyinfo.obj
567 copy ..\os2\$D\accel.obj
568 copy ..\os2\$D\app.obj
569 copy ..\os2\$D\bitmap.obj
570 copy ..\os2\$D\bmpbuttn.obj
571 copy ..\os2\$D\brush.obj
572 copy ..\os2\$D\button.obj
573 copy ..\os2\$D\checkbox.obj
574 copy ..\os2\$D\checklst.obj
575 copy ..\os2\$D\choice.obj
576 copy ..\os2\$D\clipbrd.obj
577 copy ..\os2\$D\colour.obj
578 copy ..\os2\$D\combobox.obj
579 copy ..\os2\$D\control.obj
580 copy ..\os2\$D\cursor.obj
581 copy ..\os2\$D\data.obj
582 copy ..\os2\$D\dc.obj
583 copy ..\os2\$D\dcclient.obj
584 copy ..\os2\$D\dcmemory.obj
585 copy ..\os2\$D\dcprint.obj
586 copy ..\os2\$D\dcscreen.obj
587 copy ..\os2\$D\dialog.obj
588 copy ..\os2\$D\dirdlg.obj
589 copy ..\os2\$D\dnd.obj
590 copy ..\os2\$D\filedlg.obj
591 copy ..\os2\$D\font.obj
592 copy ..\os2\$D\fontdlg.obj
593 copy ..\os2\$D\frame.obj
594 copy ..\os2\$D\gauge.obj
595 copy ..\os2\$D\gdiobj.obj
596 copy ..\os2\$D\gsocket.obj
597 copy ..\os2\$D\helpwin.obj
598 copy ..\os2\$D\icon.obj
599 copy ..\os2\$D\imaglist.obj
600 copy ..\os2\$D\iniconf.obj
601 copy ..\os2\$D\joystick.obj
602 copy ..\os2\$D\listbox.obj
603 copy ..\os2\$D\listctrl.obj
604 copy ..\os2\$D\main.obj
605 copy ..\os2\$D\mdi.obj
606 copy ..\os2\$D\menu.obj
607 copy ..\os2\$D\menuitem.obj
608 copy ..\os2\$D\metafile.obj
609 copy ..\os2\$D\minifram.obj
610 copy ..\os2\$D\msgdlg.obj
611 copy ..\os2\$D\nativdlg.obj
614 copy ..\os2\$D\notebook.obj
615 copy ..\os2\$D\ownerdrw.obj
616 copy ..\os2\$D\palette.obj
617 copy ..\os2\$D\pen.obj
618 copy ..\os2\$D\pnghand.obj
619 copy ..\os2\$D\print.obj
620 copy ..\os2\$D\radiobox.obj
621 copy ..\os2\$D\radiobut.obj
622 copy ..\os2\$D\region.obj
623 copy ..\os2\$D\scrolbar.obj
624 copy ..\os2\$D\settings.obj
625 copy ..\os2\$D\slider.obj
626 copy ..\os2\$D\spinbutt.obj
627 copy ..\os2\$D\spinctrl.obj
628 copy ..\os2\$D\statbmp.obj
629 copy ..\os2\$D\statbox.obj
630 copy ..\os2\$D\window.obj
632 # wxWindows library as DLL
634 nmake -f makefile.va all FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=$(NEW_WXLIBNAME)
637 nmake -f makefile.va clean FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=$(NEW_WXLIBNAME)
639 # wxWindows + app as DLL. Only affects main.cpp.
641 nmake -f makefile.va all FINAL=$(FINAL) DLL=1
643 # wxWindows + app as DLL, for Netscape plugin - remove DllMain.
645 nmake -f makefile.va all FINAL=$(FINAL) DLL=1
647 # Use this to make dummy.obj and generate a PCH.
648 # You might use the dll target, then the pch target, in order to
649 # generate a DLL, then a PCH/dummy.obj for compiling your applications with.
651 # Explanation: Normally, when compiling a static version of wx.lib, your dummy.obj/PCH
652 # are associated with wx.lib. When using a DLL version of wxWindows, however,
653 # the DLL is compiled without a PCH, so you only need it for compiling the app.
654 # In fact headers are compiled differently depending on whether a DLL is being made
655 # or an app is calling the DLL exported functionality (WXDLLEXPORT is different
656 # in each case) so you couldn't use the same PCH.
658 nmake -f makefile.va pch1 WXUSINGDLL=1 FINAL=$(FINAL) NEW_WXLIBNAME=$(NEW_WXLIBNAME)
660 pch1: dirs $(DUMMYOBJ)
663 !if "$(WXMAKINGDLL)" != "1"
667 $(WXDIR)\lib\wxcom1.lib: $(COMLIBOBJS1)
668 touch $(WXDIR)\lib\wxcom1.lib
669 del $(WXDIR)\lib\wxcom1.lib
670 ilib $(LIBFLAGS) $@ @<<
674 $(WXDIR)\lib\wxcom2.lib: $(COMLIBOBJS2)
675 touch $(WXDIR)\lib\wxcom2.lib
676 del $(WXDIR)\lib\wxcom2.lib
677 ilib $(LIBFLAGS) $@ @<<
681 $(WXDIR)\lib\wxgen.lib: $(GENLIBOBJS)
682 touch $(WXDIR)\lib\wxgen.lib
683 del $(WXDIR)\lib\wxgen.lib
684 ilib $(LIBFLAGS) $@ @<<
688 $(WXDIR)\lib\wxnones.lib: $(NONESSENTIALOBJS)
689 touch $(WXDIR)\lib\wxnones.lib
690 del $(WXDIR)\lib\wxnones.lib
691 ilib $(LIBFLAGS) $@ @<<
695 $(WXDIR)\lib\wxos21.lib: $(OS2LIBOBJS1)
696 touch $(WXDIR)\lib\wxos21.lib
697 del $(WXDIR)\lib\wxos21.lib
698 ilib $(LIBFLAGS) $@ @<<
702 $(WXDIR)\lib\wxos22.lib: $(OS2LIBOBJS2)
703 touch $(WXDIR)\lib\wxos22.lib
704 del $(WXDIR)\lib\wxos22.lib
705 ilib $(LIBFLAGS) $@ @<<
710 $(WXDIR)\lib\wx.lib: \
721 ilib $(LIBFLAGS) $@ @<<
733 # Update the import library
734 $(WXDIR)\lib\wx200.lib: $(OBJECTS)
735 implib $(WXDIR)\lib\wx200.lib $(WXDIR)\lib\wx200.def
737 # Update the dynamic link library
738 $(WXDIR)\lib\wx200.dll: $(OBJECTS) $(WXDIR)\lib\wx200.lib
740 /B" $(LINKFLAGS)" /Fe$@
743 $(WXDIR)\lib\wx200.def
748 $D\dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\os2\setup.h
749 icc $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummy.obj /Tp dummy.cpp
751 $D\dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\os2\setup.h
753 $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummydll.obj /c /Tp dummydll.cpp
756 # If taking wxWindows from CVS, setup.h doesn't exist yet.
757 $(WXDIR)\include\wx\os2\setup.h: $(WXDIR)\include\wx\os2\setup0.h
758 copy "$(WXDIR)"\include\wx\os2\setup.h "$(WXDIR)"\include\wx\os2\setup.bak
759 copy "$(WXDIR)"\include\wx\os2\setup0.h "$(WXDIR)"\include\wx\os2\setup.h
761 ..\common\$D\extended.obj: ..\common\extended.c
763 $(CPPFLAGS2) /Fo$@ $(COMMDIR)\extended.c
766 ..\common\$D\y_tab.obj: ..\common\y_tab.c ..\common\lex_yy.c
768 $(CPPFLAGS2) /DUSE_DEFINE /DYY_USE_PROTOS /Fo$@ ..\common\y_tab.c
771 ..\common\y_tab.c: ..\common\dosyacc.c
772 copy "..\common"\dosyacc.c "..\common"\y_tab.c
774 ..\common\lex_yy.c: ..\common\doslex.c
775 copy "..\common"\doslex.c "..\common"\lex_yy.c
777 $(OBJECTS): $(WXDIR)/include/wx/setup.h
779 ..\common\$D\unzip.obj: ..\common\unzip.c
781 $(CPPFLAGS2) /Fo$@ $(COMMDIR)\unzip.c
784 clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm
786 -erase ..\..\lib\wx200.dll
787 -erase ..\..\lib\wx200.lib
788 -erase $(GENDIR)\$D\*.obj
789 -erase $(COMMDIR)\$D\*.obj
790 -erase $(COMMDIR)\\y_tab.c
791 -erase $(COMMDIR)\lex_yy.c
792 -erase $(OS2DIR)\$D\*.obj
795 -rmdir ..\generic\$(D)
796 -rmdir ..\common\$(D)