xref: /dragonfly/lib/libedit/libedit/Makefile (revision e8c03636)
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		eln.c
45
46SRCS+=		common.h emacs.h fcns.h help.h vi.h
47SRCS+=  	fcns.c help.c tokenizern.c historyn.c
48
49MAN=		editline.3 editrc.5
50
51MLINKS= 	editline.3 el_init.3 \
52		editline.3 el_end.3 \
53		editline.3 el_reset.3 \
54		editline.3 el_gets.3 \
55		editline.3 el_getc.3 \
56		editline.3 el_push.3 \
57		editline.3 el_parse.3 \
58		editline.3 el_set.3 \
59		editline.3 el_get.3 \
60		editline.3 el_source.3 \
61		editline.3 el_resize.3 \
62		editline.3 el_line.3 \
63		editline.3 el_insertstr.3 \
64		editline.3 el_deletestr.3 \
65		editline.3 history_init.3 \
66		editline.3 history_end.3 \
67		editline.3 history.3 \
68		editline.3 tok_init.3 \
69		editline.3 tok_end.3 \
70		editline.3 tok_reset.3 \
71		editline.3 tok_line.3 \
72		editline.3 tok_str.3
73
74MLINKS+=	editline.3 el_wgets.3 \
75		editline.3 el_wgetc.3 \
76		editline.3 el_wpush.3 \
77		editline.3 el_wparse.3 \
78		editline.3 el_wset.3 \
79		editline.3 el_wget.3 \
80		editline.3 el_wline.3 \
81		editline.3 el_winsertstr.3 \
82		editline.3 el_wdeletestr.3 \
83		editline.3 history_winit.3 \
84		editline.3 history_wend.3 \
85		editline.3 history_w.3 \
86		editline.3 tok_winit.3 \
87		editline.3 tok_wend.3 \
88		editline.3 tok_wreset.3 \
89		editline.3 tok_wline.3 \
90		editline.3 tok_wstr.3
91
92CLEANFILES+=	common.h emacs.h fcns.c fcns.h help.c help.h vi.h editline.c
93AHDR=		vi.h emacs.h common.h
94ASRC=		${SRCDIR}/vi.c ${SRCDIR}/emacs.c ${SRCDIR}/common.c
95
96vi.h:
97	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/vi.c > ${.TARGET}
98
99emacs.h:
100	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/emacs.c > ${.TARGET}
101
102common.h:
103	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/common.c > ${.TARGET}
104
105fcns.h: ${AHDR}
106	AWK=awk sh ${SRCDIR}/makelist -fh ${AHDR} > ${.TARGET}
107
108help.h:
109	AWK=awk sh ${SRCDIR}/makelist -bh ${ASRC} > ${.TARGET}
110
111fcns.c: ${AHDR}
112	AWK=awk sh ${SRCDIR}/makelist -fc ${AHDR} > ${.TARGET}
113
114help.c: ${ASRC}
115	AWK=awk sh ${SRCDIR}/makelist -bc ${ASRC} > ${.TARGET}
116
117tokenizern.c: tokenizer.c
118	AWK=awk sh ${SRCDIR}/makelist -n ${.ALLSRC} > ${.TARGET}
119
120historyn.c: history.c
121	AWK=awk sh ${SRCDIR}/makelist -n ${.ALLSRC} > ${.TARGET}
122
123.include <bsd.lib.mk>
124