#
# File: FilterContours/Makefile
# Author: David Meyers,
#         K.R. Sloan
# Last Modified: 6 March 1991
# Purpose: maintain FilterContours application

ARCH = SS1

BASE = /wa/Contours

DEST = ${BASE}/${ARCH}bin

SOURCE =  ../Contours.c ../InputStuff.c  \
	  ../ParsingFunctions.c \
          ../editor/SectionOutput.c \
          FilterContours.c \
          fit_cubic.c 2d.c 

OBJECTS = Contours.o InputStuff.o \
          ParsingFunctions.o \
          SectionOutput.o \
          fit_cubic.o 2d.o

PROGRAMS = FilterContours

all: ${PROGRAMS}

INCLUDE = -I../../include -I../editor -I. 

CFLAGS  =-g ${INCLUDE}

FilterContours: FilterContours.c ${OBJECTS}
	cc -o FilterContours ${CFLAGS} FilterContours.c \
              ${OBJECTS} -lm

Contours.o: ../Contours.c
	cc -c ${CFLAGS} ../Contours.c

InputStuff.o: ../InputStuff.c
	cc -c ${CFLAGS} ../InputStuff.c

ParsingFunctions.o: ../ParsingFunctions.c
	cc -c ${CFLAGS} ../ParsingFunctions.c

SectionOutput.o: ../editor/SectionOutput.c
	cc -c ${CFLAGS} ../editor/SectionOutput.c

fit_cubic.o: fit_cubic.c

2d.o: 2d.c

lint :
	lint  ${INCLUDE} ${SOURCE} -lc

install :${PROGRAMS}
	mv ${PROGRAMS} ${DEST}
	(cd ${DEST}; chmod a+rx ${PROGRAMS})
	ls -l ${DEST}

clean :
	rm -f *.o *~ a.out core
	ls -l
