From 1d4ad4df1daa3fdf2f70d4abfe14df65ad21292e Mon Sep 17 00:00:00 2001 From: David Webster Date: Thu, 9 Mar 2000 21:12:29 +0000 Subject: [PATCH] Update for building png as an os2 dll git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/png/MAKEFILE.VA | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/src/png/MAKEFILE.VA b/src/png/MAKEFILE.VA index 50eed819fa..e7581f96d4 100644 --- a/src/png/MAKEFILE.VA +++ b/src/png/MAKEFILE.VA @@ -18,13 +18,22 @@ 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) OS2PNGDIR=$(WXDIR)\src\png OS2PNGINC=$(WINPNGDIR) OS2PNGLIB=$(WXDIR)\lib\os2png.lib - +!if "$(WXMAKINGDLL)" != "1" +OS2PNGLIB=$(WXDIR)\lib\os2png.lib +!else +OS2PNGLIB=$(WXDIR)\lib\os2png.dll +!endif INC=-I$(WXDIR)\src\zlib -I$(OS2PNGINC) !ifndef FINAL @@ -42,7 +51,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 +63,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 +77,9 @@ CRTFLAG=/Gm /Gd !if [md $(OS2PNGDIR)\$D] !endif -CPPFLAGS=$(OS2FLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG) +CPPFLAGS=$(OS2FLAGS) $(EXTRADLLFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG) +LINKFKAGS=$(OS2LINKFLAGS) $(EXTRALNKFLAGS) +LIBS=..\\..\\lib\os2zlibd.lib {..\png}.c{..\png\$D}.obj: @echo $< @@ -87,6 +106,8 @@ OBJECTS = \ all: $(OS2PNGLIB) +!if "$(WXMAKINGDLL)" != "1" + $(WXDIR)\lib\os2png.lib: $(OBJECTS) touch $(WXDIR)\lib\os2png.lib del $(WXDIR)\lib\os2png.lib @@ -94,6 +115,20 @@ $(WXDIR)\lib\os2png.lib: $(OBJECTS) $**; << +!else + +# Update the dynamic link library +$(WXDIR)\lib\os2png.dll: $(OBJECTS) + icc @<< + /B" $(LINKFLAGS)" /Fe$@ + $(LIBS) + $(OBJECTS) + $(WXDIR)\lib\os2png.def +<< + implib $(WXDIR)\lib\os2pngd.lib $(WXDIR)\lib\os2png.def + +!endif + clean: del $(OS2PNGLIB) erase /N $(OS2PNGDIR)\$D -- 2.45.2