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)
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
!endif
!if "$(FINAL)" == "0"
+!if "$(WXMAKINGDLL)" == "1"
+D=DebugOS2DLL
+!else
D=DebugOS2
+!endif
OPT =
DEBUG_FLAGS= /Ti /D__WXDEBUG__ #/Fb
LINK_DEBUG_FLAGS=/DEBUG
!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
!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 $<
all: $(OBJECTS) $(OS2TIFFLIB)
+!if "$(WXMAKINGDLL)" != "1"
+
$(WXDIR)\lib\os2tiff.lib: $(LIBOBJECTS)
touch $(WXDIR)\lib\os2tiff.lib
del $(WXDIR)\lib\os2tiff.lib
<<
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