#
#
# 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?
PROGRAMS=C:\Programs
VENDOR=Krause
PREFIX=$(PROGRAMS)\$(VENDOR)

# 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

SCD=	-DSYSCONFDIR=\"C:\\ETC\"

#
# Toggle the following section to specify german
# as the default language.
#

LANG=de

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

STCOPT= --/log/stderr/level=error --/log/stdout/level=none

all:	libs

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

libs:	netpbm.lib

OBJS=	libpbm1.obj \
	libpbm2.obj \
	libpbm3.obj \
	libpbm4.obj \
	libpbm5.obj \
	libpgm1.obj \
	libpgm2.obj \
	libpnm1.obj \
	libpnm2.obj \
	libpnm3.obj \
	libpnm4.obj \
	libppm1.obj \
	libppm2.obj \
	libppm3.obj \
	libppm4.obj \
	libppm5.obj \
	shhopt.obj 

DKNETDLLOBJ=	dktcpip.obj

netpbm.lib:	netpbm.dll

netpbm.dll:	$(OBJS) netpbm.def
	$(LD) /nologo /NODEFAULTLIB /INCREMENTAL:NO /RELEASE /dll /pdb:none /machine:I386 /def:"netpbm.def" /out:"netpbm.dll" /implib:"netpbm.lib" $(OBJS) advapi32.lib msvcrt.lib kernel32.lib

.c.obj:
	$(CC) /nologo -DWIN32 -D_WIN32 -D_MT -D_DLL $(SCD) -MD -O -I. -I.. $(CFLAGS) $(VERSNO) -c $*.c

