xref: /dragonfly/lib/libedit/libedit/Makefile (revision 65cc0652)
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		fgetln.c \
42		vis.c \
43		wcsdup.c \
44		tokenizer.c \
45		history.c \
46		filecomplete.c \
47		readline.c \
48		eln.c
49
50# only when 1) !HAVE_STRLCAT  2) !HAVE_STRLCPY  3) !HAVE_VIS
51#SRCS+=		strlcat.c \
52		strlcpy.c \
53		unvis.c
54
55SRCS+=		common.h emacs.h fcns.h help.h vi.h
56SRCS+=  	fcns.c help.c tokenizern.c historyn.c
57
58INCS=		histedit.h
59
60MAN=		editrc.5
61
62CLEANFILES+=	common.h emacs.h fcns.c fcns.h help.c help.h
63CLEANFILES+=	historyn.c tokenizern.c vi.h
64AHDR=		vi.h emacs.h common.h
65ASRC=		${SRCDIR}/vi.c ${SRCDIR}/emacs.c ${SRCDIR}/common.c
66
67vi.h:
68	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/vi.c > ${.TARGET}
69
70emacs.h:
71	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/emacs.c > ${.TARGET}
72
73common.h:
74	AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/common.c > ${.TARGET}
75
76fcns.h: ${AHDR}
77	AWK=awk sh ${SRCDIR}/makelist -fh ${AHDR} > ${.TARGET}
78
79help.h:
80	AWK=awk sh ${SRCDIR}/makelist -bh ${ASRC} > ${.TARGET}
81
82fcns.c: ${AHDR}
83	AWK=awk sh ${SRCDIR}/makelist -fc ${AHDR} > ${.TARGET}
84
85help.c: ${ASRC}
86	AWK=awk sh ${SRCDIR}/makelist -bc ${ASRC} > ${.TARGET}
87
88tokenizern.c: tokenizer.c
89	AWK=awk sh ${SRCDIR}/makelist -n ${.ALLSRC} > ${.TARGET}
90
91historyn.c: history.c
92	AWK=awk sh ${SRCDIR}/makelist -n ${.ALLSRC} > ${.TARGET}
93
94.include <bsd.lib.mk>
95