xref: /dragonfly/lib/libedit/libedit/Makefile (revision 4d0c54c1)
1# NETBSD's libedit (BSD replacement for GNU readline)
2.include	"../Makefile.inc"
3
4LIB=		edit
5SHLIB_MAJOR=	5  		# NetBSD designates SHLIB_MAJOR as 3
6
7SRCDIR= 	${BASEDIR}/src
8.PATH:		${SRCDIR}
9
10CFLAGS+=	-I${SRCDIR} -I${.CURDIR} -I${.OBJDIR}
11
12DPADD=		${LIBNCURSES}
13LDADD=		-lncurses
14
15WARNS?=		2
16
17SRCS+=		chared.c \
18		common.c \
19		el.c \
20		hist.c \
21		emacs.c \
22		keymacro.c \
23		map.c \
24		chartype.c \
25		parse.c \
26		prompt.c \
27		read.c \
28		refresh.c \
29		search.c \
30		sig.c \
31		terminal.c \
32		tty.c \
33		vi.c \
34		fgetln.c \
35		strlcat.c \
36		strlcpy.c \
37		unvis.c \
38		vis.c \
39		wcsdup.c \
40		tokenizer.c \
41		history.c \
42		filecomplete.c \
43		readline.c
44
45SRCS+=		common.h emacs.h fcns.h help.h vi.h
46SRCS+=  	fcns.c help.c
47
48MAN=		editline.3 editrc.5
49
50MLINKS= 	editline.3 el_init.3 \
51		editline.3 el_end.3 \
52		editline.3 el_reset.3 \
53		editline.3 el_gets.3 \
54		editline.3 el_getc.3 \
55		editline.3 el_push.3 \
56		editline.3 el_parse.3 \
57		editline.3 el_set.3 \
58		editline.3 el_get.3 \
59		editline.3 el_source.3 \
60		editline.3 el_resize.3 \
61		editline.3 el_line.3 \
62		editline.3 el_insertstr.3 \
63		editline.3 el_deletestr.3 \
64		editline.3 history_init.3 \
65		editline.3 history_end.3 \
66		editline.3 history.3 \
67		editline.3 tok_init.3 \
68		editline.3 tok_end.3 \
69		editline.3 tok_reset.3 \
70		editline.3 tok_line.3 \
71		editline.3 tok_str.3
72
73CLEANFILES+=	common.h emacs.h fcns.c fcns.h help.c help.h vi.h editline.c
74AHDR=		vi.h emacs.h common.h
75ASRC=		${SRCDIR}/vi.c ${SRCDIR}/emacs.c ${SRCDIR}/common.c
76
77vi.h:
78	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/vi.c > ${.TARGET}
79
80emacs.h:
81	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/emacs.c > ${.TARGET}
82
83common.h:
84	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/common.c > ${.TARGET}
85
86fcns.h: ${AHDR}
87	AWK=awk sh ${SRCDIR}/makelist -fh ${AHDR} > ${.TARGET}
88
89help.h:
90	AWK=awk sh ${SRCDIR}/makelist -bh ${ASRC} > ${.TARGET}
91
92fcns.c: ${AHDR}
93	AWK=awk sh ${SRCDIR}/makelist -fc ${AHDR} > ${.TARGET}
94
95help.c: ${ASRC}
96	AWK=awk sh ${SRCDIR}/makelist -bc ${ASRC} > ${.TARGET}
97
98.include <bsd.lib.mk>
99