1 # $NetBSD: Makefile,v 1.51 2012/08/10 12:20:10 joerg Exp $
2 # @(#)Makefile 8.1 (Berkeley) 6/4/93
10 LIBDPLIBS
+= terminfo
${.CURDIR
}/..
/libterminfo
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
36 SRCS
= editline.c readline.c tokenizer.c history.c
38 .if
${WIDECHAR} == "yes"
40 SRCS
+= tokenizern.c historyn.c
41 CLEANFILES
+=tokenizern.c.tmp tokenizern.c historyn.c.tmp historyn.c
45 LIBEDITDIR?
=${.CURDIR
}
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
67 vi.h
: vi.c makelist Makefile
69 ${HOST_SH} ${LIBEDITDIR}/makelist
-h
${LIBEDITDIR}/vi.c \
71 mv
${.TARGET
}.tmp
${.TARGET
}
73 emacs.h
: emacs.c makelist Makefile
75 ${HOST_SH} ${LIBEDITDIR}/makelist
-h
${LIBEDITDIR}/emacs.c \
77 mv
${.TARGET
}.tmp
${.TARGET
}
79 common.h
: common.c makelist Makefile
81 ${HOST_SH} ${LIBEDITDIR}/makelist
-h
${LIBEDITDIR}/common.c \
83 mv
${.TARGET
}.tmp
${.TARGET
}
85 fcns.h
: ${AHDR} makelist Makefile
87 ${HOST_SH} ${LIBEDITDIR}/makelist
-fh
${AHDR} > ${.TARGET
}.tmp
&& \
88 mv
${.TARGET
}.tmp
${.TARGET
}
90 fcns.c
: ${AHDR} fcns.h help.h makelist Makefile
92 ${HOST_SH} ${LIBEDITDIR}/makelist
-fc ${AHDR} > ${.TARGET
}.tmp
&& \
93 mv
${.TARGET
}.tmp
${.TARGET
}
95 help.c
: ${ASRC} makelist Makefile
97 ${HOST_SH} ${LIBEDITDIR}/makelist
-bc
${ASRC} > ${.TARGET
}.tmp
&& \
98 mv
${.TARGET
}.tmp
${.TARGET
}
100 help.h
: ${ASRC} makelist Makefile
102 ${HOST_SH} ${LIBEDITDIR}/makelist
-bh
${ASRC} > ${.TARGET
}.tmp
&& \
103 mv
${.TARGET
}.tmp
${.TARGET
}
105 editline.c
: ${OSRCS} makelist Makefile
107 ${HOST_SH} ${LIBEDITDIR}/makelist
-e
${OSRCS
:T
} > ${.TARGET
}.tmp
&& \
108 mv
${.TARGET
}.tmp
${.TARGET
}
110 tokenizern.c
: makelist Makefile
112 ${HOST_SH} ${LIBEDITDIR}/makelist
-n tokenizer.c
> ${.TARGET
}.tmp
&& \
113 mv
${.TARGET
}.tmp
${.TARGET
}
115 historyn.c
: makelist Makefile
117 ${HOST_SH} ${LIBEDITDIR}/makelist
-n history.c
> ${.TARGET
}.tmp
&& \
118 mv
${.TARGET
}.tmp
${.TARGET
}
120 tc1.o
: ${LIBEDITDIR}/TEST
/tc1.c
124 ${CC} ${LDFLAGS} ${.ALLSRC
} -o
${.TARGET
} libedit.a
${LDADD} -ltermlib
126 .
include <bsd.lib.mk
>
127 .
include <bsd.subdir.mk
>
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