xref: /dragonfly/lib/libedit/libedit/Makefile (revision 9f47dde1)
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}
13CFLAGS+=	-I${_SHLIBDIRPREFIX}/usr/include/priv/ncurses
14
15DPADD=		${LIBNCURSES}
16LDADD=		-lprivate_ncurses
17LDFLAGS+=	${PRIVATELIB_LDFLAGS}
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		tokenizer.c \
42		history.c \
43		filecomplete.c \
44		readline.c \
45		eln.c
46
47SRCS+=		common.h emacs.h fcns.h help.h vi.h
48SRCS+=		fcns.c help.c tokenizern.c historyn.c
49
50INCS=		histedit.h
51
52MAN=		editrc.5
53
54CLEANFILES+=	common.h emacs.h fcns.c fcns.h help.c help.h
55CLEANFILES+=	historyn.c tokenizern.c vi.h
56AHDR=		vi.h emacs.h common.h
57ASRC=		${SRCDIR}/vi.c ${SRCDIR}/emacs.c ${SRCDIR}/common.c
58
59vi.h:
60	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/vi.c > ${.TARGET}
61
62emacs.h:
63	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/emacs.c > ${.TARGET}
64
65common.h:
66	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/common.c > ${.TARGET}
67
68fcns.h: ${AHDR}
69	AWK=awk sh ${SRCDIR}/makelist -fh ${AHDR} > ${.TARGET}
70
71help.h:
72	AWK=awk sh ${SRCDIR}/makelist -bh ${ASRC} > ${.TARGET}
73
74fcns.c: ${AHDR}
75	AWK=awk sh ${SRCDIR}/makelist -fc ${AHDR} > ${.TARGET}
76
77help.c: ${ASRC}
78	AWK=awk sh ${SRCDIR}/makelist -bc ${ASRC} > ${.TARGET}
79
80tokenizern.c: tokenizer.c
81	AWK=awk sh ${SRCDIR}/makelist -n ${.ALLSRC} > ${.TARGET}
82
83historyn.c: history.c
84	AWK=awk sh ${SRCDIR}/makelist -n ${.ALLSRC} > ${.TARGET}
85
86.include <bsd.lib.mk>
87