Makefile revision 1.5
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
8
9MAN=	editline.3 editrc.5
10
11MLINKS=	editline.3 el_init.3 editline.3 el_end.3 editline.3 el_reset.3 \
12	editline.3 el_gets.3 editline.3 el_getc.3 editline.3 el_push.3 \
13	editline.3 el_parse.3 editline.3 el_set.3 editline.3 el_source.3 \
14	editline.3 el_resize.3 editline.3 el_line.3 \
15	editline.3 el_insertstr.3 editline.3 el_deletestr.3 \
16	editline.3 history_init.3 editline.3 history_end.3 editline.3 history.3
17
18# For speed and debugging
19#SRCS=   ${OSRCS} tokenizer.c history.c
20# For protection
21SRCS=	editline.c tokenizer.c history.c
22
23CLEANFILES+=common.h emacs.h fcns.h help.h vi.h help.c fcns.c editline.c
24CFLAGS+=-I. -I${.CURDIR} 
25CFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
26CFLAGS+=#-DDEBUG_PASTE
27
28AHDR=vi.h emacs.h common.h 
29ASRC=${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c
30
31vi.h: vi.c makelist
32	sh ${.CURDIR}/makelist -h ${.CURDIR}/vi.c > ${.TARGET}
33
34emacs.h: emacs.c makelist
35	sh ${.CURDIR}/makelist -h ${.CURDIR}/emacs.c > ${.TARGET}
36
37common.h: common.c makelist
38	sh ${.CURDIR}/makelist -h ${.CURDIR}/common.c > ${.TARGET}
39
40fcns.h: ${AHDR} makelist
41	sh ${.CURDIR}/makelist -fh ${AHDR} > ${.TARGET}
42
43fcns.c: ${AHDR} fcns.h makelist
44	sh ${.CURDIR}/makelist -fc ${AHDR} > ${.TARGET}
45
46help.c: ${ASRC} makelist 
47	sh ${.CURDIR}/makelist -bc ${ASRC} > ${.TARGET}
48
49help.h: ${ASRC} makelist
50	sh ${.CURDIR}/makelist -bh ${ASRC} > ${.TARGET}
51
52editline.c: ${OSRCS}
53	sh ${.CURDIR}/makelist -e ${.ALLSRC:T} > ${.TARGET}
54
55.depend: vi.h emacs.h common.h fcns.h help.h help.c
56all: vi.h emacs.h common.h fcns.h help.h help.c
57
58
59test:	libedit.a test.o 
60	${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermcap
61
62includes:
63	-cd ${.CURDIR}; cmp -s histedit.h ${DESTDIR}/usr/include/histedit.h > \
64	    /dev/null 2>&1 || \
65	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 histedit.h \
66	    ${DESTDIR}/usr/include
67
68.include <bsd.lib.mk>
69