Remove building with NOCRYPTO option
[minix3.git] / lib / libedit / Makefile
blob12811bdbfe85c90f18783e697c5e672fb993628f
1 # $NetBSD: Makefile,v 1.53 2015/01/29 20:30:02 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
16 CWARNFLAGS.clang+= -Wno-cast-qual
18 OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \
19 hist.c keymacro.c map.c chartype.c \
20 parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c
22 MAN= editline.3 editrc.5
24 MLINKS= editline.3 el_init.3 editline.3 el_end.3 editline.3 el_reset.3 \
25 editline.3 el_gets.3 editline.3 el_getc.3 editline.3 el_push.3 \
26 editline.3 el_parse.3 editline.3 el_set.3 editline.3 el_get.3 \
27 editline.3 el_source.3 editline.3 el_resize.3 editline.3 el_line.3 \
28 editline.3 el_insertstr.3 editline.3 el_deletestr.3 \
29 editline.3 history_init.3 editline.3 history_end.3 \
30 editline.3 history.3 \
31 editline.3 tok_init.3 editline.3 tok_end.3 editline.3 tok_reset.3 \
32 editline.3 tok_line.3 editline.3 tok_str.3
34 # For speed and debugging
35 #SRCS= ${OSRCS} readline.c tokenizer.c history.c
36 # For protection
37 SRCS= editline.c readline.c tokenizer.c history.c
39 .if ${WIDECHAR} == "yes"
40 OSRCS += eln.c
41 SRCS += tokenizern.c historyn.c
42 CLEANFILES+=tokenizern.c.tmp tokenizern.c historyn.c.tmp historyn.c
43 CPPFLAGS+=-DWIDECHAR
44 .endif
46 LIBEDITDIR?=${.CURDIR}
48 INCS= histedit.h
49 INCSDIR=/usr/include
51 CLEANFILES+=editline.c
52 CLEANFILES+=common.h.tmp editline.c.tmp emacs.h.tmp fcns.c.tmp fcns.h.tmp
53 CLEANFILES+=help.c.tmp help.h.tmp vi.h.tmp tc1.o tc1
54 CLEANFILES+=tokenizern.c.tmp tokenizern.c tokenizerw.c.tmp tokenizerw.c
55 CPPFLAGS+=-I. -I${LIBEDITDIR}
56 CPPFLAGS+=-I. -I${.CURDIR}
57 CPPFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
58 CPPFLAGS+=#-DDEBUG_PASTE -DDEBUG_EDIT
60 AHDR=vi.h emacs.h common.h
61 ASRC=${LIBEDITDIR}/vi.c ${LIBEDITDIR}/emacs.c ${LIBEDITDIR}/common.c
63 DPSRCS+= ${AHDR} fcns.h help.h fcns.c help.c
64 CLEANFILES+= ${AHDR} fcns.h help.h fcns.c help.c
66 SUBDIR= readline
68 vi.h: vi.c makelist Makefile
69 ${_MKTARGET_CREATE}
70 ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \
71 > ${.TARGET}.tmp && \
72 mv ${.TARGET}.tmp ${.TARGET}
74 emacs.h: emacs.c makelist Makefile
75 ${_MKTARGET_CREATE}
76 ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/emacs.c \
77 > ${.TARGET}.tmp && \
78 mv ${.TARGET}.tmp ${.TARGET}
80 common.h: common.c makelist Makefile
81 ${_MKTARGET_CREATE}
82 ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/common.c \
83 > ${.TARGET}.tmp && \
84 mv ${.TARGET}.tmp ${.TARGET}
86 fcns.h: ${AHDR} makelist Makefile
87 ${_MKTARGET_CREATE}
88 ${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > ${.TARGET}.tmp && \
89 mv ${.TARGET}.tmp ${.TARGET}
91 fcns.c: ${AHDR} fcns.h help.h makelist Makefile
92 ${_MKTARGET_CREATE}
93 ${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > ${.TARGET}.tmp && \
94 mv ${.TARGET}.tmp ${.TARGET}
96 help.c: ${ASRC} makelist Makefile
97 ${_MKTARGET_CREATE}
98 ${HOST_SH} ${LIBEDITDIR}/makelist -bc ${ASRC} > ${.TARGET}.tmp && \
99 mv ${.TARGET}.tmp ${.TARGET}
101 help.h: ${ASRC} makelist Makefile
102 ${_MKTARGET_CREATE}
103 ${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > ${.TARGET}.tmp && \
104 mv ${.TARGET}.tmp ${.TARGET}
106 editline.c: ${OSRCS} makelist Makefile
107 ${_MKTARGET_CREATE}
108 ${HOST_SH} ${LIBEDITDIR}/makelist -e ${OSRCS:T} > ${.TARGET}.tmp && \
109 mv ${.TARGET}.tmp ${.TARGET}
111 tokenizern.c: makelist Makefile
112 ${_MKTARGET_CREATE}
113 ${HOST_SH} ${LIBEDITDIR}/makelist -n tokenizer.c > ${.TARGET}.tmp && \
114 mv ${.TARGET}.tmp ${.TARGET}
116 historyn.c: makelist Makefile
117 ${_MKTARGET_CREATE}
118 ${HOST_SH} ${LIBEDITDIR}/makelist -n history.c > ${.TARGET}.tmp && \
119 mv ${.TARGET}.tmp ${.TARGET}
121 tc1.o: ${LIBEDITDIR}/TEST/tc1.c
123 tc1: libedit.a tc1.o
124 ${_MKTARGET_LINK}
125 ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermlib
127 .include <bsd.lib.mk>
128 .include <bsd.subdir.mk>
130 # XXX
131 .if defined(HAVE_GCC)
132 COPTS.editline.c+= -Wno-cast-qual
133 COPTS.tokenizer.c+= -Wno-cast-qual
134 COPTS.tokenizern.c+= -Wno-cast-qual
135 .endif