#
# InterViews Text library
#

LIB = libtext.a
DEST = ../../../lib/MACHINE/${LIB}

CC = CC
CFLAGS = -I..

.c.o:
	${CC} -c ${CFLAGS} $*.c

OBJS = \
    text.o layout.o textblock.o \
    textviewer.o stringedit.o \
    textpainter.o \
    textbuffer.o terminal.o emulator.o shell.o

${LIB}: ${OBJS}
	@rm -f ${LIB}
	@echo "building ${LIB}"
	@ar cr ${LIB} ${OBJS}
	ranlib ${LIB}

install: ${LIB}
	install -c ${LIB} ${DEST}
	ranlib ${DEST}

text.o: ../text.c
	${CC} -c ${CFLAGS} ../text.c

layout.o: ../layout.c
	${CC} -c ${CFLAGS} ../layout.c

textblock.o: ../textblock.c
	${CC} -c ${CFLAGS} ../textblock.c

textviewer.o: ../textviewer.c
	${CC} -c ${CFLAGS} ../textviewer.c

stringedit.o: ../stringedit.c
	${CC} -c ${CFLAGS} ../stringedit.c

textpainter.o: ../textpainter.c
	${CC} -c ${CFLAGS} ../textpainter.c

textbuffer.o: ../textbuffer.c
	${CC} -c ${CFLAGS} ../textbuffer.c

terminal.o: ../terminal.c
	${CC} -c ${CFLAGS} ../terminal.c

emulator.o: ../emulator.c
	${CC} -c ${CFLAGS} ../emulator.c

shell.o: ../shell.c
	${CC} -c ${CFLAGS} ../shell.c

clean:
	rm -f ${LIB} ${OBJS} a.out core make.out

depend:
	mkdepend ${CFLAGS} -I/usr/include/CC ${OBJS}
# DO NOT DELETE THIS LINE -- make depend uses it
# DEPENDENCIES MUST END AT END OF FILE

# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above
