
CFLAGS= -O

LIBS=	-lim -lm
LINCL=	-L../lib.sun4
IMLIB=	../lib.sun4


#
#  Final products of this makefile:
#

libim.a : image.o pdim.o 
	ar vr libim.a *.o

install : libim.a
	mv libim.a $(IMLIB)
	ranlib $(IMLIB)/libim.a
	chmod 664 $(IMLIB)/libim.a
	/bin/cp image.h $(IMLIB)
	chmod 664 $(IMLIB)/image.h

lint_image: image.c
	lint image.c

lint_pdim: pdim.c
	lint pdim.c

test_im: test_im.o
	cc -o test_im test_im.o $(LINCL) $(LIBS)

test_pdim: test_pdim.o
	cc -o test_pdim test_pdim.o $(LINCL) $(LIBS)

clean:
	rm -f *.o


#
# Intermediate products of this makefile:
#

image.o : image.c image.h
	cc -c $(CFLAGS) image.c

pdim.o : pdim.c image.h
	cc -c $(CFLAGS) pdim.c

test_im.o : test_im.c image.h
	cc -c $(CFLAGS) test_im.c

test_pdim.o : test_pdim.c image.h
	cc -c $(CFLAGS) test_pdim.c
