Makefile revision 4257
1#	@(#)Makefile	8.1 (Berkeley) 6/4/93
2
3LIB=	edit
4
5OSRCS=	chared.c common.c el.c emacs.c hist.c key.c map.c parse.c \
6	prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c \
7	help.c fcns.c help.h
8
9LDADD+= -ltermcap
10
11# For speed and debugging
12#SRCS=   ${OSRCS} tokenizer.c history.c
13# For protection
14SRCS=	editline.c tokenizer.c history.c
15
16CLEANFILES+=common.h emacs.h fcns.h help.h vi.h help.c fcns.c editline.c
17CFLAGS+=-I. -I${.CURDIR} 
18CFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
19CFLAGS+=#-DDEBUG_PASTE
20
21AHDR=vi.h emacs.h common.h 
22ASRC=${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c
23
24vi.h: vi.c makelist
25	sh ${.CURDIR}/makelist -h ${.CURDIR}/vi.c > ${.TARGET}
26
27emacs.h: emacs.c makelist
28	sh ${.CURDIR}/makelist -h ${.CURDIR}/emacs.c > ${.TARGET}
29
30common.h: common.c makelist
31	sh ${.CURDIR}/makelist -h ${.CURDIR}/common.c > ${.TARGET}
32
33fcns.h: ${AHDR} makelist
34	sh ${.CURDIR}/makelist -fh ${AHDR} > ${.TARGET}
35
36fcns.c: ${AHDR} fcns.h makelist
37	sh ${.CURDIR}/makelist -fc ${AHDR} > ${.TARGET}
38
39help.c: ${ASRC} makelist 
40	sh ${.CURDIR}/makelist -bc ${ASRC} > ${.TARGET}
41
42help.h: ${ASRC} makelist
43	sh ${.CURDIR}/makelist -bh ${ASRC} > ${.TARGET}
44
45editline.c: ${OSRCS}
46	sh ${.CURDIR}/makelist -e ${.ALLSRC:T} > ${.TARGET}
47
48.depend: vi.h emacs.h common.h fcns.h help.h help.c
49
50
51test:	test.o libedit.a ${DPADD} ${LIBTERMCAP}
52	${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermcap
53
54.include <bsd.lib.mk>
55