#
# File: Makefile
# Authors: Cheryl Buck,
#          David Meyers,
#          K.R. Sloan
# Last Modified: 13 November 1990
# Purpose: maintain ContourEditor application

ARCH = SS1

BASE = /wa/Contours

SGP = /wa/SGP

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

INCLUDE = -I../../include -I${SGP}/include

CFLAGS  = -g ${INCLUDE}

# for devX
LX = -lX11 -lm
LIBX  = ${SGP}/src/libSGP.${ARCH}.a ${SGP}/src/devXX/libDEVICE.${ARCH}.a

SOURCE =  ../Contours.c \
          ../ParsingFunctions.c \
          ContourEditor.c SectionInput.c SectionOutput.c EditFunctions.c

OBJECTS = Contours.o  \
          ParsingFunctions.o \
          SectionInput.o SectionOutput.o EditFunctions.o

PROGRAMS = ContourEditor

all: ${PROGRAMS}

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

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

SectionInput.o : SectionInput.c
	cc -c SectionInput.o SectionInput.c ${CFLAGS} ${LX}

EditFunctions.o : EditFunctions.c
	cc -c EditFunctions.o EditFunctions.c ${CFLAGS} ${LX}
 
SectionOutput.o : SectionOutput.c
	cc -c SectionOutput.o SectionOutput.c ${CFLAGS} ${LX}

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

ContourEditor : ContourEditor.c ${OBJECTS}
	cc -o ContourEditor ContourEditor.c ${CFLAGS} ${OBJECTS} ${LIBX} ${LX}

lint :
	lint  -I${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






