1 1.61 wiz # $NetBSD: Makefile,v 1.61 2016/05/02 14:12:09 wiz Exp $ 2 1.1 cgd # @(#)Makefile 8.1 (Berkeley) 6/4/93 3 1.1 cgd 4 1.23 lukem USE_SHLIBDIR= yes 5 1.23 lukem 6 1.50 matt WARNS?= 5 7 1.1 cgd LIB= edit 8 1.1 cgd 9 1.41 roy LIBDPLIBS+= terminfo ${.CURDIR}/../libterminfo 10 1.47 tron 11 1.47 tron .include "bsd.own.mk" 12 1.47 tron 13 1.47 tron COPTS+= -Wunused-parameter 14 1.48 joerg CWARNFLAGS.gcc+= -Wconversion 15 1.53 joerg CWARNFLAGS.clang+= -Wno-cast-qual 16 1.32 christos 17 1.58 christos OSRCS= chared.c common.c el.c eln.c emacs.c filecomplete.c \ 18 1.44 christos hist.c keymacro.c map.c chartype.c \ 19 1.43 christos parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c 20 1.1 cgd 21 1.59 christos MAN= editline.3 editrc.5 editline.7 22 1.5 lukem 23 1.61 wiz MLINKS= \ 24 1.60 christos editline.3 el_deletestr.3 \ 25 1.60 christos editline.3 el_end.3 \ 26 1.60 christos editline.3 el_get.3 \ 27 1.60 christos editline.3 el_getc.3 \ 28 1.60 christos editline.3 el_gets.3 \ 29 1.60 christos editline.3 el_init.3 \ 30 1.60 christos editline.3 el_init_fd.3 \ 31 1.60 christos editline.3 el_insertstr.3 \ 32 1.60 christos editline.3 el_line.3 \ 33 1.60 christos editline.3 el_parse.3 \ 34 1.60 christos editline.3 el_push.3 \ 35 1.60 christos editline.3 el_reset.3 \ 36 1.60 christos editline.3 el_resize.3 \ 37 1.60 christos editline.3 el_set.3 \ 38 1.60 christos editline.3 el_source.3 \ 39 1.60 christos editline.3 history.3 \ 40 1.60 christos editline.3 history_end.3 \ 41 1.60 christos editline.3 history_init.3 \ 42 1.60 christos editline.3 tok_end.3 \ 43 1.60 christos editline.3 tok_init.3 \ 44 1.60 christos editline.3 tok_line.3 \ 45 1.60 christos editline.3 tok_reset.3 \ 46 1.60 christos editline.3 tok_str.3 47 1.60 christos 48 1.60 christos MLINKS+= \ 49 1.60 christos editline.3 el_wdeletestr.3 \ 50 1.60 christos editline.3 el_wget.3 \ 51 1.60 christos editline.3 el_wgetc.3 \ 52 1.60 christos editline.3 el_wgets.3 \ 53 1.60 christos editline.3 el_winsertstr.3 \ 54 1.60 christos editline.3 el_wline.3 \ 55 1.60 christos editline.3 el_wparse.3 \ 56 1.60 christos editline.3 el_wpush.3 \ 57 1.60 christos editline.3 el_wset.3 \ 58 1.60 christos editline.3 history_w.3 \ 59 1.60 christos editline.3 history_wend.3 \ 60 1.60 christos editline.3 history_winit.3 \ 61 1.60 christos editline.3 tok_wend.3 \ 62 1.60 christos editline.3 tok_winit.3 \ 63 1.60 christos editline.3 tok_wline.3 \ 64 1.60 christos editline.3 tok_wreset.3 \ 65 1.60 christos editline.3 tok_wstr.3 66 1.5 lukem 67 1.1 cgd # For speed and debugging 68 1.58 christos #SRCS= ${OSRCS} 69 1.1 cgd # For protection 70 1.58 christos SRCS= editline.c 71 1.38 christos 72 1.58 christos SRCS += history.c historyn.c tokenizer.c tokenizern.c readline.c 73 1.1 cgd 74 1.18 christos LIBEDITDIR?=${.CURDIR} 75 1.18 christos 76 1.20 jdolecek INCS= histedit.h 77 1.7 christos INCSDIR=/usr/include 78 1.7 christos 79 1.58 christos CLEANFILES+=common.h.tmp emacs.h.tmp fcns.h.tmp func.h.tmp 80 1.58 christos CLEANFILES+=help.h.tmp vi.h.tmp tc1.o tc1 .depend 81 1.58 christos 82 1.54 christos CPPFLAGS+=-I. -I${LIBEDITDIR} 83 1.17 simonb CPPFLAGS+=-I. -I${.CURDIR} 84 1.56 christos #CPPFLAGS+=-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH 85 1.56 christos #CPPFLAGS+=-DDEBUG_PASTE -DDEBUG_EDIT 86 1.1 cgd 87 1.54 christos AHDR=vi.h emacs.h common.h 88 1.18 christos ASRC=${LIBEDITDIR}/vi.c ${LIBEDITDIR}/emacs.c ${LIBEDITDIR}/common.c 89 1.1 cgd 90 1.58 christos DPSRCS+= ${AHDR} fcns.h func.h help.h 91 1.58 christos CLEANFILES+= ${AHDR} fcns.h func.h help.h 92 1.27 lukem 93 1.20 jdolecek SUBDIR= readline 94 1.20 jdolecek 95 1.58 christos .depend: ${AHDR} fcns.h func.h help.h 96 1.58 christos 97 1.31 dsl vi.h: vi.c makelist Makefile 98 1.33 lukem ${_MKTARGET_CREATE} 99 1.25 christos ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \ 100 1.25 christos > ${.TARGET}.tmp && \ 101 1.19 mrg mv ${.TARGET}.tmp ${.TARGET} 102 1.1 cgd 103 1.31 dsl emacs.h: emacs.c makelist Makefile 104 1.33 lukem ${_MKTARGET_CREATE} 105 1.25 christos ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/emacs.c \ 106 1.25 christos > ${.TARGET}.tmp && \ 107 1.19 mrg mv ${.TARGET}.tmp ${.TARGET} 108 1.1 cgd 109 1.31 dsl common.h: common.c makelist Makefile 110 1.33 lukem ${_MKTARGET_CREATE} 111 1.25 christos ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/common.c \ 112 1.25 christos > ${.TARGET}.tmp && \ 113 1.19 mrg mv ${.TARGET}.tmp ${.TARGET} 114 1.1 cgd 115 1.31 dsl fcns.h: ${AHDR} makelist Makefile 116 1.33 lukem ${_MKTARGET_CREATE} 117 1.25 christos ${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > ${.TARGET}.tmp && \ 118 1.19 mrg mv ${.TARGET}.tmp ${.TARGET} 119 1.1 cgd 120 1.58 christos func.h: ${AHDR} makelist Makefile 121 1.33 lukem ${_MKTARGET_CREATE} 122 1.25 christos ${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > ${.TARGET}.tmp && \ 123 1.19 mrg mv ${.TARGET}.tmp ${.TARGET} 124 1.1 cgd 125 1.31 dsl help.h: ${ASRC} makelist Makefile 126 1.33 lukem ${_MKTARGET_CREATE} 127 1.25 christos ${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > ${.TARGET}.tmp && \ 128 1.19 mrg mv ${.TARGET}.tmp ${.TARGET} 129 1.1 cgd 130 1.35 rpaulo tc1.o: ${LIBEDITDIR}/TEST/tc1.c 131 1.42 mrg 132 1.54 christos tc1: libedit.a tc1.o 133 1.33 lukem ${_MKTARGET_LINK} 134 1.41 roy ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermlib 135 1.16 itohy 136 1.27 lukem .include <bsd.lib.mk> 137 1.27 lukem .include <bsd.subdir.mk> 138 1.42 mrg 139 1.42 mrg # XXX 140 1.52 mrg .if defined(HAVE_GCC) 141 1.42 mrg COPTS.editline.c+= -Wno-cast-qual 142 1.42 mrg COPTS.tokenizer.c+= -Wno-cast-qual 143 1.42 mrg COPTS.tokenizern.c+= -Wno-cast-qual 144 1.42 mrg .endif 145