From 7e415a0f6606f03cf95a38374aa514e51b21a97f Mon Sep 17 00:00:00 2001 From: David Webster Date: Thu, 9 Mar 2000 21:11:46 +0000 Subject: [PATCH] Update for building zlib as an os2 dll git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/zlib/MAKEFILE.VA | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/src/zlib/MAKEFILE.VA b/src/zlib/MAKEFILE.VA index e2ba1cdb24..5a9abb6310 100644 --- a/src/zlib/MAKEFILE.VA +++ b/src/zlib/MAKEFILE.VA @@ -7,7 +7,7 @@ # # "%W% %G%" # -# Makefile : Builds os2png.lib library for OS/2 3.0/4.0 +# Makefile : Builds os2zlib.lib library for OS/2 3.0/4.0 # Suffixes OBJSUFF=obj @@ -18,13 +18,21 @@ OS2LINKFLAGS=/BASE:0x00010000 /PMTYPE:PM /NOE /NOD /ALIGN:16 OS2LIBFLAGS=/NOL /NOE OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB +!if "$(WXMAKINGDLL)" != "0" +EXTRADLLFLAGS=/DWXMAKINGDLL=1 /Ge- /D__OS2DLL__ +EXTRALNKFLAGS=/DLL +!endif + # Change WXDIR or WXWIN to wherever wxWindows is found WXDIR = $(WXWIN) OS2ZLIBDIR=$(WXDIR)\src\zlib OS2ZLIBINC=$(WINPNGDIR) +!if "$(WXMAKINGDLL)" != "1" OS2ZLIBLIB=$(WXDIR)\lib\os2zlib.lib - +!else +OS2ZLIBLIB=$(WXDIR)\lib\os2zlib.dll +!endif INC= !ifndef FINAL @@ -42,7 +50,11 @@ MAKEPRECOMP=/Fi$(PCH) !endif !if "$(FINAL)" == "0" +!if "$(WXMAKINGDLL)" == "1" +D=DebugOS2DLL +!else D=DebugOS2 +!endif OPT = DEBUG_FLAGS= /Ti /D__WXDEBUG__ #/Fb LINK_DEBUG_FLAGS=/DEBUG @@ -50,7 +62,11 @@ CRTFLAG=/Gm /Gd !else # /O1 - smallest code # /O2 - fastest code +!if "$(WXMAKINGDLL)" == "1" +D=RelseOS2DLL +!else D=RelseOS2 +!endif OPT = /O+ /Oc /G5 DEBUG_FLAGS= LINK_DEBUG_FLAGS=/RELEASE @@ -60,7 +76,8 @@ CRTFLAG=/Gm /Gd !if [md $(OS2ZLIBDIR)\$D] !endif -CPPFLAGS=$(OS2FLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG) +CPPFLAGS=$(OS2FLAGS) $(EXTRADLLFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG) +LINKFKAGS=$(OS2LINKFLAGS) $(EXTRALNKFLAGS) {..\zlib}.c{..\zlib\$D}.obj: @echo $< @@ -86,6 +103,8 @@ OBJECTS = \ all: $(OS2ZLIBLIB) +!if "$(WXMAKINGDLL)" != "1" + $(WXDIR)\lib\os2zlib.lib: $(OBJECTS) touch $(WXDIR)\lib\os2zlib.lib del $(WXDIR)\lib\os2zlib.lib @@ -93,6 +112,20 @@ $(WXDIR)\lib\os2zlib.lib: $(OBJECTS) $**; << +!else + +# Update the dynamic link library +$(WXDIR)\lib\os2zlib.dll: $(OBJECTS) + icc @<< + /B" $(LINKFLAGS)" /Fe$@ + $(LIBS) + $(OBJECTS) + $(WXDIR)\lib\os2zlib.def +<< + implib $(WXDIR)\lib\os2zlibd.lib $(WXDIR)\lib\os2zlib.def + +!endif + clean: del $(OS2ZLIBLIB) erase /N $(OS2ZLIBDIR)\$D -- 2.45.2