1 # $NetBSD: Makefile,v 1.53 2015/01/29 20:30:02 joerg Exp $
2 # @(#)Makefile 8.1 (Berkeley) 6/4/93
10 LIBDPLIBS
+= terminfo
${.CURDIR
}/..
/libterminfo
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
37 SRCS
= editline.c readline.c tokenizer.c history.c
39 .if
${WIDECHAR} == "yes"
41 SRCS
+= tokenizern.c historyn.c
42 CLEANFILES
+=tokenizern.c.tmp tokenizern.c historyn.c.tmp historyn.c
46 LIBEDITDIR?
=${.CURDIR
}
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
68 vi.h
: vi.c makelist Makefile
70 ${HOST_SH} ${LIBEDITDIR}/makelist
-h
${LIBEDITDIR}/vi.c \
72 mv
${.TARGET
}.tmp
${.TARGET
}
74 emacs.h
: emacs.c makelist Makefile
76 ${HOST_SH} ${LIBEDITDIR}/makelist
-h
${LIBEDITDIR}/emacs.c \
78 mv
${.TARGET
}.tmp
${.TARGET
}
80 common.h
: common.c makelist Makefile
82 ${HOST_SH} ${LIBEDITDIR}/makelist
-h
${LIBEDITDIR}/common.c \
84 mv
${.TARGET
}.tmp
${.TARGET
}
86 fcns.h
: ${AHDR} makelist Makefile
88 ${HOST_SH} ${LIBEDITDIR}/makelist
-fh
${AHDR} > ${.TARGET
}.tmp
&& \
89 mv
${.TARGET
}.tmp
${.TARGET
}
91 fcns.c
: ${AHDR} fcns.h help.h makelist Makefile
93 ${HOST_SH} ${LIBEDITDIR}/makelist
-fc ${AHDR} > ${.TARGET
}.tmp
&& \
94 mv
${.TARGET
}.tmp
${.TARGET
}
96 help.c
: ${ASRC} makelist Makefile
98 ${HOST_SH} ${LIBEDITDIR}/makelist
-bc
${ASRC} > ${.TARGET
}.tmp
&& \
99 mv
${.TARGET
}.tmp
${.TARGET
}
101 help.h
: ${ASRC} makelist Makefile
103 ${HOST_SH} ${LIBEDITDIR}/makelist
-bh
${ASRC} > ${.TARGET
}.tmp
&& \
104 mv
${.TARGET
}.tmp
${.TARGET
}
106 editline.c
: ${OSRCS} makelist Makefile
108 ${HOST_SH} ${LIBEDITDIR}/makelist
-e
${OSRCS
:T
} > ${.TARGET
}.tmp
&& \
109 mv
${.TARGET
}.tmp
${.TARGET
}
111 tokenizern.c
: makelist Makefile
113 ${HOST_SH} ${LIBEDITDIR}/makelist
-n tokenizer.c
> ${.TARGET
}.tmp
&& \
114 mv
${.TARGET
}.tmp
${.TARGET
}
116 historyn.c
: makelist Makefile
118 ${HOST_SH} ${LIBEDITDIR}/makelist
-n history.c
> ${.TARGET
}.tmp
&& \
119 mv
${.TARGET
}.tmp
${.TARGET
}
121 tc1.o
: ${LIBEDITDIR}/TEST
/tc1.c
125 ${CC} ${LDFLAGS} ${.ALLSRC
} -o
${.TARGET
} libedit.a
${LDADD} -ltermlib
127 .
include <bsd.lib.mk
>
128 .
include <bsd.subdir.mk
>
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