Makefile revision 1.66
1#	$NetBSD: Makefile,v 1.66 2020/01/19 19:42:32 riastradh Exp $
2#	@(#)Makefile	5.2 (Berkeley) 12/28/90
3
4PROG=	make
5SRCS=	arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \
6	make.c metachar.c parse.c str.c suff.c targ.c trace.c var.c util.c 
7SRCS+=  strlist.c
8SRCS+=  make_malloc.c
9SRCS+=	lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \
10	lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c \
11	lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c \
12	lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c \
13	lstMember.c lstNext.c lstOpen.c lstRemove.c lstReplace.c lstSucc.c
14SRCS += lstPrev.c
15
16USE_META ?= yes
17.if ${USE_META:tl} != "no"
18SRCS+=	meta.c
19CPPFLAGS+= -DUSE_META
20USE_FILEMON ?= yes
21.if ${USE_FILEMON:tl} != "no"
22SRCS+=	filemon.c
23CPPFLAGS+= -DUSE_FILEMON
24.endif
25.endif
26
27.PATH:	${.CURDIR}/lst.lib
28SUBDIR.roff+=	PSD.doc
29.if make(obj) || make(clean)
30SUBDIR+= unit-tests
31.endif
32
33.include <bsd.prog.mk>
34.include <bsd.subdir.mk>
35
36CPPFLAGS+= -DMAKE_NATIVE
37COPTS.var.c += -Wno-cast-qual
38COPTS.job.c += -Wno-format-nonliteral
39COPTS.parse.c += -Wno-format-nonliteral
40COPTS.var.c += -Wno-format-nonliteral
41
42.ifdef TOOLDIR
43# this is a native netbsd build, 
44# use libutil rather than the local emalloc etc.
45CPPFLAGS+= -DUSE_EMALLOC
46LDADD+=-lutil
47DPADD+=${LIBUTIL}
48.endif
49
50COPTS.arch.c+=	${GCC_NO_FORMAT_TRUNCATION}
51COPTS.dir.c+=	${GCC_NO_FORMAT_TRUNCATION}
52COPTS.main.c+=	${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_STRINGOP_TRUNCATION}
53COPTS.meta.c+=	${GCC_NO_FORMAT_TRUNCATION}
54COPTS.parse.c+=	${GCC_NO_FORMAT_TRUNCATION}
55
56# A simple unit-test driver to help catch regressions
57accept test:
58	cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
59