Bump major numbers in preparation for libc work.
[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.3 2005/04/21 13:42:33 joerg Exp $
4
5 LIB=    edit
6 SHLIB_MAJOR=    4
7
8 OSRCS=  chared.c common.c el.c emacs.c fcns.c help.c hist.c key.c map.c \
9         parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c
10
11 DPADD=  ${LIBNCURSES}
12 LDADD=  -lncurses
13
14 MAN=    editline.3 editrc.5
15
16 MLINKS= editline.3 el_init.3 editline.3 el_end.3 editline.3 el_reset.3 \
17         editline.3 el_gets.3 editline.3 el_getc.3 editline.3 el_push.3 \
18         editline.3 el_parse.3 editline.3 el_set.3 editline.3 el_source.3 \
19         editline.3 el_resize.3 editline.3 el_line.3 \
20         editline.3 el_insertstr.3 editline.3 el_deletestr.3 \
21         editline.3 history_init.3 editline.3 history_end.3 \
22         editline.3 history.3 editline.3 el_data_get.3 editline.3 el_data_set.3
23
24 # For speed and debugging
25 #SRCS=   ${OSRCS} tokenizer.c history.c
26 # For protection
27 SRCS=   editline.c tokenizer.c history.c
28
29 SRCS+=  common.h emacs.h fcns.h help.h vi.h
30
31 CLEANFILES+=common.h editline.c emacs.h fcns.c fcns.h help.c help.h vi.h 
32 CFLAGS+=-I. -I${.CURDIR}
33 CFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
34 CFLAGS+=#-DDEBUG_PASTE
35
36 AHDR=vi.h emacs.h common.h
37 ASRC=${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c
38
39 vi.h: vi.c makelist
40         sh ${.CURDIR}/makelist -h ${.CURDIR}/vi.c > ${.TARGET}
41
42 emacs.h: emacs.c makelist
43         sh ${.CURDIR}/makelist -h ${.CURDIR}/emacs.c > ${.TARGET}
44
45 common.h: common.c makelist
46         sh ${.CURDIR}/makelist -h ${.CURDIR}/common.c > ${.TARGET}
47
48 fcns.h: ${AHDR} makelist
49         sh ${.CURDIR}/makelist -fh ${AHDR} > ${.TARGET}
50
51 fcns.c: ${AHDR} fcns.h makelist
52         sh ${.CURDIR}/makelist -fc ${AHDR} > ${.TARGET}
53
54 help.c: ${ASRC} makelist
55         sh ${.CURDIR}/makelist -bc ${ASRC} > ${.TARGET}
56
57 help.h: ${ASRC} makelist
58         sh ${.CURDIR}/makelist -bh ${ASRC} > ${.TARGET}
59
60 editline.c:
61         sh ${.CURDIR}/makelist -e ${OSRCS} > ${.TARGET}
62
63 beforedepend editline.o editline.po editline.So: \
64         vi.h emacs.h common.h fcns.h fcns.c help.h help.c
65
66 test:   test.o libedit.a ${DPADD} ${LIBTERMCAP}
67         ${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD}
68
69 .include <bsd.lib.mk>