Makefile revision 1.34
11.34Sroy#	$NetBSD: Makefile,v 1.34 2010/02/03 15:34:45 roy Exp $
21.10Stls#	@(#)Makefile	8.3 (Berkeley) 4/20/95
31.1Scgd
41.15Slukem.include <bsd.own.mk>
51.25Schristos
61.30StlsUSE_FORT?= yes	# data-driven bugs?
71.30Stls
81.31SchristosUSE_EDITLINE?=yes
91.31SchristosMIME_SUPPORT?=yes	# currently requires USE_EDITLINE
101.31SchristosCHARSET_SUPPORT?=yes	# requires MIME_SUPPORT
111.31SchristosTHREAD_SUPPORT?=yes	# EXPERIMENTAL
121.31Schristos
131.31Schristos# Work around some problems in -current.
141.31Schristos# See the source code for more info.
151.31Schristos#
161.31SchristosCPPFLAGS+=	-DBROKEN_EXEC_TTY_RESTORE	# broken since 4.99.10
171.31SchristosCPPFLAGS+=	-DBROKEN_CLONE_STAT		# see PRs 37878 and 37550
181.32SchristosCPPFLAGS+=	-DBROKEN_MAGIC			# bad MIME type on short files
191.31Schristos
201.31Schristos# Debugging options (most should go away - please leave for now).
211.31Schristos#
221.31Schristos#CPPFLAGS+=	-DDEBUG_FILE_LEAK
231.15Slukem
241.1ScgdPROG=	mail
251.28SchristosSRCS=	version.c support.c cmd1.c cmd2.c cmd3.c cmd4.c cmdtab.c collect.c \
261.28Schristos	dotlock.c edit.c fio.c format.c getname.c head.c v7.local.c lex.c \
271.31Schristos	list.c main.c names.c popen.c quit.c send.c sig.c strings.c temp.c \
281.31Schristos	tty.c vars.c
291.3SjtcLINKS=	${BINDIR}/mail ${BINDIR}/Mail ${BINDIR}/mail ${BINDIR}/mailx
301.3SjtcMLINKS=	mail.1 Mail.1 mail.1 mailx.1
311.20Swiz
321.25SchristosLDADD+=		-lutil
331.25SchristosDPADD+=		${LIBUTIL}
341.25Schristos
351.26Schristos.if ${USE_EDITLINE:Uno} == "yes"
361.23SchristosSRCS+=	complete.c
371.23Schristos
381.25SchristosCPPFLAGS+=	-DUSE_EDITLINE
391.34SroyLDADD+=		-ledit -lterminfo
401.34SroyDPADD+=		${LIBEDIT} ${LIBTERMINFO}
411.23Schristos
421.26Schristos.if ${MIME_SUPPORT:Uno} == "yes"
431.25SchristosSRCS+=	mime_attach.c
441.25SchristosSRCS+=	mime_child.c
451.25SchristosSRCS+=	mime_codecs.c
461.25SchristosSRCS+=	mime_decode.c
471.28SchristosSRCS+=	mime_detach.c
481.25SchristosSRCS+=	mime_header.c
491.25Schristos
501.25SchristosCPPFLAGS+=	-DMIME_SUPPORT
511.26Schristos.if ${CHARSET_SUPPORT:Uno} == "yes"
521.25SchristosCPPFLAGS+=	-DCHARSET_SUPPORT
531.25Schristos.endif
541.25Schristos
551.25SchristosLDADD+=		-lmagic -lz
561.25SchristosDPADD+=		${LIBMAGIC} ${LIBZ}
571.25Schristos.endif
581.23Schristos.endif
591.23Schristos
601.28Schristos.if ${THREAD_SUPPORT:Uno} == "yes"
611.28SchristosSRCS+=	thread.c
621.28SchristosCPPFLAGS+=	-DTHREAD_SUPPORT
631.28Schristos.endif
641.28Schristos
651.25SchristosCWARNFLAGS+=	-Wextra
661.3Sjtc
671.21Slukem.PATH: ${.CURDIR}/misc
681.21Slukem
691.15Slukem.if ${MKSHARE} != "no"
701.21SlukemFILESDIR=		/usr/share/misc
711.21SlukemFILES=			mail.help mail.tildehelp
721.5Smycroft
731.5Smycroft.if make(install)
741.5SmycroftSUBDIR+= USD.doc
751.14Slukem.endif
761.5Smycroft.endif
771.11Sperry
781.21SlukemCONFIGFILES=		mail.rc
791.21SlukemFILESDIR_mail.rc=	/etc
801.1Scgd
811.1Scgd.include <bsd.prog.mk>
821.13Smycroft.include <bsd.subdir.mk>
83