# Makefile for CALOM Terminal Library (c) 1996 Martin Mares <mj@ericsson.cz>

CURSES=1

OBJS=term.o termattr.o termcap.o termclear.o termgfx.o terminit.o termios.o termkeys.o termmap.o \
termmove.o termrfsh.o termscrl.o termprint.o termblit.o termbell.o vcsa.o
INC=termint.h termcaps.h term.h

ifdef CURSES
CFLAGS+=-DUSE_CURSES
endif
CFLAGS += -I.. -I.

all: libterm.a

libterm.a: $(OBJS)
	rm -f libterm.a
	ar rcs libterm.a $(OBJS)

term.o: term.c $(INC)
termattr.o: termattr.c $(INC)
termcap.o: termcap.c $(INC)
termclear.o: termclear.c $(INC)
termgfx.o: termgfx.c $(INC)
terminit.o: terminit.c $(INC)
termios.o: termios.c $(INC)
termkeys.o: termkeys.c $(INC)
termmap.o: termmap.c $(INC)
termmove.o: termmove.c $(INC)
termrfsh.o: termrfsh.c $(INC)
termscrl.o: termscrl.c $(INC)
termprint.o: termprint.c $(INC)
termblit.o: termblit.c $(INC)
termbell.o: termbell.c $(INC)
vcsa.o: vcsa.c $(INC)

clean:
	rm -f *.o *.a *~ \#*\# TAGS

tags:
	etags *.[chs]
