#
#
# NOTE: Building DLL versions of the libraries
# is still in beta stadium.
#
# Do it on your own risk.
# If you encounter difficulties use nt.mak and
# build static versions.
#
#

#
# START OF CONFIGURATION SECTION.
#
# You may need to customize this section.
#

# Where do you want to install the software?
PREFIX=C:\P\DLL-LIB

# Which programs to use for compiling and linking?
CC=CL
LD=LINK

#
# Where is Visual C?
# Directories lib, include and bin must be beyound this.
#
VC=C:\Programme\DevStudio\Vc

#
# END OF CONFIGURATION SECTION.
#
# No changes should be necessary below this line.
#


all:	lib

install:	all
	-mkdir $(PREFIX)
	-mkdir $(PREFIX)\include
	-mkdir $(PREFIX)\lib
	-mkdir $(PREFIX)\bin
	xcopy *.dll $(PREFIX)\bin\
	xcopy *.h   $(PREFIX)\include\
	xcopy ..\*.h $(PREFIX)\include\
	xcopy *.lib $(PREFIX)\lib

clean:
	-del *.obj
	-del *.lib
	-del *.dll
	-del *.exe

lib:	netpbm.lib

OBJS=	libpm.obj fileio.obj bitio.obj colorname.obj \
	libpbm1.obj libpbm2.obj libpbm3.obj libpbm5.obj \
	libpgm1.obj libpgm2.obj \
	libppm1.obj libppm2.obj libppmcmap.obj libppmcolor.obj libppmd.obj\
	libppmfloyd.obj \
	libpnm1.obj libpnm2.obj libpnm3.obj \
	libpam.obj libpammap.obj libsystem.obj nstring.obj shhopt.obj

DKNETDLLOBJ=	dktcpip.obj

netpbm.lib:	netpbm.dll

netpbm.dll:	$(OBJS) netpbm.def
	$(LD) /nologo /INCREMENTAL:NO /RELEASE /dll /pdb:none /def:"netpbm.def" /out:"netpbm.dll" /implib:"netpbm.lib" $(OBJS)

COBJFLAGS= /nologo /MD /GD -DWIN32 -D_WIN32 -D_MT -D_DLL -O2 -I. -I.. -I "$(VC)\Include"

.c.obj:
	$(CC) $(COBJFLAGS) -c $*.c

