xref: /original-bsd/lib/libedit/Makefile (revision 329c05f6)
1#	@(#)Makefile	8.1 (Berkeley) 06/04/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
9# For speed and debugging
10#SRCS=   ${OSRCS} tokenizer.c history.c
11# For protection
12SRCS=	editline.c tokenizer.c history.c
13
14CLEANFILES+=common.h emacs.h fcns.h help.h vi.h help.c fcns.c editline.c
15CFLAGS+=-I. -I${.CURDIR}
16CFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
17CFLAGS+=#-DDEBUG_PASTE
18
19AHDR=vi.h emacs.h common.h
20ASRC=${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c
21
22vi.h: vi.c makelist
23	sh ${.CURDIR}/makelist -h ${.CURDIR}/vi.c > ${.TARGET}
24
25emacs.h: emacs.c makelist
26	sh ${.CURDIR}/makelist -h ${.CURDIR}/emacs.c > ${.TARGET}
27
28common.h: common.c makelist
29	sh ${.CURDIR}/makelist -h ${.CURDIR}/common.c > ${.TARGET}
30
31fcns.h: ${AHDR} makelist
32	sh ${.CURDIR}/makelist -fh ${AHDR} > ${.TARGET}
33
34fcns.c: ${AHDR} fcns.h makelist
35	sh ${.CURDIR}/makelist -fc ${AHDR} > ${.TARGET}
36
37help.c: ${ASRC} makelist
38	sh ${.CURDIR}/makelist -bc ${ASRC} > ${.TARGET}
39
40help.h: ${ASRC} makelist
41	sh ${.CURDIR}/makelist -bh ${ASRC} > ${.TARGET}
42
43editline.c: ${OSRCS}
44	sh ${.CURDIR}/makelist -e ${.ALLSRC:T} > ${.TARGET}
45
46.depend: vi.h emacs.h common.h fcns.h help.h help.c
47
48
49test:	libedit.a test.o
50	${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermcap
51
52beforeinstall:
53	-cd ${.CURDIR}; cmp -s histedit.h ${DESTDIR}/usr/include/histedit.h > \
54	    /dev/null 2>&1 || \
55	    install -c -o ${BINOWN} -g ${BINGRP} -m 444 histedit.h \
56	    ${DESTDIR}/usr/include
57
58.include <bsd.lib.mk>
59