#
#
# Use the hpcdtoppm procedures for writing ppm and pgm
VFLAGS= -DOWN_WRITE
VLIBS=
# Use the pbmplus procedures for writing ppm and pgm
#VFLAGS=
#VLIBS= libpbm.a libpgm.a libppm.a
#
#
CC=	gcc 
CFLAGS=	-g -ansi -Wall ${VFLAGS} 
INCL=	hpcdtoppm.h config.h
OBJ=	main.o output.o color.o format.o tools.o error.o \
	ppm.o postscr.o const.o
COMPILE=${CC} ${CFLAGS}  -c
#
hpcdtoppm.exe: ${OBJ}
	${CC} -o hpcdtoppm.exe ${OBJ} ${VLIBS}
#
${OBJ}: ${$@:.o=.c} ${INCL}
	${COMPILE} ${*}.c

# the above is the original makefile downloaded. the following was
# added for cleaning and installing
#
# some important variables
# 
ISIP_BIN=$(USFS)/bin/$(ISIP_BINARY)
ISIP_EXE=hpcdtoppm.exe
BEXE = $(subst .exe,,$(ISIP_EXE))

# make everything silent
#
.SILENT:

# clean up
#
clean:
	echo "> removing binaries" $(ISIP_EXE)
	rm -f $(ISIP_EXE)
	echo "> removing" $(OBJ)
	rm -f $(OBJ)

# install
#
install: $(ISIP_EXE)
	echo "> installing binary" $(ISIP_BIN)/$(BEXE)
	cp $(ISIP_EXE) $(ISIP_BIN)/$(BEXE)

#
# end of file
