xref: /freebsd/lib/libedit/Makefile (revision c389411c8aa86e3ffa6e7b24ecef1d8c94549bb8)
1c4a1f025SPedro F. Giffuni#	$NetBSD: Makefile,v 1.37 2009/01/18 12:17:49 lukem Exp $
258f0484fSRodney W. Grimes#	@(#)Makefile	8.1 (Berkeley) 6/4/93
33cf3c5d9SMarcel Moolenaar# $FreeBSD$
458f0484fSRodney W. Grimes
5*c389411cSGlen BarberPACKAGE=clibs
658f0484fSRodney W. GrimesLIB=	edit
73ca3047aSKen SmithSHLIB_MAJOR=	7
841d8423fSGordon TetlowSHLIBDIR?= /lib
958f0484fSRodney W. Grimes
1096535454SJilles TjoelkerOSRCS=	chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \
11c1a66a97SBaptiste Daroussin	hist.c keymacro.c map.c chartype.c \
12c1a66a97SBaptiste Daroussin	parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c
1358f0484fSRodney W. Grimes
146b129086SBaptiste DaroussinLIBADD=	ncursesw
15e46d877dSAndrey A. Chernov
164a558355SRuslan ErmilovMAN=	editline.3 editrc.5
17bd5176cbSMike Smith
184f375b90SDavid E. O'BrienMLINKS=	editline.3 el_deletestr.3 editline.3 el_end.3 editline.3 el_init.3 \
194f375b90SDavid E. O'Brien	editline.3 el_get.3 editline.3 el_getc.3 editline.3 el_gets.3 \
204f375b90SDavid E. O'Brien	editline.3 history.3 editline.3 history_end.3 \
214f375b90SDavid E. O'Brien	editline.3 history_init.3 editline.3 el_insertstr.3 \
224f375b90SDavid E. O'Brien	editline.3 el_line.3 editline.3 el_parse.3 editline.3 el_push.3 \
234f375b90SDavid E. O'Brien	editline.3 el_reset.3 editline.3 el_resize.3 editline.3 el_set.3 \
2476d00450SStefan Farfeleder	editline.3 el_source.3 \
2576d00450SStefan Farfeleder	editline.3 tok_init.3 editline.3 tok_end.3 editline.3 tok_reset.3 \
2676d00450SStefan Farfeleder	editline.3 tok_line.3 editline.3 tok_str.3
27bd5176cbSMike Smith
2858f0484fSRodney W. Grimes# For speed and debugging
291e3f1446SDavid E. O'Brien#SRCS=   ${OSRCS}
3058f0484fSRodney W. Grimes# For protection
311e3f1446SDavid E. O'BrienSRCS=	editline.c
321e3f1446SDavid E. O'BrienSRCS+=	tokenizer.c history.c readline.c
33bd5176cbSMike SmithSRCS+=	common.h emacs.h fcns.h help.h vi.h
34bd5176cbSMike SmithCLEANFILES+= common.h editline.c emacs.h fcns.c fcns.h help.c help.h vi.h
354f375b90SDavid E. O'Brien
361e3f1446SDavid E. O'BrienINCS=	histedit.h
371e3f1446SDavid E. O'Brien
38c1a66a97SBaptiste DaroussinOSRCS+=	eln.c
39c1a66a97SBaptiste DaroussinSRCS+=	tokenizern.c historyn.c
40c1a66a97SBaptiste DaroussinCLEANFILES+=	tokenizern.c historyn.c
41c1a66a97SBaptiste DaroussinCFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/edit -DWIDECHAR
4258f0484fSRodney W. GrimesCFLAGS+= #-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
4376d00450SStefan FarfelederCFLAGS+= #-DDEBUG_PASTE -DDEBUG_EDIT
4458f0484fSRodney W. Grimes
45daaf5759SEd SchoutenWARNS?=	1
46daaf5759SEd Schouten
471e3f1446SDavid E. O'BrienSUBDIR= edit/readline
481e3f1446SDavid E. O'Brien
4958f0484fSRodney W. GrimesAHDR=	vi.h emacs.h common.h
5058f0484fSRodney W. GrimesASRC=	${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c
5158f0484fSRodney W. Grimes
524f375b90SDavid E. O'Brien.for hdr in vi emacs common
534f375b90SDavid E. O'Brien${hdr}.h: ${hdr}.c makelist
544f375b90SDavid E. O'Brien	sh ${.CURDIR}/makelist -h ${.CURDIR}/${hdr}.c > ${.TARGET}
554f375b90SDavid E. O'Brien.endfor
5658f0484fSRodney W. Grimes
5758f0484fSRodney W. Grimesfcns.h: ${AHDR} makelist
5858f0484fSRodney W. Grimes	sh ${.CURDIR}/makelist -fh ${AHDR} > ${.TARGET}
5958f0484fSRodney W. Grimes
6058f0484fSRodney W. Grimesfcns.c: ${AHDR} fcns.h makelist
6158f0484fSRodney W. Grimes	sh ${.CURDIR}/makelist -fc ${AHDR} > ${.TARGET}
6258f0484fSRodney W. Grimes
6358f0484fSRodney W. Grimeshelp.c: ${ASRC} makelist
6458f0484fSRodney W. Grimes	sh ${.CURDIR}/makelist -bc ${ASRC} > ${.TARGET}
6558f0484fSRodney W. Grimes
6658f0484fSRodney W. Grimeshelp.h: ${ASRC} makelist
6758f0484fSRodney W. Grimes	sh ${.CURDIR}/makelist -bh ${ASRC} > ${.TARGET}
6858f0484fSRodney W. Grimes
693c195773SDavid E. O'Brieneditline.c: ${OSRCS}
703c195773SDavid E. O'Brien	sh ${.CURDIR}/makelist -e ${.ALLSRC:T} > ${.TARGET}
7158f0484fSRodney W. Grimes
72c1a66a97SBaptiste Daroussintokenizern.c: makelist Makefile
73c1a66a97SBaptiste Daroussin	sh ${.CURDIR}/makelist -n tokenizer.c > ${.TARGET}
74c1a66a97SBaptiste Daroussin
75c1a66a97SBaptiste Daroussinhistoryn.c: makelist Makefile
76c1a66a97SBaptiste Daroussin	sh ${.CURDIR}/makelist -n history.c > ${.TARGET}
77c1a66a97SBaptiste Daroussin
783c195773SDavid E. O'Brien# minimal dependency to make "make depend" optional
793c195773SDavid E. O'Brieneditline.o editline.po editline.So editline.ln:	\
803c195773SDavid E. O'Brien	common.h emacs.h fcns.c fcns.h help.c help.h vi.h
813c195773SDavid E. O'Brien
82c4a1f025SPedro F. Giffunitc1.o: ${.CURDIR}/TEST/tc1.c
8358f0484fSRodney W. Grimes
84c4a1f025SPedro F. Giffunitest: tc1.o libedit.a ${DPADD} ${LIBTERMCAP}
85b7e5f46aSPeter Wemm	${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD}
8658f0484fSRodney W. Grimes
8758f0484fSRodney W. Grimes.include <bsd.lib.mk>
88