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