Makefile revision 1.51
11.51Ssjg#	$NetBSD: Makefile,v 1.51 2010/09/13 15:36:57 sjg Exp $
21.8Schristos#	@(#)Makefile	5.2 (Berkeley) 12/28/90
31.1Scgd
41.1ScgdPROG=	make
51.4ScgdSRCS=	arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \
61.22Ssommerfe	make.c parse.c str.c suff.c targ.c trace.c var.c util.c 
71.45SdslSRCS+=  strlist.c
81.46SdslSRCS+=  make_malloc.c
91.1ScgdSRCS+=	lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \
101.1Scgd	lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c \
111.1Scgd	lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c \
121.1Scgd	lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c \
131.1Scgd	lstMember.c lstNext.c lstOpen.c lstRemove.c lstReplace.c lstSucc.c
141.40SdslSRCS += lstPrev.c
151.40Sdsl
161.51Ssjg# let people experiment for a bit
171.51SsjgUSE_META ?= no
181.51Ssjg.if ${USE_META:tl} != "no"
191.51SsjgSRCS+=	meta.c
201.51SsjgCPPFLAGS+= -DUSE_META
211.51SsjgFILEMON_H ?= ${.CURDIR:H:H}/sys/dev/filemon/filemon.h
221.51Ssjg.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h"
231.51SsjgCOPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
241.51Ssjg.endif
251.51Ssjg.endif
261.51Ssjg
271.14Sgwr.PATH:	${.CURDIR}/lst.lib
281.6Scgd.if make(install)
291.16SmycroftSUBDIR=	PSD.doc
301.5Scgd.endif
311.29Ssjg.if make(obj) || make(clean)
321.29SsjgSUBDIR+= unit-tests
331.29Ssjg.endif
341.1Scgd
351.1Scgd.include <bsd.prog.mk>
361.16Smycroft.include <bsd.subdir.mk>
371.24Ssjg
381.47SperryCPPFLAGS+= -DMAKE_NATIVE
391.28SmrgCOPTS.var.c+= -Wno-cast-qual
401.29Ssjg
411.41Ssjg.ifdef TOOLDIR
421.41Ssjg# this is a native netbsd build, 
431.41Ssjg# use libutil rather than the local emalloc etc.
441.44SjoergCPPFLAGS+= -DUSE_EMALLOC
451.37SchristosLDADD+=-lutil
461.37SchristosDPADD+=${LIBUTIL}
471.38Schristos.endif
481.37Schristos
491.29Ssjg# A simple unit-test driver to help catch regressions
501.29Ssjgaccept test:
511.50Ssjg	cd ${.CURDIR}/unit-tests && ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
52