xref: /dragonfly/lib/libedit/libedit/Makefile (revision ef3ac1d1)
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
6SHLIBDIR?=	/lib
7
8SRCDIR= 	${BASEDIR}/src
9.PATH:		${SRCDIR}
10
11CFLAGS+=	-I${SRCDIR} -I${.CURDIR} -I${.OBJDIR}
12
13DPADD=		${LIBNCURSES}
14LDADD=		-lncurses
15
16WARNS?=		2
17
18.if defined(RELEASE36)
19SHLIB_MAJOR=	6
20VERSION_DEF=	${.CURDIR}/Versions.def
21SYMBOL_MAPS=	${.CURDIR}/Symbol.map
22.endif
23
24SRCS+=		chared.c \
25		common.c \
26		el.c \
27		hist.c \
28		emacs.c \
29		keymacro.c \
30		map.c \
31		chartype.c \
32		parse.c \
33		prompt.c \
34		read.c \
35		refresh.c \
36		search.c \
37		sig.c \
38		terminal.c \
39		tty.c \
40		vi.c \
41		fgetln.c \
42		strlcat.c \
43		strlcpy.c \
44		unvis.c \
45		vis.c \
46		wcsdup.c \
47		tokenizer.c \
48		history.c \
49		filecomplete.c \
50		readline.c \
51		eln.c
52
53SRCS+=		common.h emacs.h fcns.h help.h vi.h
54SRCS+=  	fcns.c help.c tokenizern.c historyn.c
55
56MAN=		editline.3 editrc.5
57
58MLINKS= 	editline.3 el_init.3 \
59		editline.3 el_end.3 \
60		editline.3 el_reset.3 \
61		editline.3 el_gets.3 \
62		editline.3 el_getc.3 \
63		editline.3 el_push.3 \
64		editline.3 el_parse.3 \
65		editline.3 el_set.3 \
66		editline.3 el_get.3 \
67		editline.3 el_source.3 \
68		editline.3 el_resize.3 \
69		editline.3 el_line.3 \
70		editline.3 el_insertstr.3 \
71		editline.3 el_deletestr.3 \
72		editline.3 history_init.3 \
73		editline.3 history_end.3 \
74		editline.3 history.3 \
75		editline.3 tok_init.3 \
76		editline.3 tok_end.3 \
77		editline.3 tok_reset.3 \
78		editline.3 tok_line.3 \
79		editline.3 tok_str.3
80
81MLINKS+=	editline.3 el_wgets.3 \
82		editline.3 el_wgetc.3 \
83		editline.3 el_wpush.3 \
84		editline.3 el_wparse.3 \
85		editline.3 el_wset.3 \
86		editline.3 el_wget.3 \
87		editline.3 el_wline.3 \
88		editline.3 el_winsertstr.3 \
89		editline.3 el_wdeletestr.3 \
90		editline.3 history_winit.3 \
91		editline.3 history_wend.3 \
92		editline.3 history_w.3 \
93		editline.3 tok_winit.3 \
94		editline.3 tok_wend.3 \
95		editline.3 tok_wreset.3 \
96		editline.3 tok_wline.3 \
97		editline.3 tok_wstr.3
98
99CLEANFILES+=	common.h emacs.h fcns.c fcns.h help.c help.h vi.h editline.c
100AHDR=		vi.h emacs.h common.h
101ASRC=		${SRCDIR}/vi.c ${SRCDIR}/emacs.c ${SRCDIR}/common.c
102
103vi.h:
104	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/vi.c > ${.TARGET}
105
106emacs.h:
107	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/emacs.c > ${.TARGET}
108
109common.h:
110	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/common.c > ${.TARGET}
111
112fcns.h: ${AHDR}
113	AWK=awk sh ${SRCDIR}/makelist -fh ${AHDR} > ${.TARGET}
114
115help.h:
116	AWK=awk sh ${SRCDIR}/makelist -bh ${ASRC} > ${.TARGET}
117
118fcns.c: ${AHDR}
119	AWK=awk sh ${SRCDIR}/makelist -fc ${AHDR} > ${.TARGET}
120
121help.c: ${ASRC}
122	AWK=awk sh ${SRCDIR}/makelist -bc ${ASRC} > ${.TARGET}
123
124tokenizern.c: tokenizer.c
125	AWK=awk sh ${SRCDIR}/makelist -n ${.ALLSRC} > ${.TARGET}
126
127historyn.c: history.c
128	AWK=awk sh ${SRCDIR}/makelist -n ${.ALLSRC} > ${.TARGET}
129
130.include <bsd.lib.mk>
131