# Last edited on 2004-11-05 01:01:47 by stolfi # Makefile for ppmvquant PROG = ppmvquant INC = /home/staff/stolfi/PUB/include LIB = /home/staff/stolfi/PUB/${PLATFORM}/lib BIN = /home/staff/stolfi/PUB/${PLATFORM}/bin MAN = /home/staff/stolfi/PUB/${PLATFORM}/man # PBMPUB = ${HOME}/pkg/netpbm-1mar1994-1/PUB/${PLATFORM} PBMPUB = /usr PBMINC = ${PBMPUB}/include PBMLIB = ${PBMPUB}/lib INCLUDES = \ ${INC}/ppm_image.h \ ${PBMINC}/pbmplus.h \ ${PBMINC}/pnm.h \ ${PBMINC}/ppm.h \ ${PBMINC}/pgm.h \ ${PBMINC}/pbm.h \ ${PBMINC}/dithers.h \ ${PBMINC}/ppmcmap.h \ ${PBMINC}/libppm.h \ ${PBMINC}/libpgm.h \ ${PBMINC}/libpbm.h LIBRARIES = \ ${LIB}/libjspbm.a \ ${PBMLIB}/libpnm.a \ ${PBMLIB}/libppm.a \ ${PBMLIB}/libpgm.a \ ${PBMLIB}/libpbm.a SHELL = /bin/sh MANSECT = 1 MANPAGE = ${PROG}.1 .PHONY: all uninstall build install clean all: uninstall build install CC = gcc \ -Wall -Wpointer-arith -Wmissing-prototypes \ -DSYSV \ -pedantic \ -fpcc-struct-return CFLAGS = -O -g LDFLAGS = # Do not include ${PBMINC} if it is "/usr/include" # IFLAGS = -I. -I${PBMINC} -I${INC} IFLAGS = -I. -I${INC} build: ${PROG} uninstall: ;\ ( cd ${BIN} && rm -f ${PROG} ) ;\ ( cd ${MAN} && rm -f man${MANSECT}/${MANPAGE} ) install: ;\ cp -p ${PROG} ${BIN}/ ;\ cp -p ${MANPAGE} ${MAN}/man${MANSECT}/ # Rule for plain programs. ${PROG}: ${PROG}.c ${PROG}.h ${INCLUDES} ${LIBRARIES} ${CC} ${CFLAGS} ${IFLAGS} ${LDFLAGS} -o $@ $@.c ${LIBRARIES} clean: -/bin/rm -f *.o *.ho *.a *~ core ${PROG}