xref: /freebsd/lib/libedit/Makefile (revision dc36d6f9bb1753f3808552f3afd30eda9a7b206a)
1678bbc14SPedro F. Giffuni#	$NetBSD: Makefile,v 1.56 2016/03/02 19:24:20 christos Exp $
258f0484fSRodney W. Grimes
3c389411cSGlen BarberPACKAGE=clibs
46ea268b6SPedro F. Giffuni
581565700SBaptiste DaroussinEDITDIR=	${SRCTOP}/contrib/libedit
681565700SBaptiste Daroussin.PATH: ${EDITDIR}
781565700SBaptiste Daroussin
80b7f1af8SJohn BaldwinSHLIB_MAJOR=	8
941d8423fSGordon TetlowSHLIBDIR?= /lib
1058f0484fSRodney W. Grimes
1198fa04efSPedro F. GiffuniWARNS?=	3
126ea268b6SPedro F. GiffuniLIB=	edit
136ea268b6SPedro F. Giffuni
14cbc83e37SBaptiste DaroussinLIBADD=	tinfow
1598fa04efSPedro F. Giffuni
1681565700SBaptiste DaroussinSRCS=	chared.c chartype.c common.c el.c eln.c emacs.c filecomplete.c \
1781565700SBaptiste Daroussin	hist.c history.c historyn.c keymacro.c literal.c map.c \
1881565700SBaptiste Daroussin	parse.c prompt.c read.c readline.c refresh.c search.c sig.c \
1981565700SBaptiste Daroussin	terminal.c tokenizer.c tokenizern.c tty.c vi.c
2058f0484fSRodney W. Grimes
21bd5176cbSMike Smith
2281565700SBaptiste DaroussinMAN=	editline.3 editrc.5 editline.7
2381565700SBaptiste Daroussin
2481565700SBaptiste DaroussinMLINKS=	\
2581565700SBaptiste Daroussin	editline.3 el_deletestr.3 \
2681565700SBaptiste Daroussin	editline.3 el_end.3 \
2781565700SBaptiste Daroussin	editline.3 el_get.3 \
2881565700SBaptiste Daroussin	editline.3 el_getc.3 \
2981565700SBaptiste Daroussin	editline.3 el_gets.3 \
3081565700SBaptiste Daroussin	editline.3 el_init.3 \
3181565700SBaptiste Daroussin	editline.3 el_init_fd.3 \
3281565700SBaptiste Daroussin	editline.3 el_insertstr.3 \
3381565700SBaptiste Daroussin	editline.3 el_line.3 \
3481565700SBaptiste Daroussin	editline.3 el_parse.3 \
3581565700SBaptiste Daroussin	editline.3 el_push.3 \
3681565700SBaptiste Daroussin	editline.3 el_reset.3 \
3781565700SBaptiste Daroussin	editline.3 el_resize.3 \
3881565700SBaptiste Daroussin	editline.3 el_set.3 \
3976d00450SStefan Farfeleder	editline.3 el_source.3 \
4081565700SBaptiste Daroussin	editline.3 history.3 \
4181565700SBaptiste Daroussin	editline.3 history_end.3 \
4281565700SBaptiste Daroussin	editline.3 history_init.3 \
4381565700SBaptiste Daroussin	editline.3 tok_end.3 \
4481565700SBaptiste Daroussin	editline.3 tok_init.3 \
4581565700SBaptiste Daroussin	editline.3 tok_line.3 \
4681565700SBaptiste Daroussin	editline.3 tok_reset.3 \
4781565700SBaptiste Daroussin	editline.3 tok_str.3 \
4881565700SBaptiste Daroussin	editline.3 el_wdeletestr.3 \
4981565700SBaptiste Daroussin	editline.3 el_wget.3 \
5081565700SBaptiste Daroussin	editline.3 el_wgetc.3 \
5181565700SBaptiste Daroussin	editline.3 el_wgets.3 \
5281565700SBaptiste Daroussin	editline.3 el_winsertstr.3 \
5381565700SBaptiste Daroussin	editline.3 el_wline.3 \
5481565700SBaptiste Daroussin	editline.3 el_wparse.3 \
5581565700SBaptiste Daroussin	editline.3 el_wpush.3 \
5681565700SBaptiste Daroussin	editline.3 el_wset.3 \
5781565700SBaptiste Daroussin	editline.3 history_w.3 \
5881565700SBaptiste Daroussin	editline.3 history_wend.3 \
5981565700SBaptiste Daroussin	editline.3 history_winit.3 \
6081565700SBaptiste Daroussin	editline.3 tok_wend.3 \
6181565700SBaptiste Daroussin	editline.3 tok_winit.3 \
6281565700SBaptiste Daroussin	editline.3 tok_wline.3 \
6381565700SBaptiste Daroussin	editline.3 tok_wreset.3 \
6481565700SBaptiste Daroussin	editline.3 tok_wstr.3
654f375b90SDavid E. O'Brien
66b315a729SPiotr Pawel StefaniakINCS=	histedit.h filecomplete.h
671e3f1446SDavid E. O'Brien
6881565700SBaptiste DaroussinSRCS+=	common.h emacs.h fcns.h func.h help.h vi.h
6981565700SBaptiste DaroussinCLEANFILES+= common.h emacs.h fcns.h func.h help.h vi.h
7081565700SBaptiste Daroussin
7181565700SBaptiste DaroussinCFLAGS+= -I. -I${EDITDIR} -I${EDITDIR}/readline
7258f0484fSRodney W. Grimes
7358f0484fSRodney W. GrimesAHDR=	vi.h emacs.h common.h
7481565700SBaptiste DaroussinASRC=	${EDITDIR}/vi.c ${EDITDIR}/emacs.c ${EDITDIR}/common.c
7558f0484fSRodney W. Grimes
7681565700SBaptiste DaroussinSUBDIR= readline
776ea268b6SPedro F. Giffuni
784f375b90SDavid E. O'Brien.for hdr in vi emacs common
794f375b90SDavid E. O'Brien${hdr}.h: ${hdr}.c makelist
8081565700SBaptiste Daroussin	sh ${EDITDIR}/makelist -h ${EDITDIR}/${hdr}.c > ${.TARGET}
814f375b90SDavid E. O'Brien.endfor
8258f0484fSRodney W. Grimes
8358f0484fSRodney W. Grimesfcns.h: ${AHDR} makelist
8481565700SBaptiste Daroussin	sh ${EDITDIR}/makelist -fh ${AHDR} > ${.TARGET}
8558f0484fSRodney W. Grimes
8681565700SBaptiste Daroussinfunc.h: ${AHDR} makelist
8781565700SBaptiste Daroussin	sh ${EDITDIR}/makelist -fc ${AHDR} > ${.TARGET}
8858f0484fSRodney W. Grimes
8958f0484fSRodney W. Grimeshelp.h: ${ASRC} makelist
9081565700SBaptiste Daroussin	sh ${EDITDIR}/makelist -bh ${ASRC} > ${.TARGET}
9158f0484fSRodney W. Grimes
9281565700SBaptiste Daroussintc1.o: ${EDITDIR}/TEST/tc1.c
9358f0484fSRodney W. Grimes
94c4a1f025SPedro F. Giffunitest: tc1.o libedit.a ${DPADD} ${LIBTERMCAP}
95b7e5f46aSPeter Wemm	${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD}
9658f0484fSRodney W. Grimes
9758f0484fSRodney W. Grimes.include <bsd.lib.mk>
98*7973f26aSJohn Baldwin
99*7973f26aSJohn BaldwinCWARNFLAGS.chartype.c=	${NO_WUSE_AFTER_FREE}
100