# Last edited on 2004-11-07 00:40:32 by stolfi # Makefile for libimg - an old set of image hacks LIBNAME := libimg # Location of Stolfi's libraries INC := /home/staff/stolfi/PUB/include LIB := /home/staff/stolfi/PUB/${PLATFORM}/lib # Location of the PBM libraries PBMPUB := /home/staff/stolfi/pkg/netpbm-1mar1994-1/PUB/${PLATFORM} PBMINC := ${PBMPUB}/include PBMLIB := ${PBMPUB}/lib HFILES := \ frgb.h \ frgb_image.h \ frgb_ops.h \ yuvhacks.h \ colorfield.h \ colorfield_unif.h \ colorfield_ramp.h \ colorfield_wavy.h HFILES_BUG := \ colorfield_poly.h CFILES := \ frgb.c \ frgb_image.c \ frgb_ops.c \ yuvhacks.c \ colorfield.c \ colorfield_unif.c \ colorfield_ramp.c \ colorfield_wavy.c CFILES_BUG := \ colorfield_poly.c HOFILES := ${subst .h,.ho,${HFILES}} OFILES := ${subst .c,.o,${CFILES}} LIBFILE = \ ${LIBNAME}.a .PHONY: all uninstall install test clean depend all: uninstall clean build install # all: build uninstall: ( cd ${INC} && rm -f ${HFILES} ${HOFILES} ) ( cd ${LIB} && rm -f ${LIBFILE} ) install: ${HFILES} ${HOFILES} ${LIBFILE} cp -p ${HFILES} ${INC} cp ${HOFILES} ${INC} cp -p ${LIBFILE} ${LIB} build: ${LIBFILE} test: cd tests && ${MAKE} all clean: -/bin/rm -f *.o *.ho *.a core DEPFILE := Deps.make ifeq "${PBMINC}/" "/usr/include/" IFLAGS := -I. -I${INC} else IFLAGS := -I. -I${INC} -I${PBMINC} endif depend: /bin/rm -f ${DEPFILE} extract-ho-deps ${IFLAGS} -I/usr/include ${HFILES} ${CFILES} \ | egrep -v ': /usr/include' \ > ${DEPFILE} GCCFLAGS = \ -g \ -ansi \ -Wall -Wpointer-arith -Wmissing-prototypes %.o: %.c ;\ gcc -c ${GCCFLAGS} ${IFLAGS} $*.c %.ho: %.h ;\ gcc -o $*.ho -c ${GCCFLAGS} ${IFLAGS} -x c $*.h \ || /bin/rm -f $*.ho ${LIBFILE}: ${OFILES} ;\ rm -f $*.a && ar crv $*.a ${OFILES} && ranlib $*.a include ${DEPFILE}