Sync with manuals from netbsd-8 branch.
[minix3.git] / usr.bin / make / Makefile
blobb08eb1ddbf69f298c7f333cd301d974c97409508
1 # $NetBSD: Makefile,v 1.58 2015/06/17 17:43:23 christos Exp $
2 # @(#)Makefile 5.2 (Berkeley) 12/28/90
4 PROG= make
5 SRCS= 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
7 SRCS+= strlist.c
8 SRCS+= make_malloc.c
9 SRCS+= 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
14 SRCS += lstPrev.c
16 # let people experiment for a bit
17 USE_META ?= no
18 .if ${USE_META:tl} != "no"
19 SRCS+= meta.c
20 CPPFLAGS+= -DUSE_META
21 FILEMON_H ?= ${.CURDIR:H:H}/sys/dev/filemon/filemon.h
22 .if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h"
23 COPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
24 .endif
25 .endif
27 .if defined(__MINIX)
28 CPPFLAGS+= -DMAKE_MACHINE=\"${MACHINE}\" -DMAKE_MACHINE_ARCH=\"${MACHINE_ARCH}\"
29 .endif #defined(__MINIX)
31 .PATH: ${.CURDIR}/lst.lib
32 .if !defined(__MINIX)
33 SUBDIR= PSD.doc
34 .endif #!defined(__MINIX)
35 .if make(obj) || make(clean)
36 SUBDIR+= unit-tests
37 .endif
39 .include <bsd.prog.mk>
40 .include <bsd.subdir.mk>
42 CPPFLAGS+= -DMAKE_NATIVE
43 COPTS.var.c += -Wno-cast-qual
44 COPTS.job.c += -Wno-format-nonliteral
45 COPTS.parse.c += -Wno-format-nonliteral
46 COPTS.var.c += -Wno-format-nonliteral
48 .ifdef TOOLDIR
49 # this is a native netbsd build,
50 # use libutil rather than the local emalloc etc.
51 CPPFLAGS+= -DUSE_EMALLOC
52 LDADD+=-lutil
53 DPADD+=${LIBUTIL}
54 .endif
56 # A simple unit-test driver to help catch regressions
57 accept test:
58 cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}