ldivmod, uldivmod: fix qdivrem calls
[minix.git] / lib / libedit / Makefile
blob0880363d11ec7d63f1d1e935a6065586059dd43a
1 # $NetBSD: Makefile,v 1.51 2012/08/10 12:20:10 joerg Exp $
2 # @(#)Makefile 8.1 (Berkeley) 6/4/93
4 USE_SHLIBDIR= yes
6 WIDECHAR ?= yes
7 WARNS?= 5
8 LIB= edit
10 LIBDPLIBS+= terminfo ${.CURDIR}/../libterminfo
12 .include "bsd.own.mk"
14 COPTS+= -Wunused-parameter
15 CWARNFLAGS.gcc+= -Wconversion
17 OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \
18 hist.c keymacro.c map.c chartype.c \
19 parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c
21 MAN= editline.3 editrc.5
23 MLINKS= editline.3 el_init.3 editline.3 el_end.3 editline.3 el_reset.3 \
24 editline.3 el_gets.3 editline.3 el_getc.3 editline.3 el_push.3 \
25 editline.3 el_parse.3 editline.3 el_set.3 editline.3 el_get.3 \
26 editline.3 el_source.3 editline.3 el_resize.3 editline.3 el_line.3 \
27 editline.3 el_insertstr.3 editline.3 el_deletestr.3 \
28 editline.3 history_init.3 editline.3 history_end.3 \
29 editline.3 history.3 \
30 editline.3 tok_init.3 editline.3 tok_end.3 editline.3 tok_reset.3 \
31 editline.3 tok_line.3 editline.3 tok_str.3
33 # For speed and debugging
34 #SRCS= ${OSRCS} readline.c tokenizer.c history.c
35 # For protection
36 SRCS= editline.c readline.c tokenizer.c history.c
38 .if ${WIDECHAR} == "yes"
39 OSRCS += eln.c
40 SRCS += tokenizern.c historyn.c
41 CLEANFILES+=tokenizern.c.tmp tokenizern.c historyn.c.tmp historyn.c
42 CPPFLAGS+=-DWIDECHAR
43 .endif
45 LIBEDITDIR?=${.CURDIR}
47 INCS= histedit.h
48 INCSDIR=/usr/include
50 CLEANFILES+=editline.c
51 CLEANFILES+=common.h.tmp editline.c.tmp emacs.h.tmp fcns.c.tmp fcns.h.tmp
52 CLEANFILES+=help.c.tmp help.h.tmp vi.h.tmp tc1.o tc1
53 CLEANFILES+=tokenizern.c.tmp tokenizern.c tokenizerw.c.tmp tokenizerw.c
54 CPPFLAGS+=-I. -I${LIBEDITDIR}
55 CPPFLAGS+=-I. -I${.CURDIR}
56 CPPFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
57 CPPFLAGS+=#-DDEBUG_PASTE -DDEBUG_EDIT
59 AHDR=vi.h emacs.h common.h
60 ASRC=${LIBEDITDIR}/vi.c ${LIBEDITDIR}/emacs.c ${LIBEDITDIR}/common.c
62 DPSRCS+= ${AHDR} fcns.h help.h fcns.c help.c
63 CLEANFILES+= ${AHDR} fcns.h help.h fcns.c help.c
65 SUBDIR= readline
67 vi.h: vi.c makelist Makefile
68 ${_MKTARGET_CREATE}
69 ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \
70 > ${.TARGET}.tmp && \
71 mv ${.TARGET}.tmp ${.TARGET}
73 emacs.h: emacs.c makelist Makefile
74 ${_MKTARGET_CREATE}
75 ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/emacs.c \
76 > ${.TARGET}.tmp && \
77 mv ${.TARGET}.tmp ${.TARGET}
79 common.h: common.c makelist Makefile
80 ${_MKTARGET_CREATE}
81 ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/common.c \
82 > ${.TARGET}.tmp && \
83 mv ${.TARGET}.tmp ${.TARGET}
85 fcns.h: ${AHDR} makelist Makefile
86 ${_MKTARGET_CREATE}
87 ${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > ${.TARGET}.tmp && \
88 mv ${.TARGET}.tmp ${.TARGET}
90 fcns.c: ${AHDR} fcns.h help.h makelist Makefile
91 ${_MKTARGET_CREATE}
92 ${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > ${.TARGET}.tmp && \
93 mv ${.TARGET}.tmp ${.TARGET}
95 help.c: ${ASRC} makelist Makefile
96 ${_MKTARGET_CREATE}
97 ${HOST_SH} ${LIBEDITDIR}/makelist -bc ${ASRC} > ${.TARGET}.tmp && \
98 mv ${.TARGET}.tmp ${.TARGET}
100 help.h: ${ASRC} makelist Makefile
101 ${_MKTARGET_CREATE}
102 ${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > ${.TARGET}.tmp && \
103 mv ${.TARGET}.tmp ${.TARGET}
105 editline.c: ${OSRCS} makelist Makefile
106 ${_MKTARGET_CREATE}
107 ${HOST_SH} ${LIBEDITDIR}/makelist -e ${OSRCS:T} > ${.TARGET}.tmp && \
108 mv ${.TARGET}.tmp ${.TARGET}
110 tokenizern.c: makelist Makefile
111 ${_MKTARGET_CREATE}
112 ${HOST_SH} ${LIBEDITDIR}/makelist -n tokenizer.c > ${.TARGET}.tmp && \
113 mv ${.TARGET}.tmp ${.TARGET}
115 historyn.c: makelist Makefile
116 ${_MKTARGET_CREATE}
117 ${HOST_SH} ${LIBEDITDIR}/makelist -n history.c > ${.TARGET}.tmp && \
118 mv ${.TARGET}.tmp ${.TARGET}
120 tc1.o: ${LIBEDITDIR}/TEST/tc1.c
122 tc1: libedit.a tc1.o
123 ${_MKTARGET_LINK}
124 ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermlib
126 .include <bsd.lib.mk>
127 .include <bsd.subdir.mk>
129 # XXX
130 .if defined(HAVE_GCC) && ${HAVE_GCC} >= 45
131 COPTS.editline.c+= -Wno-cast-qual
132 COPTS.tokenizer.c+= -Wno-cast-qual
133 COPTS.tokenizern.c+= -Wno-cast-qual
134 .endif