74567f8efe02775657ca285873136c0538d61b66
[dragonfly.git] / lib / libedit / libedit / Makefile
1 # NETBSD's libedit (BSD replacement for GNU readline)
2 .include        "../Makefile.inc"
3
4 LIB=            edit
5 SHLIB_MAJOR=    5               # NetBSD designates SHLIB_MAJOR as 3
6
7 SRCDIR=         ${BASEDIR}/src
8 .PATH:          ${SRCDIR}
9
10 CFLAGS+=        -I${SRCDIR} -I${.CURDIR} -I${.OBJDIR}
11
12 DPADD=          ${LIBNCURSES}
13 LDADD=          -lncurses
14
15 WARNS?=         2
16
17 SRCS+=          chared.c \
18                 common.c \
19                 el.c \
20                 hist.c \
21                 emacs.c \
22                 keymacro.c \
23                 map.c \
24                 chartype.c \
25                 parse.c \
26                 prompt.c \
27                 read.c \
28                 refresh.c \
29                 search.c \
30                 sig.c \
31                 terminal.c \
32                 tty.c \
33                 vi.c \
34                 fgetln.c \
35                 strlcat.c \
36                 strlcpy.c \
37                 unvis.c \
38                 vis.c \
39                 wcsdup.c \
40                 tokenizer.c \
41                 history.c \
42                 filecomplete.c \
43                 readline.c
44
45 SRCS+=          common.h emacs.h fcns.h help.h vi.h
46 SRCS+=          fcns.c help.c
47
48 MAN=            editline.3 editrc.5
49
50 MLINKS=         editline.3 el_init.3 \
51                 editline.3 el_end.3 \
52                 editline.3 el_reset.3 \
53                 editline.3 el_gets.3 \
54                 editline.3 el_getc.3 \
55                 editline.3 el_push.3 \
56                 editline.3 el_parse.3 \
57                 editline.3 el_set.3 \
58                 editline.3 el_get.3 \
59                 editline.3 el_source.3 \
60                 editline.3 el_resize.3 \
61                 editline.3 el_line.3 \
62                 editline.3 el_insertstr.3 \
63                 editline.3 el_deletestr.3 \
64                 editline.3 history_init.3 \
65                 editline.3 history_end.3 \
66                 editline.3 history.3 \
67                 editline.3 tok_init.3 \
68                 editline.3 tok_end.3 \
69                 editline.3 tok_reset.3 \
70                 editline.3 tok_line.3 \
71                 editline.3 tok_str.3
72
73 CLEANFILES+=    common.h emacs.h fcns.c fcns.h help.c help.h vi.h editline.c
74 AHDR=           vi.h emacs.h common.h
75 ASRC=           ${SRCDIR}/vi.c ${SRCDIR}/emacs.c ${SRCDIR}/common.c
76
77 vi.h:
78         AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/vi.c > ${.TARGET}
79
80 emacs.h:
81         AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/emacs.c > ${.TARGET}
82
83 common.h:
84         AWK=awk sh ${SRCDIR}/makelist -h ${SRCDIR}/common.c > ${.TARGET}
85
86 fcns.h: ${AHDR}
87         AWK=awk sh ${SRCDIR}/makelist -fh ${AHDR} > ${.TARGET}
88
89 help.h:
90         AWK=awk sh ${SRCDIR}/makelist -bh ${ASRC} > ${.TARGET}
91
92 fcns.c: ${AHDR}
93         AWK=awk sh ${SRCDIR}/makelist -fc ${AHDR} > ${.TARGET}
94
95 help.c: ${ASRC}
96         AWK=awk sh ${SRCDIR}/makelist -bc ${ASRC} > ${.TARGET}
97
98 .include <bsd.lib.mk>