#
# InterViews Text library
#

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

CC = CC
CFLAGS = -I${SRC} -I../../include

.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: ${SRC}/text.c
	${CC} -c ${CFLAGS} ${SRC}/text.c

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

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

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

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

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

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

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

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

shell.o: ${SRC}/shell.c
	${CC} -c ${CFLAGS} ${SRC}/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
