Makefile revision 209136
11573Srgrimes#	$NetBSD: Makefile,v 1.34 2005/05/28 12:02:53 lukem Exp $
21573Srgrimes#	@(#)Makefile	8.1 (Berkeley) 6/4/93
31573Srgrimes# $FreeBSD: head/lib/libedit/Makefile 209136 2010-06-13 17:04:42Z jilles $
41573Srgrimes
51573SrgrimesLIB=	edit
61573SrgrimesSHLIB_MAJOR=	7
71573SrgrimesSHLIBDIR?= /lib
81573Srgrimes
91573SrgrimesOSRCS=	chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \
101573Srgrimes	hist.c key.c map.c \
111573Srgrimes	parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c
121573Srgrimes
131573SrgrimesDPADD=	${LIBNCURSES}
141573SrgrimesLDADD=	-lncurses
151573Srgrimes
16148834SstefanfMAN=	editline.3 editrc.5
171573Srgrimes
181573SrgrimesMLINKS=	editline.3 el_deletestr.3 editline.3 el_end.3 editline.3 el_init.3 \
191573Srgrimes	editline.3 el_get.3 editline.3 el_getc.3 editline.3 el_gets.3 \
201573Srgrimes	editline.3 history.3 editline.3 history_end.3 \
211573Srgrimes	editline.3 history_init.3 editline.3 el_insertstr.3 \
221573Srgrimes	editline.3 el_line.3 editline.3 el_parse.3 editline.3 el_push.3 \
231573Srgrimes	editline.3 el_reset.3 editline.3 el_resize.3 editline.3 el_set.3 \
241573Srgrimes	editline.3 el_source.3 \
251573Srgrimes	editline.3 tok_init.3 editline.3 tok_end.3 editline.3 tok_reset.3 \
261573Srgrimes	editline.3 tok_line.3 editline.3 tok_str.3
271573Srgrimes
281573Srgrimes# For speed and debugging
291573Srgrimes#SRCS=   ${OSRCS} tokenizer.c history.c
301573Srgrimes# For protection
3184260SobrienSRCS=	editline.c tokenizer.c history.c
32237448SpfgSRCS+=	common.h emacs.h fcns.h help.h vi.h
331573SrgrimesCLEANFILES+= common.h editline.c emacs.h fcns.c fcns.h help.c help.h vi.h
341573Srgrimes
351573SrgrimesCFLAGS+= -I. -I${.CURDIR}
361573SrgrimesCFLAGS+= #-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
371573SrgrimesCFLAGS+= #-DDEBUG_PASTE -DDEBUG_EDIT
3884260Sobrien
3984260SobrienWARNS?=	1
401573Srgrimes
411573SrgrimesAHDR=	vi.h emacs.h common.h
421573SrgrimesASRC=	${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c
431573Srgrimes
441573Srgrimes.for hdr in vi emacs common
458870Srgrimes${hdr}.h: ${hdr}.c makelist
46108470Sschweikh	sh ${.CURDIR}/makelist -h ${.CURDIR}/${hdr}.c > ${.TARGET}
478870Srgrimes.endfor
488870Srgrimes
491573Srgrimesfcns.h: ${AHDR} makelist
501573Srgrimes	sh ${.CURDIR}/makelist -fh ${AHDR} > ${.TARGET}
511573Srgrimes
521573Srgrimesfcns.c: ${AHDR} fcns.h makelist
531573Srgrimes	sh ${.CURDIR}/makelist -fc ${AHDR} > ${.TARGET}
541573Srgrimes
551573Srgrimeshelp.c: ${ASRC} makelist
561573Srgrimes	sh ${.CURDIR}/makelist -bc ${ASRC} > ${.TARGET}
571573Srgrimes
581573Srgrimeshelp.h: ${ASRC} makelist
591573Srgrimes	sh ${.CURDIR}/makelist -bh ${ASRC} > ${.TARGET}
601573Srgrimes
611573Srgrimeseditline.c: ${OSRCS}
621573Srgrimes	sh ${.CURDIR}/makelist -e ${.ALLSRC:T} > ${.TARGET}
631573Srgrimes
641573Srgrimes# minimal dependency to make "make depend" optional
651573Srgrimeseditline.o editline.po editline.So editline.ln:	\
661573Srgrimes	common.h emacs.h fcns.c fcns.h help.c help.h vi.h
678870Srgrimes
688870Srgrimestest.o: ${.CURDIR}/TEST/test.c
691573Srgrimes
701573Srgrimestest: test.o libedit.a ${DPADD} ${LIBTERMCAP}
711573Srgrimes	${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD}
7284260Sobrien
7384260Sobrien.include <bsd.lib.mk>
7484260Sobrien