From 3bedfb1d170a7f287137a987c62081b467b02f74 Mon Sep 17 00:00:00 2001 From: David Webster Date: Thu, 9 Mar 2000 21:11:21 +0000 Subject: [PATCH] Update for building tiff as an os2 dll git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/tiff/MAKEFILE.VA | 38 +++++++++++++++++++++++++++++++++++++- src/tiff/tif_open.c | 20 ++++++++++---------- 2 files changed, 47 insertions(+), 11 deletions(-) diff --git a/src/tiff/MAKEFILE.VA b/src/tiff/MAKEFILE.VA index cd0d0bdcab..2d67a0988d 100644 --- a/src/tiff/MAKEFILE.VA +++ b/src/tiff/MAKEFILE.VA @@ -18,6 +18,11 @@ 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) @@ -25,6 +30,12 @@ OS2TIFFDIR=$(WXDIR)\src\tiff OS2TIFFINC=$(WINTIFFDIR) OS2TIFFLIB=$(WXDIR)\lib\os2tiff.lib +!if "$(WXMAKINGDLL)" != "1" +OS2TIFFLIB=$(WXDIR)\lib\os2tiff.lib +!else +OS2TIFFLIB=$(WXDIR)\lib\os2tiff.dll +!endif + INC=-I$(WXDIR)\src\TIFF -I$(OS2TIFFINC) !ifndef FINAL @@ -42,7 +53,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 +65,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 @@ -61,7 +80,8 @@ CRTFLAG=/Gm /Gd !endif -CPPFLAGS=$(OS2FLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG) +CPPFLAGS=$(OS2FLAGS) $(EXTRADLLFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG) +LINKFKAGS=$(OS2LINKFLAGS) $(EXTRALNKFLAGS) {..\tiff}.c{..\tiff\$D}.obj: @echo $< @@ -141,6 +161,8 @@ LIBOBJECTS = \ all: $(OBJECTS) $(OS2TIFFLIB) +!if "$(WXMAKINGDLL)" != "1" + $(WXDIR)\lib\os2tiff.lib: $(LIBOBJECTS) touch $(WXDIR)\lib\os2tiff.lib del $(WXDIR)\lib\os2tiff.lib @@ -149,6 +171,20 @@ $(WXDIR)\lib\os2tiff.lib: $(LIBOBJECTS) << del *.obj +!else + +# Update the dynamic link library +$(WXDIR)\lib\os2tiff.dll: $(OBJECTS) + icc @<< + /B" $(LINKFLAGS)" /Fe$@ + $(LIBS) + $(OBJECTS) + $(WXDIR)\lib\os2tiff.def +<< + implib $(WXDIR)\lib\os2tiffd.lib $(WXDIR)\lib\os2tiff.def + +!endif + clean: del $(OS2TIFFLIB) erase /N $(OS2TIFFDIR)\$D diff --git a/src/tiff/tif_open.c b/src/tiff/tif_open.c index a704468ec6..5b0e4983a9 100644 --- a/src/tiff/tif_open.c +++ b/src/tiff/tif_open.c @@ -4,23 +4,23 @@ * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. * - * Permission to use, copy, modify, distribute, and sell this software and + * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Sam Leffler and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ @@ -29,7 +29,7 @@ */ #include "tiffiop.h" -void _TIFFSetDefaultCompressionState(TIFF* tif); +void LINKAGEMODE _TIFFSetDefaultCompressionState(TIFF* tif); static const long typemask[13] = { 0L, /* TIFF_NOTYPE */ @@ -327,7 +327,7 @@ TIFFClientOpen( TIFFError(name, "Not a TIFF file, bad version number %d (0x%x)", tif->tif_header.tiff_version, - tif->tif_header.tiff_version); + tif->tif_header.tiff_version); goto bad; } tif->tif_flags |= TIFF_MYBUFFER; -- 2.45.2