1 # $NetBSD: Makefile,v 1.6 1997/01/11 06:47:47 lukem Exp $ 2 # @(#)Makefile 8.1 (Berkeley) 6/4/93 3 4 LIB= edit 5 6 OSRCS= chared.c common.c el.c emacs.c hist.c key.c map.c parse.c \ 7 prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c \ 8 help.c fcns.c 9 10 MAN= editline.3 editrc.5 11 12 MLINKS= editline.3 el_init.3 editline.3 el_end.3 editline.3 el_reset.3 \ 13 editline.3 el_gets.3 editline.3 el_getc.3 editline.3 el_push.3 \ 14 editline.3 el_parse.3 editline.3 el_set.3 editline.3 el_source.3 \ 15 editline.3 el_resize.3 editline.3 el_line.3 \ 16 editline.3 el_insertstr.3 editline.3 el_deletestr.3 \ 17 editline.3 history_init.3 editline.3 history_end.3 editline.3 history.3 18 19 # For speed and debugging 20 #SRCS= ${OSRCS} tokenizer.c history.c 21 # For protection 22 SRCS= editline.c tokenizer.c history.c 23 24 CLEANFILES+=common.h emacs.h fcns.h help.h vi.h help.c fcns.c editline.c 25 CFLAGS+=-I. -I${.CURDIR} 26 CFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH 27 CFLAGS+=#-DDEBUG_PASTE 28 29 AHDR=vi.h emacs.h common.h 30 ASRC=${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c 31 32 vi.h: vi.c makelist 33 sh ${.CURDIR}/makelist -h ${.CURDIR}/vi.c > ${.TARGET} 34 35 emacs.h: emacs.c makelist 36 sh ${.CURDIR}/makelist -h ${.CURDIR}/emacs.c > ${.TARGET} 37 38 common.h: common.c makelist 39 sh ${.CURDIR}/makelist -h ${.CURDIR}/common.c > ${.TARGET} 40 41 fcns.h: ${AHDR} makelist 42 sh ${.CURDIR}/makelist -fh ${AHDR} > ${.TARGET} 43 44 fcns.c: ${AHDR} fcns.h makelist 45 sh ${.CURDIR}/makelist -fc ${AHDR} > ${.TARGET} 46 47 help.c: ${ASRC} makelist 48 sh ${.CURDIR}/makelist -bc ${ASRC} > ${.TARGET} 49 50 help.h: ${ASRC} makelist 51 sh ${.CURDIR}/makelist -bh ${ASRC} > ${.TARGET} 52 53 editline.c: ${OSRCS} 54 sh ${.CURDIR}/makelist -e ${.ALLSRC:T} > ${.TARGET} 55 56 .depend: vi.h emacs.h common.h fcns.h help.h help.c 57 all: vi.h emacs.h common.h fcns.h help.h help.c 58 59 60 test: libedit.a test.o 61 ${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermcap 62 63 includes: 64 -cd ${.CURDIR}; cmp -s histedit.h ${DESTDIR}/usr/include/histedit.h > \ 65 /dev/null 2>&1 || \ 66 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 histedit.h \ 67 ${DESTDIR}/usr/include 68 69 .include <bsd.lib.mk> 70