CC = CC
CCDEBUG =
I = /usr/include/CC
OOPSLIBDIR = ../src
OOPSINCDIR = ../src
OOPSLIB = ${OOPSLIBDIR}/liboops.a
CFLAGS = -I${OOPSINCDIR} ${CCDEBUG}
LFLAGS = ${CCDEBUG} ${OOPSLIB}

PROGS = teldir1 teldir2 teldir3 teldir4
CLASSES = Record.o TelDict.o

.SUFFIXES: .s
.c:
	${CC} ${CFLAGS} $< -o $* ${LFLAGS}
.c.o:
	${CC} ${CFLAGS} -c $<
.c.s:
	${CC} ${CFLAGS} +i -S $<

all:${CLASSES} ${PROGS}

teldir1: teldir1.o ${OOPSLIB}
	${CC} $@.o -o $@ ${LFLAGS}

teldir2: teldir2.o ${OOPSLIB}
	${CC} $@.o -o $@ ${LFLAGS}

teldir3: teldir3.o TelDict.o ${OOPSLIB}
	${CC} $@.o TelDict.o -o $@ ${LFLAGS}

teldir4: teldir4.o Record.o ${OOPSLIB}
	${CC} $@.o Record.o -o $@ ${LFLAGS}

install:

clean:
	-rm *.o ${PROGS} *..c *..s

Record.o: Record.h ${OOPSINCDIR}/oopsIO.h ${OOPSINCDIR}/Object.h ${OOPSINCDIR}/String.h
Record.o: ${I}/stdio.h ${I}/stream.h
Record.o: ${I}/errors.h ${I}/string.h
Record.o: ${I}/malloc.h ${I}/osfcn.h
TelDict.o: TelDict.h ${OOPSINCDIR}/LookupKey.h ${OOPSINCDIR}/SortedCltn.h ${OOPSINCDIR}/Dictionary.h
TelDict.o: ${OOPSINCDIR}/Set.h ${OOPSINCDIR}/Object.h ${I}/stdio.h
TelDict.o: ${I}/stream.h ${I}/errors.h ${OOPSINCDIR}/Collection.h
TelDict.o: ${OOPSINCDIR}/ArrayOb.h ${I}/malloc.h ${OOPSINCDIR}/Iterator.h
TelDict.o: ${OOPSINCDIR}/OrderedCltn.h ${OOPSINCDIR}/SeqCltn.h
teldir1.o: ${OOPSINCDIR}/Dictionary.h ${OOPSINCDIR}/String.h ${OOPSINCDIR}/Set.h ${OOPSINCDIR}/Collection.h
teldir1.o: ${OOPSINCDIR}/ArrayOb.h ${I}/malloc.h ${OOPSINCDIR}/Object.h
teldir1.o: ${OOPSINCDIR}/Iterator.h ${I}/stdio.h ${I}/stream.h
teldir1.o: ${I}/errors.h ${I}/string.h
teldir2.o: ${OOPSINCDIR}/Dictionary.h ${OOPSINCDIR}/String.h ${I}/osfcn.h
teldir2.o: ${I}/fcntl.h ${OOPSINCDIR}/Set.h ${OOPSINCDIR}/Collection.h
teldir2.o: ${OOPSINCDIR}/ArrayOb.h ${I}/malloc.h ${OOPSINCDIR}/Object.h
teldir2.o: ${OOPSINCDIR}/Iterator.h ${I}/stdio.h ${I}/stream.h
teldir2.o: ${I}/errors.h ${I}/string.h
teldir3.o: ${OOPSINCDIR}/Dictionary.h ${OOPSINCDIR}/LookupKey.h ${OOPSINCDIR}/String.h TelDict.h
teldir3.o: ${I}/osfcn.h ${I}/fcntl.h ${OOPSINCDIR}/Set.h
teldir3.o: ${OOPSINCDIR}/Object.h ${I}/stdio.h ${I}/stream.h
teldir3.o: ${I}/errors.h ${OOPSINCDIR}/Collection.h ${OOPSINCDIR}/ArrayOb.h
teldir3.o: ${I}/malloc.h ${OOPSINCDIR}/Iterator.h ${I}/string.h
teldir4.o: ${OOPSINCDIR}/Dictionary.h ${OOPSINCDIR}/LookupKey.h ${OOPSINCDIR}/String.h Record.h
teldir4.o: ${OOPSINCDIR}/SortedCltn.h ${I}/osfcn.h ${I}/fcntl.h
teldir4.o: ${OOPSINCDIR}/Object.h ${OOPSINCDIR}/Set.h ${I}/stdio.h
teldir4.o: ${I}/stream.h ${I}/errors.h ${OOPSINCDIR}/Collection.h
teldir4.o: ${OOPSINCDIR}/ArrayOb.h ${I}/malloc.h ${OOPSINCDIR}/Iterator.h
teldir4.o: ${OOPSINCDIR}/OrderedCltn.h ${OOPSINCDIR}/SeqCltn.h ${I}/string.h
