xref: /freebsd/lib/libedit/Makefile (revision c1a66a97f95d2f4366348b75e2c7676d11048666)
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
558f0484fSRodney W. GrimesLIB=	edit
63ca3047aSKen SmithSHLIB_MAJOR=	7
741d8423fSGordon TetlowSHLIBDIR?= /lib
858f0484fSRodney W. Grimes
996535454SJilles TjoelkerOSRCS=	chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \
10*c1a66a97SBaptiste Daroussin	hist.c keymacro.c map.c chartype.c \
11*c1a66a97SBaptiste Daroussin	parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c
1258f0484fSRodney W. Grimes
136b129086SBaptiste DaroussinLIBADD=	ncursesw
14e46d877dSAndrey A. Chernov
154a558355SRuslan ErmilovMAN=	editline.3 editrc.5
16bd5176cbSMike Smith
174f375b90SDavid E. O'BrienMLINKS=	editline.3 el_deletestr.3 editline.3 el_end.3 editline.3 el_init.3 \
184f375b90SDavid E. O'Brien	editline.3 el_get.3 editline.3 el_getc.3 editline.3 el_gets.3 \
194f375b90SDavid E. O'Brien	editline.3 history.3 editline.3 history_end.3 \
204f375b90SDavid E. O'Brien	editline.3 history_init.3 editline.3 el_insertstr.3 \
214f375b90SDavid E. O'Brien	editline.3 el_line.3 editline.3 el_parse.3 editline.3 el_push.3 \
224f375b90SDavid E. O'Brien	editline.3 el_reset.3 editline.3 el_resize.3 editline.3 el_set.3 \
2376d00450SStefan Farfeleder	editline.3 el_source.3 \
2476d00450SStefan Farfeleder	editline.3 tok_init.3 editline.3 tok_end.3 editline.3 tok_reset.3 \
2576d00450SStefan Farfeleder	editline.3 tok_line.3 editline.3 tok_str.3
26bd5176cbSMike Smith
2758f0484fSRodney W. Grimes# For speed and debugging
281e3f1446SDavid E. O'Brien#SRCS=   ${OSRCS}
2958f0484fSRodney W. Grimes# For protection
301e3f1446SDavid E. O'BrienSRCS=	editline.c
311e3f1446SDavid E. O'BrienSRCS+=	tokenizer.c history.c readline.c
32bd5176cbSMike SmithSRCS+=	common.h emacs.h fcns.h help.h vi.h
33bd5176cbSMike SmithCLEANFILES+= common.h editline.c emacs.h fcns.c fcns.h help.c help.h vi.h
344f375b90SDavid E. O'Brien
351e3f1446SDavid E. O'BrienINCS=	histedit.h
361e3f1446SDavid E. O'Brien
37*c1a66a97SBaptiste DaroussinOSRCS+=	eln.c
38*c1a66a97SBaptiste DaroussinSRCS+=	tokenizern.c historyn.c
39*c1a66a97SBaptiste DaroussinCLEANFILES+=	tokenizern.c historyn.c
40*c1a66a97SBaptiste DaroussinCFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/edit -DWIDECHAR
4158f0484fSRodney W. GrimesCFLAGS+= #-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
4276d00450SStefan FarfelederCFLAGS+= #-DDEBUG_PASTE -DDEBUG_EDIT
4358f0484fSRodney W. Grimes
44daaf5759SEd SchoutenWARNS?=	1
45daaf5759SEd Schouten
461e3f1446SDavid E. O'BrienSUBDIR= edit/readline
471e3f1446SDavid E. O'Brien
4858f0484fSRodney W. GrimesAHDR=	vi.h emacs.h common.h
4958f0484fSRodney W. GrimesASRC=	${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c
5058f0484fSRodney W. Grimes
514f375b90SDavid E. O'Brien.for hdr in vi emacs common
524f375b90SDavid E. O'Brien${hdr}.h: ${hdr}.c makelist
534f375b90SDavid E. O'Brien	sh ${.CURDIR}/makelist -h ${.CURDIR}/${hdr}.c > ${.TARGET}
544f375b90SDavid E. O'Brien.endfor
5558f0484fSRodney W. Grimes
5658f0484fSRodney W. Grimesfcns.h: ${AHDR} makelist
5758f0484fSRodney W. Grimes	sh ${.CURDIR}/makelist -fh ${AHDR} > ${.TARGET}
5858f0484fSRodney W. Grimes
5958f0484fSRodney W. Grimesfcns.c: ${AHDR} fcns.h makelist
6058f0484fSRodney W. Grimes	sh ${.CURDIR}/makelist -fc ${AHDR} > ${.TARGET}
6158f0484fSRodney W. Grimes
6258f0484fSRodney W. Grimeshelp.c: ${ASRC} makelist
6358f0484fSRodney W. Grimes	sh ${.CURDIR}/makelist -bc ${ASRC} > ${.TARGET}
6458f0484fSRodney W. Grimes
6558f0484fSRodney W. Grimeshelp.h: ${ASRC} makelist
6658f0484fSRodney W. Grimes	sh ${.CURDIR}/makelist -bh ${ASRC} > ${.TARGET}
6758f0484fSRodney W. Grimes
683c195773SDavid E. O'Brieneditline.c: ${OSRCS}
693c195773SDavid E. O'Brien	sh ${.CURDIR}/makelist -e ${.ALLSRC:T} > ${.TARGET}
7058f0484fSRodney W. Grimes
71*c1a66a97SBaptiste Daroussintokenizern.c: makelist Makefile
72*c1a66a97SBaptiste Daroussin	sh ${.CURDIR}/makelist -n tokenizer.c > ${.TARGET}
73*c1a66a97SBaptiste Daroussin
74*c1a66a97SBaptiste Daroussinhistoryn.c: makelist Makefile
75*c1a66a97SBaptiste Daroussin	sh ${.CURDIR}/makelist -n history.c > ${.TARGET}
76*c1a66a97SBaptiste Daroussin
773c195773SDavid E. O'Brien# minimal dependency to make "make depend" optional
783c195773SDavid E. O'Brieneditline.o editline.po editline.So editline.ln:	\
793c195773SDavid E. O'Brien	common.h emacs.h fcns.c fcns.h help.c help.h vi.h
803c195773SDavid E. O'Brien
81c4a1f025SPedro F. Giffunitc1.o: ${.CURDIR}/TEST/tc1.c
8258f0484fSRodney W. Grimes
83c4a1f025SPedro F. Giffunitest: tc1.o libedit.a ${DPADD} ${LIBTERMCAP}
84b7e5f46aSPeter Wemm	${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD}
8558f0484fSRodney W. Grimes
8658f0484fSRodney W. Grimes.include <bsd.lib.mk>
87