Merge commit '1276d1e1a1b128f7093a3021d3f6bc27afa80d23' into amd64
[dragonfly.git] / lib / libedit / Makefile
1 # @(#)Makefile  8.1 (Berkeley) 6/4/93
2 # $FreeBSD: src/lib/libedit/Makefile,v 1.18.2.2 2002/07/23 10:20:19 ru Exp $
3 # $DragonFly: src/lib/libedit/Makefile,v 1.6 2008/06/27 08:06:48 corecode Exp $
4
5 LIB=    edit
6 SHLIB_MAJOR=    5
7
8 OSRCS=  chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c hist.c \
9         key.c map.c parse.c prompt.c read.c refresh.c search.c sig.c term.c \
10         tty.c vi.c
11
12 DPADD=  ${LIBNCURSES}
13 LDADD=  -lncurses
14
15 WARNS?= 1
16
17 MAN=    editline.3 editrc.5
18
19 MLINKS= editline.3 el_init.3 editline.3 el_end.3 editline.3 el_reset.3 \
20         editline.3 el_gets.3 editline.3 el_getc.3 editline.3 el_push.3 \
21         editline.3 el_parse.3 editline.3 el_set.3 editline.3 el_get.3 \
22         editline.3 el_source.3 editline.3 el_resize.3 editline.3 el_line.3 \
23         editline.3 el_insertstr.3 editline.3 el_deletestr.3 \
24         editline.3 history_init.3 editline.3 history_end.3 \
25         editline.3 history.3 \
26         editline.3 tok_init.3 editline.3 tok_end.3 editline.3 tok_reset.3 \
27         editline.3 tok_line.3 editline.3 tok_str.3
28
29 # For speed and debugging
30 #SRCS=   ${OSRCS} tokenizer.c history.c
31 # For protection
32 SRCS=   editline.c tokenizer.c history.c readline.c
33
34 SRCS+=  common.h emacs.h fcns.h help.h vi.h
35
36 CLEANFILES+=common.h editline.c emacs.h fcns.c fcns.h help.c help.h vi.h 
37 CFLAGS+=-I. -I${.CURDIR}
38 CFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
39 CFLAGS+=#-DDEBUG_PASTE
40
41 AHDR=vi.h emacs.h common.h
42 ASRC=${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c
43
44 SUBDIR= readline
45
46 vi.h: vi.c makelist
47         sh ${.CURDIR}/makelist -h ${.CURDIR}/vi.c > ${.TARGET}
48
49 emacs.h: emacs.c makelist
50         sh ${.CURDIR}/makelist -h ${.CURDIR}/emacs.c > ${.TARGET}
51
52 common.h: common.c makelist
53         sh ${.CURDIR}/makelist -h ${.CURDIR}/common.c > ${.TARGET}
54
55 fcns.h: ${AHDR} makelist
56         sh ${.CURDIR}/makelist -fh ${AHDR} > ${.TARGET}
57
58 fcns.c: ${AHDR} fcns.h help.h makelist
59         sh ${.CURDIR}/makelist -fc ${AHDR} > ${.TARGET}
60
61 help.c: ${ASRC} makelist
62         sh ${.CURDIR}/makelist -bc ${ASRC} > ${.TARGET}
63
64 help.h: ${ASRC} makelist
65         sh ${.CURDIR}/makelist -bh ${ASRC} > ${.TARGET}
66
67 editline.c: ${OSRCS} makelist
68         sh ${.CURDIR}/makelist -e ${OSRCS} > ${.TARGET}
69
70 beforedepend editline.o editline.po editline.So: \
71         vi.h emacs.h common.h fcns.h fcns.c help.h help.c
72
73 # Not up to date
74 #test.o:        ${.CURDIR}/TEST/test.c
75 #
76 #test:  test.o libedit.a ${DPADD} ${LIBTERMCAP}
77 #       ${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD}
78
79 .include <bsd.lib.mk>