X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/735c116a84838813bca1bf3406cadd49dac73dfc..9f4de6b2cf06f53a98b28f53640f3b9ec8cf4182:/src/zlib/MAKEFILE.VA diff --git a/src/zlib/MAKEFILE.VA b/src/zlib/MAKEFILE.VA index 8322d781f6..0a5251c2e3 100644 --- a/src/zlib/MAKEFILE.VA +++ b/src/zlib/MAKEFILE.VA @@ -7,24 +7,32 @@ # # "%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 SRCSUFF=c -OS2FLAGS=/c /W3 /DOS232 /D__VISAGECPP__ /Ss /Q /N100 +OS2FLAGS=/c /W2 /DOS232 /D__VISAGECPP__ /Ss /Q /N100 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 = j:\dev\wx2\wxWindows +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" -D=Debug +!if "$(WXMAKINGDLL)" == "1" +D=DebugOS2DLL +!else +D=DebugOS2 +!endif OPT = DEBUG_FLAGS= /Ti /D__WXDEBUG__ #/Fb LINK_DEBUG_FLAGS=/DEBUG @@ -50,14 +62,22 @@ CRTFLAG=/Gm /Gd !else # /O1 - smallest code # /O2 - fastest code -D=Release +!if "$(WXMAKINGDLL)" == "1" +D=RelseOS2DLL +!else +D=RelseOS2 +!endif OPT = /O+ /Oc /G5 DEBUG_FLAGS= LINK_DEBUG_FLAGS=/RELEASE CRTFLAG=/Gm /Gd !endif -CPPFLAGS=$(OS2FLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG) +!if [md $(OS2ZLIBDIR)\$D] +!endif + +CPPFLAGS=$(OS2FLAGS) $(EXTRADLLFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG) +LINKFKAGS=$(OS2LINKFLAGS) $(EXTRALNKFLAGS) {..\zlib}.c{..\zlib\$D}.obj: @echo $< @@ -81,10 +101,9 @@ OBJECTS = \ ..\zlib\$D\uncompr.obj \ ..\zlib\$D\zutil.obj -all: $(OS2ZLIBDIR)\$D $(OS2ZLIBLIB) +all: $(OS2ZLIBLIB) -$(OS2ZLIBDIR)\$D: - md $(OS2ZLIBDIR)\$D +!if "$(WXMAKINGDLL)" != "1" $(WXDIR)\lib\os2zlib.lib: $(OBJECTS) touch $(WXDIR)\lib\os2zlib.lib @@ -93,10 +112,24 @@ $(WXDIR)\lib\os2zlib.lib: $(OBJECTS) $**; << +!else + +# Update the dynamic link library +$(WXDIR)\lib\os2zlib.dll: $(OBJECTS) + icc @<< + /B" $(LINKFLAGS)" /Fe$@ + $(LIBS) + $(OBJECTS) + $(WXDIR)\src\os2\os2zlib.def +<< + implib $(WXDIR)\lib\os2zlibd.lib $(WXDIR)\src\os2\os2zlib.def + +!endif + clean: - del *.obj - del *.exe - del *.lib + del $(OS2ZLIBLIB) + erase /N $(OS2ZLIBDIR)\$D + rd $(OS2ZLIBDIR)\$D cleanall: clean