]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libedit/Makefile
Merge llvm-project release/17.x llvmorg-17.0.1-25-g098e653a5bed
[FreeBSD/FreeBSD.git] / lib / libedit / Makefile
1 #       $NetBSD: Makefile,v 1.56 2016/03/02 19:24:20 christos Exp $
2
3 PACKAGE=clibs
4
5 EDITDIR=        ${SRCTOP}/contrib/libedit
6 .PATH: ${EDITDIR}
7
8 SHLIB_MAJOR=    8
9 SHLIBDIR?= /lib
10
11 WARNS?= 3
12 LIB=    edit
13
14 LIBADD= tinfow
15
16 SRCS=   chared.c chartype.c common.c el.c eln.c emacs.c filecomplete.c \
17         hist.c history.c historyn.c keymacro.c literal.c map.c \
18         parse.c prompt.c read.c readline.c refresh.c search.c sig.c \
19         terminal.c tokenizer.c tokenizern.c tty.c vi.c
20
21
22 MAN=    editline.3 editrc.5 editline.7
23
24 MLINKS= \
25         editline.3 el_deletestr.3 \
26         editline.3 el_end.3 \
27         editline.3 el_get.3 \
28         editline.3 el_getc.3 \
29         editline.3 el_gets.3 \
30         editline.3 el_init.3 \
31         editline.3 el_init_fd.3 \
32         editline.3 el_insertstr.3 \
33         editline.3 el_line.3 \
34         editline.3 el_parse.3 \
35         editline.3 el_push.3 \
36         editline.3 el_reset.3 \
37         editline.3 el_resize.3 \
38         editline.3 el_set.3 \
39         editline.3 el_source.3 \
40         editline.3 history.3 \
41         editline.3 history_end.3 \
42         editline.3 history_init.3 \
43         editline.3 tok_end.3 \
44         editline.3 tok_init.3 \
45         editline.3 tok_line.3 \
46         editline.3 tok_reset.3 \
47         editline.3 tok_str.3 \
48         editline.3 el_wdeletestr.3 \
49         editline.3 el_wget.3 \
50         editline.3 el_wgetc.3 \
51         editline.3 el_wgets.3 \
52         editline.3 el_winsertstr.3 \
53         editline.3 el_wline.3 \
54         editline.3 el_wparse.3 \
55         editline.3 el_wpush.3 \
56         editline.3 el_wset.3 \
57         editline.3 history_w.3 \
58         editline.3 history_wend.3 \
59         editline.3 history_winit.3 \
60         editline.3 tok_wend.3 \
61         editline.3 tok_winit.3 \
62         editline.3 tok_wline.3 \
63         editline.3 tok_wreset.3 \
64         editline.3 tok_wstr.3
65
66 INCS=   histedit.h filecomplete.h
67
68 SRCS+=  common.h emacs.h fcns.h func.h help.h vi.h
69 CLEANFILES+= common.h emacs.h fcns.h func.h help.h vi.h
70
71 CFLAGS+= -I. -I${EDITDIR} -I${EDITDIR}/readline
72
73 AHDR=   vi.h emacs.h common.h
74 ASRC=   ${EDITDIR}/vi.c ${EDITDIR}/emacs.c ${EDITDIR}/common.c
75
76 SUBDIR= readline
77
78 .for hdr in vi emacs common
79 ${hdr}.h: ${hdr}.c makelist
80         sh ${EDITDIR}/makelist -h ${EDITDIR}/${hdr}.c > ${.TARGET}
81 .endfor
82
83 fcns.h: ${AHDR} makelist
84         sh ${EDITDIR}/makelist -fh ${AHDR} > ${.TARGET}
85
86 func.h: ${AHDR} makelist
87         sh ${EDITDIR}/makelist -fc ${AHDR} > ${.TARGET}
88
89 help.h: ${ASRC} makelist
90         sh ${EDITDIR}/makelist -bh ${ASRC} > ${.TARGET}
91
92 tc1.o: ${EDITDIR}/TEST/tc1.c
93
94 test: tc1.o libedit.a ${DPADD} ${LIBTERMCAP}
95         ${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD}
96
97 .include <bsd.lib.mk>
98
99 CWARNFLAGS.chartype.c=  ${NO_WUSE_AFTER_FREE}