xref: /dragonfly/lib/libedit/libedit/Makefile (revision 32efd857)
1# NETBSD's libedit (BSD replacement for GNU readline)
2.include	"../Makefile.inc"
3
4LIB=		private_edit
5SHLIB_MAJOR=	6
6SHLIBDIR?=	/lib
7PRIVATELIB=	shpub
8
9SRCDIR= 	${BASEDIR}/src
10.PATH:		${SRCDIR}
11
12CFLAGS+=	-I${SRCDIR} -I${.CURDIR} -I${.OBJDIR}
13
14CFLAGS+=	-I${_SHLIBDIRPREFIX}/usr/include/priv/ncurses
15DPADD=		${LIBNCURSES}
16LDADD=		-lprivate_ncurses
17LDFLAGS+=	${PRIVATELIB_LDFLAGS}
18
19WARNS?=		2
20
21SRCS+=		chared.c \
22		common.c \
23		el.c \
24		hist.c \
25		emacs.c \
26		keymacro.c \
27		map.c \
28		chartype.c \
29		parse.c \
30		prompt.c \
31		read.c \
32		refresh.c \
33		search.c \
34		sig.c \
35		terminal.c \
36		tty.c \
37		vi.c \
38		tokenizer.c \
39		history.c \
40		filecomplete.c \
41		readline.c \
42		literal.c \
43		eln.c
44
45SRCS+=		tokenizern.c historyn.c
46
47SRCS+=		common.h emacs.h fcns.h func.h help.h vi.h
48
49INCS=		histedit.h
50INCSDIR=	${INCLUDEDIR}/priv
51
52MAN=		editrc.5
53
54CLEANFILES+=	common.h emacs.h fcns.h func.h help.h vi.h
55AHDR=		vi.h emacs.h common.h
56ASRC=		${SRCDIR}/vi.c ${SRCDIR}/emacs.c ${SRCDIR}/common.c
57
58vi.h:
59	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/vi.c > ${.TARGET}
60
61emacs.h:
62	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/emacs.c > ${.TARGET}
63
64common.h:
65	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/common.c > ${.TARGET}
66
67fcns.h: ${AHDR}
68	AWK=awk sh ${SRCDIR}/makelist -fh ${AHDR} > ${.TARGET}
69
70func.h: ${AHDR}
71	AWK=awk sh ${SRCDIR}/makelist -fc ${AHDR} > ${.TARGET}
72
73help.h:
74	AWK=awk sh ${SRCDIR}/makelist -bh ${ASRC} > ${.TARGET}
75
76.include <bsd.lib.mk>
77