# Makefile for pnmxarith # Last edited on 2001-11-02 18:08:55 by stolfi PROG = pnmxarith PBMPLUS_PREFIX = /usr INSTALL_PREFIX = ${HOME} INSTALL_INC = ${INSTALL_PREFIX}/include INSTALL_LIB = ${INSTALL_PREFIX}/lib INSTALL_BIN = ${INSTALL_PREFIX}/bin INSTALL_MAN = ${INSTALL_PREFIX}/man PBMINC = ${PBMPLUS_PREFIX}/include PBMLIB = ${PBMPLUS_PREFIX}/lib INCLUDES = \ ${PBMINC}/pbm.h \ ${PBMINC}/pgm.h \ ${PBMINC}/ppm.h \ ${PBMINC}/pnm.h LIBRARIES = \ ${PBMLIB}/libpnm.a \ ${PBMLIB}/libppm.a \ ${PBMLIB}/libpgm.a \ ${PBMLIB}/libpbm.a SHELL = /bin/sh MANSECT = 1 MANPAGE = ${PROG}.1 .PHONY: all uninstall install clean all: uninstall clean ${PROG} install CC = gcc \ -DSYSV \ -ansi \ -Wall -Wpointer-arith -Wmissing-prototypes \ -fpcc-struct-return CFLAGS = -O -g LDFLAGS = IFLAGS = -I. -I${PBMINC} uninstall: ;\ ( cd ${INSTALL_BIN} && rm -f ${PROG} ) ;\ ( cd ${INSTALL_MAN} && rm -f man${MANSECT}/${MANPAGE} ) install: ${PROG} ${MANPAGE} ;\ cp -p ${PROG} ${INSTALL_BIN}/ ;\ cp -p ${MANPAGE} ${INSTALL_MAN}/man${MANSECT}/ # Rule for plain programs. ${PROG}: ${PROG}.c ${INCLUDES} ${LIBRARIES} ${CC} ${CFLAGS} ${IFLAGS} ${LDFLAGS} -o $@ $@.c ${LIBRARIES} -lm clean: -/bin/rm -f *.o *.ho *.a *~ core ${PROG}