xref: /dragonfly/lib/libedit/libedit/Makefile (revision 44753b81)
1# NETBSD's libedit (BSD replacement for GNU readline)
2.include	"../Makefile.inc"
3
4LIB=		private_edit
5SHLIB_MAJOR=	5
6SHLIBDIR?=	/lib/priv
7LIBDIR?=	/usr/lib/priv
8PROFLIBDIR?=	/usr/lib/priv/profile
9
10SRCDIR= 	${BASEDIR}/src
11.PATH:		${SRCDIR}
12
13CFLAGS+=	-I${SRCDIR} -I${.CURDIR} -I${.OBJDIR}
14
15DPADD=		${LIBNCURSES}
16LDADD=		-lprivate_ncurses
17LDFLAGS+=	-rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
18
19WARNS?=		2
20
21VERSION_DEF=	${.CURDIR}/Versions.def
22SYMBOL_MAPS=	${.CURDIR}/Symbol.map
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
56INCS=		histedit.h
57
58MAN=		editrc.5
59
60CLEANFILES+=	common.h emacs.h fcns.c fcns.h help.c help.h
61CLEANFILES+=	historyn.c tokenizern.c vi.h
62AHDR=		vi.h emacs.h common.h
63ASRC=		${SRCDIR}/vi.c ${SRCDIR}/emacs.c ${SRCDIR}/common.c
64
65vi.h:
66	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/vi.c > ${.TARGET}
67
68emacs.h:
69	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/emacs.c > ${.TARGET}
70
71common.h:
72	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/common.c > ${.TARGET}
73
74fcns.h: ${AHDR}
75	AWK=awk sh ${SRCDIR}/makelist -fh ${AHDR} > ${.TARGET}
76
77help.h:
78	AWK=awk sh ${SRCDIR}/makelist -bh ${ASRC} > ${.TARGET}
79
80fcns.c: ${AHDR}
81	AWK=awk sh ${SRCDIR}/makelist -fc ${AHDR} > ${.TARGET}
82
83help.c: ${ASRC}
84	AWK=awk sh ${SRCDIR}/makelist -bc ${ASRC} > ${.TARGET}
85
86tokenizern.c: tokenizer.c
87	AWK=awk sh ${SRCDIR}/makelist -n ${.ALLSRC} > ${.TARGET}
88
89historyn.c: history.c
90	AWK=awk sh ${SRCDIR}/makelist -n ${.ALLSRC} > ${.TARGET}
91
92.include <bsd.lib.mk>
93