xref: /minix/usr.bin/make/Makefile (revision 2bc7c627)
1#	$NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg 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 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
16# let people experiment for a bit
17USE_META ?= no
18.if ${USE_META:tl} != "no"
19SRCS+=	meta.c
20CPPFLAGS+= -DUSE_META
21FILEMON_H ?= ${.CURDIR:H:H}/sys/dev/filemon/filemon.h
22.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h"
23COPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
24.endif
25.endif
26
27.if defined(__MINIX)
28CPPFLAGS+= -DMAKE_MACHINE=\"${MACHINE}\" -DMAKE_MACHINE_ARCH=\"${MACHINE_ARCH}\"
29.endif #defined(__MINIX)
30
31.PATH:	${.CURDIR}/lst.lib
32.if !defined(__MINIX)
33.if make(install)
34SUBDIR=	PSD.doc
35.endif
36.endif #!defined(__MINIX)
37.if make(obj) || make(clean)
38SUBDIR+= unit-tests
39.endif
40
41.include <bsd.prog.mk>
42.include <bsd.subdir.mk>
43
44CPPFLAGS+= -DMAKE_NATIVE
45COPTS.var.c += -Wno-cast-qual
46COPTS.job.c += -Wno-format-nonliteral
47COPTS.parse.c += -Wno-format-nonliteral
48COPTS.var.c += -Wno-format-nonliteral
49
50.ifdef TOOLDIR
51# this is a native netbsd build,
52# use libutil rather than the local emalloc etc.
53CPPFLAGS+= -DUSE_EMALLOC
54LDADD+=-lutil
55DPADD+=${LIBUTIL}
56.endif
57
58# A simple unit-test driver to help catch regressions
59accept test:
60	cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
61