xref: /dragonfly/lib/libedit/libedit/Makefile (revision 38b720cd)
1# NETBSD's libedit (BSD replacement for GNU readline)
2.include	"../Makefile.inc"
3
4LIB=		private_edit
5SHLIB_MAJOR=	5
6SHLIBDIR?=	/lib
7PRIVATELIB=
8
9SRCDIR= 	${BASEDIR}/src
10.PATH:		${SRCDIR}
11
12CFLAGS+=	-I${SRCDIR} -I${.CURDIR} -I${.OBJDIR}
13
14DPADD=		${LIBNCURSES}
15LDADD=		-lprivate_ncurses
16LDFLAGS+=	${PRIVATELIB_LDFLAGS}
17
18WARNS?=		2
19
20VERSION_DEF=	${.CURDIR}/Versions.def
21SYMBOL_MAPS=	${.CURDIR}/Symbol.map
22
23SRCS+=		chared.c \
24		common.c \
25		el.c \
26		hist.c \
27		emacs.c \
28		keymacro.c \
29		map.c \
30		chartype.c \
31		parse.c \
32		prompt.c \
33		read.c \
34		refresh.c \
35		search.c \
36		sig.c \
37		terminal.c \
38		tty.c \
39		vi.c \
40		fgetln.c \
41		vis.c \
42		wcsdup.c \
43		tokenizer.c \
44		history.c \
45		filecomplete.c \
46		readline.c \
47		eln.c
48
49# only when 1) !HAVE_STRLCAT  2) !HAVE_STRLCPY  3) !HAVE_VIS
50#SRCS+=		strlcat.c \
51		strlcpy.c \
52		unvis.c
53
54SRCS+=		common.h emacs.h fcns.h help.h vi.h
55SRCS+=  	fcns.c help.c tokenizern.c historyn.c
56
57INCS=		histedit.h
58
59MAN=		editrc.5
60
61CLEANFILES+=	common.h emacs.h fcns.c fcns.h help.c help.h
62CLEANFILES+=	historyn.c tokenizern.c vi.h
63AHDR=		vi.h emacs.h common.h
64ASRC=		${SRCDIR}/vi.c ${SRCDIR}/emacs.c ${SRCDIR}/common.c
65
66vi.h:
67	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/vi.c > ${.TARGET}
68
69emacs.h:
70	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/emacs.c > ${.TARGET}
71
72common.h:
73	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/common.c > ${.TARGET}
74
75fcns.h: ${AHDR}
76	AWK=awk sh ${SRCDIR}/makelist -fh ${AHDR} > ${.TARGET}
77
78help.h:
79	AWK=awk sh ${SRCDIR}/makelist -bh ${ASRC} > ${.TARGET}
80
81fcns.c: ${AHDR}
82	AWK=awk sh ${SRCDIR}/makelist -fc ${AHDR} > ${.TARGET}
83
84help.c: ${ASRC}
85	AWK=awk sh ${SRCDIR}/makelist -bc ${ASRC} > ${.TARGET}
86
87tokenizern.c: tokenizer.c
88	AWK=awk sh ${SRCDIR}/makelist -n ${.ALLSRC} > ${.TARGET}
89
90historyn.c: history.c
91	AWK=awk sh ${SRCDIR}/makelist -n ${.ALLSRC} > ${.TARGET}
92
93.include <bsd.lib.mk>
94