Makefile revision 1.7
1#	$NetBSD: Makefile,v 1.7 1997/03/24 22:11:53 christos Exp $
2#	@(#)Makefile	8.1 (Berkeley) 6/4/93
3
4LIB=	edit
5
6OSRCS=	chared.c common.c el.c emacs.c hist.c key.c map.c parse.c \
7	prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c \
8	help.c fcns.c
9
10MAN=	editline.3 editrc.5
11
12MLINKS=	editline.3 el_init.3 editline.3 el_end.3 editline.3 el_reset.3 \
13	editline.3 el_gets.3 editline.3 el_getc.3 editline.3 el_push.3 \
14	editline.3 el_parse.3 editline.3 el_set.3 editline.3 el_source.3 \
15	editline.3 el_resize.3 editline.3 el_line.3 \
16	editline.3 el_insertstr.3 editline.3 el_deletestr.3 \
17	editline.3 history_init.3 editline.3 history_end.3 editline.3 history.3
18
19# For speed and debugging
20#SRCS=   ${OSRCS} tokenizer.c history.c
21# For protection
22SRCS=	editline.c tokenizer.c history.c
23
24INCS= histedit.h
25INCSDIR=/usr/include
26
27CLEANFILES+=common.h emacs.h fcns.h help.h vi.h help.c fcns.c editline.c
28CFLAGS+=-I. -I${.CURDIR} 
29CFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
30CFLAGS+=#-DDEBUG_PASTE
31
32AHDR=vi.h emacs.h common.h 
33ASRC=${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c
34
35vi.h: vi.c makelist
36	sh ${.CURDIR}/makelist -h ${.CURDIR}/vi.c > ${.TARGET}
37
38emacs.h: emacs.c makelist
39	sh ${.CURDIR}/makelist -h ${.CURDIR}/emacs.c > ${.TARGET}
40
41common.h: common.c makelist
42	sh ${.CURDIR}/makelist -h ${.CURDIR}/common.c > ${.TARGET}
43
44fcns.h: ${AHDR} makelist
45	sh ${.CURDIR}/makelist -fh ${AHDR} > ${.TARGET}
46
47fcns.c: ${AHDR} fcns.h makelist
48	sh ${.CURDIR}/makelist -fc ${AHDR} > ${.TARGET}
49
50help.c: ${ASRC} makelist 
51	sh ${.CURDIR}/makelist -bc ${ASRC} > ${.TARGET}
52
53help.h: ${ASRC} makelist
54	sh ${.CURDIR}/makelist -bh ${ASRC} > ${.TARGET}
55
56editline.c: ${OSRCS}
57	sh ${.CURDIR}/makelist -e ${.ALLSRC:T} > ${.TARGET}
58
59.depend: vi.h emacs.h common.h fcns.h help.h help.c
60all: vi.h emacs.h common.h fcns.h help.h help.c
61
62
63test:	libedit.a test.o 
64	${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermcap
65
66.include <bsd.lib.mk>
67