Makefile revision 1.61
11.61Swiz#	$NetBSD: Makefile,v 1.61 2016/05/02 14:12:09 wiz Exp $
21.1Scgd#	@(#)Makefile	8.1 (Berkeley) 6/4/93
31.1Scgd
41.23SlukemUSE_SHLIBDIR=	yes
51.23Slukem
61.50SmattWARNS?=	5
71.1ScgdLIB=	edit
81.1Scgd
91.41SroyLIBDPLIBS+=     terminfo ${.CURDIR}/../libterminfo
101.47Stron
111.47Stron.include "bsd.own.mk"
121.47Stron
131.47StronCOPTS+=	-Wunused-parameter
141.48SjoergCWARNFLAGS.gcc+=	-Wconversion
151.53SjoergCWARNFLAGS.clang+=	-Wno-cast-qual
161.32Schristos
171.58SchristosOSRCS=	chared.c common.c el.c eln.c emacs.c filecomplete.c \
181.44Schristos	hist.c keymacro.c map.c chartype.c \
191.43Schristos	parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c
201.1Scgd
211.59SchristosMAN=	editline.3 editrc.5 editline.7
221.5Slukem
231.61SwizMLINKS= \
241.60Schristoseditline.3 el_deletestr.3 \
251.60Schristoseditline.3 el_end.3 \
261.60Schristoseditline.3 el_get.3 \
271.60Schristoseditline.3 el_getc.3 \
281.60Schristoseditline.3 el_gets.3 \
291.60Schristoseditline.3 el_init.3 \
301.60Schristoseditline.3 el_init_fd.3 \
311.60Schristoseditline.3 el_insertstr.3 \
321.60Schristoseditline.3 el_line.3 \
331.60Schristoseditline.3 el_parse.3 \
341.60Schristoseditline.3 el_push.3 \
351.60Schristoseditline.3 el_reset.3 \
361.60Schristoseditline.3 el_resize.3 \
371.60Schristoseditline.3 el_set.3 \
381.60Schristoseditline.3 el_source.3 \
391.60Schristoseditline.3 history.3 \
401.60Schristoseditline.3 history_end.3 \
411.60Schristoseditline.3 history_init.3 \
421.60Schristoseditline.3 tok_end.3 \
431.60Schristoseditline.3 tok_init.3 \
441.60Schristoseditline.3 tok_line.3 \
451.60Schristoseditline.3 tok_reset.3 \
461.60Schristoseditline.3 tok_str.3
471.60Schristos
481.60SchristosMLINKS+= \
491.60Schristoseditline.3 el_wdeletestr.3 \
501.60Schristoseditline.3 el_wget.3 \
511.60Schristoseditline.3 el_wgetc.3 \
521.60Schristoseditline.3 el_wgets.3 \
531.60Schristoseditline.3 el_winsertstr.3 \
541.60Schristoseditline.3 el_wline.3 \
551.60Schristoseditline.3 el_wparse.3 \
561.60Schristoseditline.3 el_wpush.3 \
571.60Schristoseditline.3 el_wset.3 \
581.60Schristoseditline.3 history_w.3 \
591.60Schristoseditline.3 history_wend.3 \
601.60Schristoseditline.3 history_winit.3 \
611.60Schristoseditline.3 tok_wend.3 \
621.60Schristoseditline.3 tok_winit.3 \
631.60Schristoseditline.3 tok_wline.3 \
641.60Schristoseditline.3 tok_wreset.3 \
651.60Schristoseditline.3 tok_wstr.3
661.5Slukem
671.1Scgd# For speed and debugging
681.58Schristos#SRCS=   ${OSRCS}
691.1Scgd# For protection
701.58SchristosSRCS=	editline.c
711.38Schristos
721.58SchristosSRCS += history.c historyn.c tokenizer.c tokenizern.c readline.c
731.1Scgd
741.18SchristosLIBEDITDIR?=${.CURDIR}
751.18Schristos
761.20SjdolecekINCS= histedit.h
771.7SchristosINCSDIR=/usr/include
781.7Schristos
791.58SchristosCLEANFILES+=common.h.tmp emacs.h.tmp fcns.h.tmp func.h.tmp
801.58SchristosCLEANFILES+=help.h.tmp vi.h.tmp tc1.o tc1 .depend
811.58Schristos
821.54SchristosCPPFLAGS+=-I. -I${LIBEDITDIR}
831.17SsimonbCPPFLAGS+=-I. -I${.CURDIR}
841.56Schristos#CPPFLAGS+=-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
851.56Schristos#CPPFLAGS+=-DDEBUG_PASTE -DDEBUG_EDIT
861.1Scgd
871.54SchristosAHDR=vi.h emacs.h common.h
881.18SchristosASRC=${LIBEDITDIR}/vi.c ${LIBEDITDIR}/emacs.c ${LIBEDITDIR}/common.c
891.1Scgd
901.58SchristosDPSRCS+=	${AHDR} fcns.h func.h help.h
911.58SchristosCLEANFILES+=	${AHDR} fcns.h func.h help.h
921.27Slukem
931.20SjdolecekSUBDIR=	readline
941.20Sjdolecek
951.58Schristos.depend: ${AHDR} fcns.h func.h help.h
961.58Schristos
971.31Sdslvi.h: vi.c makelist Makefile
981.33Slukem	${_MKTARGET_CREATE}
991.25Schristos	${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \
1001.25Schristos	    > ${.TARGET}.tmp && \
1011.19Smrg	    mv ${.TARGET}.tmp ${.TARGET}
1021.1Scgd
1031.31Sdslemacs.h: emacs.c makelist Makefile
1041.33Slukem	${_MKTARGET_CREATE}
1051.25Schristos	${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/emacs.c \
1061.25Schristos	    > ${.TARGET}.tmp && \
1071.19Smrg	    mv ${.TARGET}.tmp ${.TARGET}
1081.1Scgd
1091.31Sdslcommon.h: common.c makelist Makefile
1101.33Slukem	${_MKTARGET_CREATE}
1111.25Schristos	${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/common.c \
1121.25Schristos	    > ${.TARGET}.tmp && \
1131.19Smrg	    mv ${.TARGET}.tmp ${.TARGET}
1141.1Scgd
1151.31Sdslfcns.h: ${AHDR} makelist Makefile
1161.33Slukem	${_MKTARGET_CREATE}
1171.25Schristos	${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > ${.TARGET}.tmp && \
1181.19Smrg	    mv ${.TARGET}.tmp ${.TARGET}
1191.1Scgd
1201.58Schristosfunc.h: ${AHDR} makelist Makefile
1211.33Slukem	${_MKTARGET_CREATE}
1221.25Schristos	${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > ${.TARGET}.tmp && \
1231.19Smrg	    mv ${.TARGET}.tmp ${.TARGET}
1241.1Scgd
1251.31Sdslhelp.h: ${ASRC} makelist Makefile
1261.33Slukem	${_MKTARGET_CREATE}
1271.25Schristos	${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > ${.TARGET}.tmp && \
1281.19Smrg	    mv ${.TARGET}.tmp ${.TARGET}
1291.1Scgd
1301.35Srpaulotc1.o:	${LIBEDITDIR}/TEST/tc1.c
1311.42Smrg
1321.54Schristostc1:	libedit.a tc1.o
1331.33Slukem	${_MKTARGET_LINK}
1341.41Sroy	${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermlib
1351.16Sitohy
1361.27Slukem.include <bsd.lib.mk>
1371.27Slukem.include <bsd.subdir.mk>
1381.42Smrg
1391.42Smrg# XXX
1401.52Smrg.if defined(HAVE_GCC)
1411.42SmrgCOPTS.editline.c+=	-Wno-cast-qual
1421.42SmrgCOPTS.tokenizer.c+=	-Wno-cast-qual
1431.42SmrgCOPTS.tokenizern.c+=	-Wno-cast-qual
1441.42Smrg.endif
145