xref: /dragonfly/lib/libedit/libedit/Makefile (revision 5868d2b9)
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_wgets.3 \
55		editline.3 el_getc.3 \
56		editline.3 el_wgetc.3 \
57		editline.3 el_push.3 \
58		editline.3 el_wpush.3 \
59		editline.3 el_parse.3 \
60		editline.3 el_wparse.3 \
61		editline.3 el_set.3 \
62		editline.3 el_wset.3 \
63		editline.3 el_get.3 \
64		editline.3 el_wget.3 \
65		editline.3 el_source.3 \
66		editline.3 el_resize.3 \
67		editline.3 el_line.3 \
68		editline.3 el_wline.3 \
69		editline.3 el_insertstr.3 \
70		editline.3 el_winsertstr.3 \
71		editline.3 el_deletestr.3 \
72		editline.3 el_wdeletestr.3 \
73		editline.3 history_init.3 \
74		editline.3 history_winit.3 \
75		editline.3 history_end.3 \
76		editline.3 history_wend.3 \
77		editline.3 history.3 \
78		editline.3 history_w.3 \
79		editline.3 tok_init.3 \
80		editline.3 tok_winit.3 \
81		editline.3 tok_end.3 \
82		editline.3 tok_wend.3 \
83		editline.3 tok_reset.3 \
84		editline.3 tok_wreset.3 \
85		editline.3 tok_line.3 \
86		editline.3 tok_wline.3 \
87		editline.3 tok_str.3 \
88		editline.3 tok_wstr.3
89
90CLEANFILES+=	common.h emacs.h fcns.c fcns.h help.c help.h vi.h editline.c
91AHDR=		vi.h emacs.h common.h
92ASRC=		${SRCDIR}/vi.c ${SRCDIR}/emacs.c ${SRCDIR}/common.c
93
94vi.h:
95	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/vi.c > ${.TARGET}
96
97emacs.h:
98	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/emacs.c > ${.TARGET}
99
100common.h:
101	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/common.c > ${.TARGET}
102
103fcns.h: ${AHDR}
104	AWK=awk sh ${SRCDIR}/makelist -fh ${AHDR} > ${.TARGET}
105
106help.h:
107	AWK=awk sh ${SRCDIR}/makelist -bh ${ASRC} > ${.TARGET}
108
109fcns.c: ${AHDR}
110	AWK=awk sh ${SRCDIR}/makelist -fc ${AHDR} > ${.TARGET}
111
112help.c: ${ASRC}
113	AWK=awk sh ${SRCDIR}/makelist -bc ${ASRC} > ${.TARGET}
114
115.include <bsd.lib.mk>
116