xref: /dragonfly/lib/libedit/libedit/Makefile (revision b0041c55)
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
21# DO NOT ENABLE
22.if 0
23VERSION_DEF=	${.CURDIR}/Versions.def
24SYMBOL_MAPS=	${.CURDIR}/Symbol.map
25.endif
26
27SRCS+=		chared.c \
28		common.c \
29		el.c \
30		hist.c \
31		emacs.c \
32		keymacro.c \
33		map.c \
34		chartype.c \
35		parse.c \
36		prompt.c \
37		read.c \
38		refresh.c \
39		search.c \
40		sig.c \
41		terminal.c \
42		tty.c \
43		vi.c \
44		tokenizer.c \
45		history.c \
46		filecomplete.c \
47		readline.c \
48		literal.c \
49		eln.c
50
51SRCS+=		tokenizern.c historyn.c
52
53SRCS+=		common.h emacs.h fcns.h func.h help.h vi.h
54
55INCS=		histedit.h
56INCSDIR=	${INCLUDEDIR}/priv
57
58MAN=		editrc.5
59
60CLEANFILES+=	common.h emacs.h fcns.h func.h help.h vi.h
61AHDR=		vi.h emacs.h common.h
62ASRC=		${SRCDIR}/vi.c ${SRCDIR}/emacs.c ${SRCDIR}/common.c
63
64vi.h:
65	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/vi.c > ${.TARGET}
66
67emacs.h:
68	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/emacs.c > ${.TARGET}
69
70common.h:
71	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/common.c > ${.TARGET}
72
73fcns.h: ${AHDR}
74	AWK=awk sh ${SRCDIR}/makelist -fh ${AHDR} > ${.TARGET}
75
76func.h: ${AHDR}
77	AWK=awk sh ${SRCDIR}/makelist -fc ${AHDR} > ${.TARGET}
78
79help.h:
80	AWK=awk sh ${SRCDIR}/makelist -bh ${ASRC} > ${.TARGET}
81
82.include <bsd.lib.mk>
83