Fix mdoc(7)/man(7) mix up.
[netbsd-mini2440.git] / lib / libedit / Makefile
blob209438e954fb9a10cd23da482bcc95824aae2189
1 # $NetBSD: Makefile,v 1.39 2009/12/30 23:54:52 christos Exp $
2 # @(#)Makefile 8.1 (Berkeley) 6/4/93
4 USE_SHLIBDIR= yes
6 WIDECHAR ?= yes
7 WARNS= 4
8 LIB= edit
10 LIBDPLIBS+= termcap ${.CURDIR}/../libterm
12 OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \
13 hist.c key.c map.c chartype.c \
14 parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c
16 MAN= editline.3 editrc.5
18 MLINKS= editline.3 el_init.3 editline.3 el_end.3 editline.3 el_reset.3 \
19 editline.3 el_gets.3 editline.3 el_getc.3 editline.3 el_push.3 \
20 editline.3 el_parse.3 editline.3 el_set.3 editline.3 el_get.3 \
21 editline.3 el_source.3 editline.3 el_resize.3 editline.3 el_line.3 \
22 editline.3 el_insertstr.3 editline.3 el_deletestr.3 \
23 editline.3 history_init.3 editline.3 history_end.3 \
24 editline.3 history.3 \
25 editline.3 tok_init.3 editline.3 tok_end.3 editline.3 tok_reset.3 \
26 editline.3 tok_line.3 editline.3 tok_str.3
28 # For speed and debugging
29 #SRCS= ${OSRCS} readline.c tokenizer.c history.c
30 # For protection
31 SRCS= editline.c readline.c tokenizer.c history.c
33 .if ${WIDECHAR} == "yes"
34 OSRCS += eln.c
35 SRCS += tokenizern.c historyn.c
36 CLEANFILES+=tokenizern.c.tmp tokenizern.c historyn.c.tmp historyn.c
37 CPPFLAGS+=-DWIDECHAR
38 .endif
40 LIBEDITDIR?=${.CURDIR}
42 INCS= histedit.h
43 INCSDIR=/usr/include
45 CLEANFILES+=editline.c
46 CLEANFILES+=common.h.tmp editline.c.tmp emacs.h.tmp fcns.c.tmp fcns.h.tmp
47 CLEANFILES+=help.c.tmp help.h.tmp vi.h.tmp tc1.o tc1
48 CLEANFILES+=tokenizern.c.tmp tokenizern.c tokenizerw.c.tmp tokenizerw.c
49 CPPFLAGS+=-I. -I${LIBEDITDIR}
50 CPPFLAGS+=-I. -I${.CURDIR}
51 CPPFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
52 CPPFLAGS+=#-DDEBUG_PASTE -DDEBUG_EDIT
54 AHDR=vi.h emacs.h common.h
55 ASRC=${LIBEDITDIR}/vi.c ${LIBEDITDIR}/emacs.c ${LIBEDITDIR}/common.c
57 DPSRCS+= ${AHDR} fcns.h help.h fcns.c help.c
58 CLEANFILES+= ${AHDR} fcns.h help.h fcns.c help.c
60 SUBDIR= readline
62 vi.h: vi.c makelist Makefile
63 ${_MKTARGET_CREATE}
64 ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \
65 > ${.TARGET}.tmp && \
66 mv ${.TARGET}.tmp ${.TARGET}
68 emacs.h: emacs.c makelist Makefile
69 ${_MKTARGET_CREATE}
70 ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/emacs.c \
71 > ${.TARGET}.tmp && \
72 mv ${.TARGET}.tmp ${.TARGET}
74 common.h: common.c makelist Makefile
75 ${_MKTARGET_CREATE}
76 ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/common.c \
77 > ${.TARGET}.tmp && \
78 mv ${.TARGET}.tmp ${.TARGET}
80 fcns.h: ${AHDR} makelist Makefile
81 ${_MKTARGET_CREATE}
82 ${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > ${.TARGET}.tmp && \
83 mv ${.TARGET}.tmp ${.TARGET}
85 fcns.c: ${AHDR} fcns.h help.h makelist Makefile
86 ${_MKTARGET_CREATE}
87 ${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > ${.TARGET}.tmp && \
88 mv ${.TARGET}.tmp ${.TARGET}
90 help.c: ${ASRC} makelist Makefile
91 ${_MKTARGET_CREATE}
92 ${HOST_SH} ${LIBEDITDIR}/makelist -bc ${ASRC} > ${.TARGET}.tmp && \
93 mv ${.TARGET}.tmp ${.TARGET}
95 help.h: ${ASRC} makelist Makefile
96 ${_MKTARGET_CREATE}
97 ${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > ${.TARGET}.tmp && \
98 mv ${.TARGET}.tmp ${.TARGET}
100 editline.c: ${OSRCS} makelist Makefile
101 ${_MKTARGET_CREATE}
102 ${HOST_SH} ${LIBEDITDIR}/makelist -e ${OSRCS:T} > ${.TARGET}.tmp && \
103 mv ${.TARGET}.tmp ${.TARGET}
105 tokenizern.c: makelist Makefile
106 ${_MKTARGET_CREATE}
107 ${HOST_SH} ${LIBEDITDIR}/makelist -n tokenizer.c > ${.TARGET}.tmp && \
108 mv ${.TARGET}.tmp ${.TARGET}
110 historyn.c: makelist Makefile
111 ${_MKTARGET_CREATE}
112 ${HOST_SH} ${LIBEDITDIR}/makelist -n history.c > ${.TARGET}.tmp && \
113 mv ${.TARGET}.tmp ${.TARGET}
115 tc1.o: ${LIBEDITDIR}/TEST/tc1.c
117 tc1: libedit.a tc1.o
118 ${_MKTARGET_LINK}
119 ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermcap
121 .include <bsd.lib.mk>
122 .include <bsd.subdir.mk>