# # File: makefile.va # Author: Dave Webster # Created: 1999 # Updated: # Copyright: (c) 1999, Dave Webster # # "%W% %G%" # # Makefile : Builds wxWindows library wx.lib for VisualAge C++ # Arguments: # # FINAL=1 argument to nmake to build version with no debugging info. # dll builds a library (wxdll.lib) suitable for creating DLLs # !include <..\makeva.env> THISDIR=$(WXWIN)\src\os2 !if "$(WXMAKINGDLL)" == "1" LIBTARGET=$(WXDIR)\lib\$(WXLIBNAME).dll DUMMYOBJ=$D\dummydll.obj !else LIBTARGET=$(WXLIB) COMTEMPTGT1=$(WXDIR)\lib\wxcom1.lib COMTEMPTGT2=$(WXDIR)\lib\wxcom2.lib GENTEMPTGT=$(WXDIR)\lib\wxgen.lib NONESTEMPTGT=$(WXDIR)\lib\wxnones.lib OS2TEMPTGT=$(WXDIR)\lib\wxos2.lib DUMMYOBJ=$D\dummy.obj !endif # Please set these according to the settings in setup.h, so we can include # the appropriate libraries in wx.lib # This one overrides the others, to be consistent with the settings in wx_setup.h MINIMAL_WXWINDOWS_SETUP=0 PERIPH_LIBS= PERIPH_TARGET= PERIPH_CLEAN_TARGET= # These are absolute paths, so that the compiler # generates correct __FILE__ symbols for debugging. # Otherwise you don't be able to double-click on a memory # error to load that file. GENDIR=$(WXDIR)\src\generic COMMDIR=$(WXDIR)\src\common OS2DIR=$(WXDIR)\src\os2 HTMLDIR = $(WXDIR)\src\html {..\generic}.cpp{..\generic\$D}.obj: @echo $< icc @<< $(CPPFLAGS) /Fo$@ /Tp $< << {..\common}.cpp{..\common\$D}.obj: @echo $< icc @<< $(CPPFLAGS) /Fo$@ /Tp $< << {..\os2}.cpp{..\os2\$D}.obj: @echo $< icc @<< $(CPPFLAGS) /Fo$@ /Tp $< << {..\html}.cpp{..\html\$D}.obj: @echo $< icc @<< $(CPPFLAGS) /Fo$@ /Tp $< << GENERICOBJS= \ ..\generic\$D\caret.obj \ ..\generic\$D\choicdgg.obj \ ..\generic\$D\gridg.obj \ ..\generic\$D\laywin.obj \ ..\generic\$D\panelg.obj \ ..\generic\$D\progdlgg.obj \ ..\generic\$D\prop.obj \ ..\generic\$D\propform.obj \ ..\generic\$D\proplist.obj \ ..\generic\$D\sashwin.obj \ ..\generic\$D\scrolwin.obj \ ..\generic\$D\splitter.obj \ ..\generic\$D\statusbr.obj \ ..\generic\$D\tabg.obj \ ..\generic\$D\textdlgg.obj \ ..\generic\$D\tipdlg.obj \ ..\generic\$D\busyinfo.obj # ..\generic\$D\imaglist.obj \ # ..\generic\$D\treectrl.obj \ # ..\generic\$D\listctrl.obj \ # ..\generic\$D\notebook.obj \ GENLIBOBJS= \ caret.obj \ choicdgg.obj \ gridg.obj \ laywin.obj \ panelg.obj \ progdlgg.obj \ prop.obj \ propform.obj \ proplist.obj \ sashwin.obj \ scrolwin.obj \ splitter.obj \ statusbr.obj \ tabg.obj \ textdlgg.obj \ tipdlg.obj \ busyinfo.obj # These are generic things that don't need to be compiled on PM, # but sometimes it's useful to do so for testing purposes. NONESSENTIALOBJS= \ ..\generic\$D\printps.obj \ ..\generic\$D\prntdlgg.obj \ ..\generic\$D\msgdlgg.obj \ ..\generic\$D\helpxlp.obj \ ..\generic\$D\colrdlgg.obj \ ..\generic\$D\fontdlgg.obj COMMONOBJS = \ ..\common\$D\cmndata.obj \ ..\common\$D\config.obj \ ..\common\$D\dcbase.obj \ ..\common\$D\db.obj \ ..\common\$D\dbtable.obj \ ..\common\$D\docview.obj \ ..\common\$D\docmdi.obj \ ..\common\$D\dynarray.obj \ ..\common\$D\dynlib.obj \ ..\common\$D\event.obj \ ..\common\$D\file.obj \ ..\common\$D\filefn.obj \ ..\common\$D\fileconf.obj \ ..\common\$D\framecmn.obj \ ..\common\$D\ftp.obj \ ..\common\$D\gdicmn.obj \ ..\common\$D\image.obj \ ..\common\$D\imagbmp.obj \ ..\common\$D\imagjpeg.obj \ ..\common\$D\imagpng.obj \ ..\common\$D\imaggif.obj \ ..\common\$D\intl.obj \ ..\common\$D\ipcbase.obj \ ..\common\$D\helpbase.obj \ ..\common\$D\layout.obj \ ..\common\$D\log.obj \ ..\common\$D\memory.obj \ ..\common\$D\mimetype.obj \ ..\common\$D\module.obj \ ..\common\$D\odbc.obj \ ..\common\$D\object.obj \ ..\common\$D\prntbase.obj \ ..\common\$D\resource.obj \ ..\common\$D\tbarbase.obj \ ..\common\$D\tbarsmpl.obj \ ..\common\$D\textfile.obj \ ..\common\$D\timercmn.obj \ ..\common\$D\utilscmn.obj \ ..\common\$D\validate.obj \ ..\common\$D\valgen.obj \ ..\common\$D\valtext.obj \ ..\common\$D\date.obj \ ..\common\$D\hash.obj \ ..\common\$D\list.obj \ ..\common\$D\paper.obj \ ..\common\$D\string.obj \ ..\common\$D\socket.obj \ ..\common\$D\sckaddr.obj \ ..\common\$D\sckfile.obj \ ..\common\$D\sckipc.obj \ ..\common\$D\sckstrm.obj \ ..\common\$D\url.obj \ ..\common\$D\http.obj \ ..\common\$D\protocol.obj \ ..\common\$D\time.obj \ ..\common\$D\tokenzr.obj \ ..\common\$D\wxexpr.obj \ ..\common\$D\y_tab.obj \ ..\common\$D\extended.obj \ ..\common\$D\process.obj \ ..\common\$D\wfstream.obj \ ..\common\$D\mstream.obj \ ..\common\$D\zstream.obj \ ..\common\$D\stream.obj \ ..\common\$D\datstrm.obj \ ..\common\$D\objstrm.obj \ ..\common\$D\variant.obj \ ..\common\$D\dlgcmn.obj \ ..\common\$D\wincmn.obj \ ..\common\$D\txtstrm.obj \ ..\common\$D\wxchar.obj \ ..\common\$D\unzip.obj \ ..\common\$D\filesys.obj \ ..\common\$D\fs_inet.obj \ ..\common\$D\fs_zip.obj COMLIBOBJS1 = \ cmndata.obj \ config.obj \ dcbase.obj \ db.obj \ dbtable.obj \ docview.obj \ docmdi.obj \ dynarray.obj \ dynlib.obj \ event.obj \ file.obj \ filefn.obj \ fileconf.obj \ framecmn.obj \ ftp.obj \ gdicmn.obj \ image.obj \ imagbmp.obj \ imagjpeg.obj \ imagpng.obj \ imaggif.obj \ intl.obj \ ipcbase.obj \ helpbase.obj \ layout.obj \ log.obj \ memory.obj \ mimetype.obj \ module.obj \ odbc.obj \ object.obj \ prntbase.obj \ resource.obj \ tbarbase.obj \ tbarsmpl.obj \ textfile.obj \ timercmn.obj \ utilscmn.obj \ validate.obj \ valgen.obj \ valtext.obj \ date.obj \ hash.obj \ list.obj \ paper.obj COMLIBOBJS2 = \ string.obj \ socket.obj \ sckaddr.obj \ sckfile.obj \ sckipc.obj \ sckstrm.obj \ url.obj \ http.obj \ protocol.obj \ time.obj \ tokenzr.obj \ wxexpr.obj \ y_tab.obj \ extended.obj \ process.obj \ wfstream.obj \ mstream.obj \ zstream.obj \ stream.obj \ datstrm.obj \ objstrm.obj \ variant.obj \ dlgcmn.obj \ wincmn.obj \ txtstrm.obj \ wxchar.obj \ unzip.obj \ filesys.obj \ fs_inet.obj \ fs_zip.obj OS2OBJS = \ ..\os2\$D\accel.obj \ ..\os2\$D\app.obj \ ..\os2\$D\bitmap.obj \ ..\os2\$D\bmpbuttn.obj \ ..\os2\$D\brush.obj \ ..\os2\$D\button.obj \ ..\os2\$D\checkbox.obj \ ..\os2\$D\checklst.obj \ ..\os2\$D\choice.obj \ ..\os2\$D\clipbrd.obj \ ..\os2\$D\colordlg.obj \ ..\os2\$D\dc.obj \ ..\os2\$D\dialog.obj \ ..\os2\$D\frame.obj \ ..\os2\$D\window.obj OS2LIBOBJS = \ accel.obj \ app.obj \ bitmap.obj \ bmpbuttn.obj \ brush.obj \ button.obj \ checkbox.obj \ checklst.obj \ choice.obj \ clipbrd.obj \ colordlg.obj \ dc.obj \ dialog.obj \ frame.obj \ window.obj HTMLOBJS = \ ..\html\$D\htmlcell.obj \ ..\html\$D\htmlfilter.obj \ ..\html\$D\htmlhelp.obj \ ..\html\$D\htmlhelp_io.obj \ ..\html\$D\htmlparser.obj \ ..\html\$D\htmltag.obj \ ..\html\$D\htmlwin.obj \ ..\html\$D\htmlwinparser.obj \ ..\html\$D\mod_fonts.obj \ ..\html\$D\mod_hline.obj \ ..\html\$D\mod_image.obj \ ..\html\$D\mod_layout.obj \ ..\html\$D\mod_links.obj \ ..\html\$D\mod_list.obj \ ..\html\$D\mod_pre.obj \ ..\html\$D\mod_tables.obj \ ..\html\$D\search.obj # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc. OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(NONESSENTIALOBJS) $(OS2OBJS) # Normal, static library all: $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) dirs: $(OS2DIR)\$D $(COMMDIR)\$D $(GENDIR)\$D $(HTMLDIR)\$D test: $(OS2DIR)\$D\wave.obj test2: ..\common\Debug\config.obj $D: md $D $(COMMDIR)\$D: md $(COMMDIR)\$D $(OS2DIR)\$D: md $(OS2DIR)\$D $(GENDIR)\$D: md $(GENDIR)\$D $(HTMLDIR)\$D: md $(HTMLDIR)\$D $(COMLIBOBJS1): copy ..\common\$D\cmndata.obj copy ..\common\$D\config.obj copy ..\common\$D\dcbase.obj copy ..\common\$D\db.obj copy ..\common\$D\dbtable.obj copy ..\common\$D\docview.obj copy ..\common\$D\docmdi.obj copy ..\common\$D\dynarray.obj copy ..\common\$D\dynlib.obj copy ..\common\$D\event.obj copy ..\common\$D\file.obj copy ..\common\$D\filefn.obj copy ..\common\$D\fileconf.obj copy ..\common\$D\framecmn.obj copy ..\common\$D\ftp.obj copy ..\common\$D\gdicmn.obj copy ..\common\$D\image.obj copy ..\common\$D\imagbmp.obj copy ..\common\$D\imagjpeg.obj copy ..\common\$D\imagpng.obj copy ..\common\$D\imaggif.obj copy ..\common\$D\intl.obj copy ..\common\$D\ipcbase.obj copy ..\common\$D\helpbase.obj copy ..\common\$D\layout.obj copy ..\common\$D\log.obj copy ..\common\$D\memory.obj copy ..\common\$D\mimetype.obj copy ..\common\$D\module.obj copy ..\common\$D\odbc.obj copy ..\common\$D\object.obj copy ..\common\$D\prntbase.obj copy ..\common\$D\resource.obj copy ..\common\$D\tbarbase.obj copy ..\common\$D\tbarsmpl.obj copy ..\common\$D\textfile.obj copy ..\common\$D\timercmn.obj copy ..\common\$D\utilscmn.obj copy ..\common\$D\validate.obj copy ..\common\$D\valgen.obj copy ..\common\$D\valtext.obj copy ..\common\$D\date.obj copy ..\common\$D\hash.obj copy ..\common\$D\list.obj copy ..\common\$D\paper.obj $(COMLIBOBJS2): copy ..\common\$D\string.obj copy ..\common\$D\socket.obj copy ..\common\$D\sckaddr.obj copy ..\common\$D\sckfile.obj copy ..\common\$D\sckipc.obj copy ..\common\$D\sckstrm.obj copy ..\common\$D\url.obj copy ..\common\$D\http.obj copy ..\common\$D\protocol.obj copy ..\common\$D\time.obj copy ..\common\$D\tokenzr.obj copy ..\common\$D\wxexpr.obj copy ..\common\$D\y_tab.obj copy ..\common\$D\extended.obj copy ..\common\$D\process.obj copy ..\common\$D\wfstream.obj copy ..\common\$D\mstream.obj copy ..\common\$D\zstream.obj copy ..\common\$D\stream.obj copy ..\common\$D\datstrm.obj copy ..\common\$D\objstrm.obj copy ..\common\$D\variant.obj copy ..\common\$D\dlgcmn.obj copy ..\common\$D\wincmn.obj copy ..\common\$D\txtstrm.obj copy ..\common\$D\wxchar.obj copy ..\common\$D\unzip.obj copy ..\common\$D\filesys.obj copy ..\common\$D\fs_inet.obj copy ..\common\$D\fs_zip.obj $(GENLIBOBJS): copy ..\generic\$D\caret.obj copy ..\generic\$D\choicdgg.obj copy ..\generic\$D\gridg.obj copy ..\generic\$D\laywin.obj copy ..\generic\$D\panelg.obj copy ..\generic\$D\progdlgg.obj copy ..\generic\$D\prop.obj copy ..\generic\$D\propform.obj copy ..\generic\$D\proplist.obj copy ..\generic\$D\sashwin.obj copy ..\generic\$D\scrolwin.obj copy ..\generic\$D\splitter.obj copy ..\generic\$D\statusbr.obj copy ..\generic\$D\tabg.obj copy ..\generic\$D\textdlgg.obj copy ..\generic\$D\tipdlg.obj copy ..\generic\$D\busyinfo.obj $(OS2LIBOBJS): copy ..\os2\$D\accel.obj copy ..\os2\$D\app.obj copy ..\os2\$D\bitmap.obj copy ..\os2\$D\bmpbuttn.obj copy ..\os2\$D\brush.obj copy ..\os2\$D\button.obj copy ..\os2\$D\checkbox.obj copy ..\os2\$D\checklst.obj copy ..\os2\$D\choice.obj copy ..\os2\$D\clipbrd.obj copy ..\os2\$D\colordlg.obj copy ..\os2\$D\dc.obj copy ..\os2\$D\dialog.obj copy ..\os2\$D\frame.obj copy ..\os2\$D\window.obj # wxWindows library as DLL dll: nmake -f makefile.va all FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=$(NEW_WXLIBNAME) cleandll: nmake -f makefile.va clean FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=$(NEW_WXLIBNAME) # wxWindows + app as DLL. Only affects main.cpp. dllapp: nmake -f makefile.va all FINAL=$(FINAL) DLL=1 # wxWindows + app as DLL, for Netscape plugin - remove DllMain. dllnp: nmake -f makefile.va all FINAL=$(FINAL) DLL=1 # Use this to make dummy.obj and generate a PCH. # You might use the dll target, then the pch target, in order to # generate a DLL, then a PCH/dummy.obj for compiling your applications with. # # Explanation: Normally, when compiling a static version of wx.lib, your dummy.obj/PCH # are associated with wx.lib. When using a DLL version of wxWindows, however, # the DLL is compiled without a PCH, so you only need it for compiling the app. # In fact headers are compiled differently depending on whether a DLL is being made # or an app is calling the DLL exported functionality (WXDLLEXPORT is different # in each case) so you couldn't use the same PCH. pch: nmake -f makefile.va pch1 WXUSINGDLL=1 FINAL=$(FINAL) NEW_WXLIBNAME=$(NEW_WXLIBNAME) pch1: dirs $(DUMMYOBJ) echo $(DUMMYOBJ) !if "$(WXMAKINGDLL)" != "1" ### Static library $(WXDIR)\lib\wxcom1.lib: $(COMLIBOBJS1) touch $(WXDIR)\lib\wxcom1.lib del $(WXDIR)\lib\wxcom1.lib ilib $(LIBFLAGS) $@ @<< $**; << $(WXDIR)\lib\wxcom2.lib: $(COMLIBOBJS2) touch $(WXDIR)\lib\wxcom2.lib del $(WXDIR)\lib\wxcom2.lib ilib $(LIBFLAGS) $@ @<< $**; << $(WXDIR)\lib\wxgen.lib: $(GENLIBOBJS) touch $(WXDIR)\lib\wxgen.lib del $(WXDIR)\lib\wxgen.lib ilib $(LIBFLAGS) $@ @<< $**; << $(WXDIR)\lib\wxnones.lib: $(NONESSENTIALOBJS) touch $(WXDIR)\lib\wxnones.lib del $(WXDIR)\lib\wxnones.lib ilib $(LIBFLAGS) $@ @<< $**; << $(WXDIR)\lib\wxos2.lib: $(OS2LIBOBJS) touch $(WXDIR)\lib\wxos2.lib del $(WXDIR)\lib\wxos2.lib ilib $(LIBFLAGS) $@ @<< $**; << del *.obj $(WXDIR)\lib\wx.lib: \ $D\dummy.obj \ $(COMTEMPTGT1) \ $(COMTEMPTGT2) \ $(GENTEMPTGT) \ $(NONESTEMPTGT) \ $(OS2TEMPTGT) \ $(PERIPH_LIBS) touch $(LIBTARGET) del $(LIBTARGET) ilib $(LIBFLAGS) $@ @<< $**; << del $(COMTEMPTGT1) del $(COMTEMPTGT2) del $(GENTEMPTGT) del $(NONESTEMPTGT) del $(OS2TEMPTGT) !else # Update the import library $(WXDIR)\lib\wx200.lib: $(OBJECTS) implib $(WXDIR)\lib\wx200.lib $(WXDIR)\lib\wx200.def # Update the dynamic link library $(WXDIR)\lib\wx200.dll: $(OBJECTS) $(WXDIR)\lib\wx200.lib icc @<< /B" $(LINKFLAGS)" /Fe$@ $(LIBS) $(OBJECTS) $(WXDIR)\lib\wx200.def << !endif $D\dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\os2\setup.h icc $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummy.obj /Tp dummy.cpp $D\dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\os2\setup.h icc @<< $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummydll.obj /c /Tp dummydll.cpp << # If taking wxWindows from CVS, setup.h doesn't exist yet. $(WXDIR)\include\wx\os2\setup.h: $(WXDIR)\include\wx\os2\setup0.h copy "$(WXDIR)"\include\wx\os2\setup.h "$(WXDIR)"\include\wx\os2\setup.bak copy "$(WXDIR)"\include\wx\os2\setup0.h "$(WXDIR)"\include\wx\os2\setup.h ..\common\$D\extended.obj: ..\common\extended.c icc @<< $(CPPFLAGS2) /Fo$@ $(COMMDIR)\extended.c << ..\common\$D\y_tab.obj: ..\common\y_tab.c ..\common\lex_yy.c icc @<< $(CPPFLAGS2) /DUSE_DEFINE /DYY_USE_PROTOS /Fo$@ ..\common\y_tab.c << ..\common\y_tab.c: ..\common\dosyacc.c copy "..\common"\dosyacc.c "..\common"\y_tab.c ..\common\lex_yy.c: ..\common\doslex.c copy "..\common"\doslex.c "..\common"\lex_yy.c $(OBJECTS): $(WXDIR)/include/wx/setup.h ..\common\$D\unzip.obj: ..\common\unzip.c icc @<< $(CPPFLAGS2) /Fo$@ $(COMMDIR)\unzip.c << clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm -erase $(LIBTARGET) -erase ..\..\lib\wx200.dll -erase ..\..\lib\wx200.lib -erase $(GENDIR)\$D\*.obj -erase $(COMMDIR)\$D\*.obj -erase $(COMMDIR)\\y_tab.c -erase $(COMMDIR)\lex_yy.c -erase $(OS2DIR)\$D\*.obj -rmdir $(D) -rmdir ole\$(D) -rmdir ..\generic\$(D) -rmdir ..\common\$(D) cleanall: clean