1 # $OpenBSD: Makefile,v 1.29 2017/07/10 21:30:37 espie Exp $
2 # $NetBSD: Makefile,v 1.41 2010/02/03 15:34:43 roy Exp $
3 # @(#)Makefile 8.1 (Berkeley) 6/4/93
7 SRCS
= chared.c chartype.c common.c el.c eln.c emacs.c filecomplete.c \
8 hist.c history.c historyn.c keymacro.c map.c \
9 parse.c prompt.c read.c readline.c refresh.c search.c sig.c \
10 terminal.c tokenizer.c tokenizern.c tty.c vi.c
12 MAN
= editline
.3 editrc
.5 editline
.7
14 LIBEDITDIR?
=${.CURDIR
}
16 INCS
= ${.CURDIR
}/histedit.h
17 SHLIB_LDADD
+= -M
${.CURDIR
}/mapfile
-lncurses
19 CLEANFILES
+=common.h.tmp emacs.h.tmp fcns.h.tmp func.h.tmp
20 CLEANFILES
+=help.h.tmp vi.h.tmp tc1.o tc1 .depend
23 CPPFLAGS
+=-I.
-I
${LIBEDITDIR}
24 CPPFLAGS
+=-I.
-I
${.CURDIR
}
25 #CPPFLAGS+=-DDEBUG_TTY -DDEBUG_KEY -DDEBUG -DDEBUG_REFRESH
26 #CPPFLAGS+=-DDEBUG_PASTE -DDEBUG_EDIT
28 AHDR
=vi.h emacs.h common.h
29 ASRC
=${LIBEDITDIR}/vi.c
${LIBEDITDIR}/emacs.c
${LIBEDITDIR}/common.c
31 GENERATED
= ${AHDR} fcns.h func.h help.h
32 CLEANFILES
+= ${GENERATED}
38 generated
: ${GENERATED}
39 BUILDFIRST
= ${GENERATED}
42 ${HOST_SH} ${LIBEDITDIR}/makelist
-h
${LIBEDITDIR}/vi.c \
44 mv
${.TARGET
}.tmp
${.TARGET
}
46 emacs.h
: emacs.c makelist
47 ${HOST_SH} ${LIBEDITDIR}/makelist
-h
${LIBEDITDIR}/emacs.c \
49 mv
${.TARGET
}.tmp
${.TARGET
}
51 common.h
: common.c makelist
52 ${HOST_SH} ${LIBEDITDIR}/makelist
-h
${LIBEDITDIR}/common.c \
54 mv
${.TARGET
}.tmp
${.TARGET
}
56 fcns.h
: ${AHDR} makelist
57 ${HOST_SH} ${LIBEDITDIR}/makelist
-fh
${AHDR} > ${.TARGET
}.tmp
&& \
58 mv
${.TARGET
}.tmp
${.TARGET
}
60 func.h
: ${AHDR} makelist
61 ${HOST_SH} ${LIBEDITDIR}/makelist
-dh
${AHDR} > ${.TARGET
}.tmp
&& \
62 mv
${.TARGET
}.tmp
${.TARGET
}
64 help.h
: ${ASRC} makelist
65 ${HOST_SH} ${LIBEDITDIR}/makelist
-bh
${ASRC} > ${.TARGET
}.tmp
&& \
66 mv
${.TARGET
}.tmp
${.TARGET
}
68 tc1.o
: ${LIBEDITDIR}/TEST
/tc1.c
71 ${CC} ${LDFLAGS} ${.ALLSRC
} -o
${.TARGET
} libedit.a
${LDADD} -lcurses
74 -cd
${.CURDIR
}; cmp
-s histedit.h
${DESTDIR}/usr
/include/histedit.h
> \
76 ${INSTALL} ${INSTALL_COPY} -o
${BINOWN} -g
${BINGRP} -m
444 histedit.h \
77 ${DESTDIR}/usr
/include