NetBSD/usr.bin/make/Makefile

60 lines
1.7 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.67 2020/01/19 19:49:36 riastradh Exp $
# @(#)Makefile 5.2 (Berkeley) 12/28/90
1993-03-21 12:45:37 +03:00
PROG= make
SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \
make.c metachar.c parse.c str.c suff.c targ.c trace.c var.c util.c
SRCS+= strlist.c
SRCS+= make_malloc.c
1993-03-21 12:45:37 +03:00
SRCS+= lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \
lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c \
lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c \
lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c \
lstMember.c lstNext.c lstOpen.c lstRemove.c lstReplace.c lstSucc.c
2006-10-26 00:05:59 +04:00
SRCS += lstPrev.c
2016-02-18 23:33:40 +03:00
USE_META ?= yes
.if ${USE_META:tl} != "no"
SRCS+= meta.c
CPPFLAGS+= -DUSE_META
USE_FILEMON ?= ktrace
.if ${USE_FILEMON:tl} != "no"
.PATH: ${.CURDIR}/filemon
SRCS+= filemon_${USE_FILEMON}.c
CPPFLAGS+= -DUSE_FILEMON
.endif
.endif
.PATH: ${.CURDIR}/lst.lib
2018-06-10 20:55:11 +03:00
SUBDIR.roff+= PSD.doc
.if make(obj) || make(clean)
SUBDIR+= unit-tests
.endif
1993-03-21 12:45:37 +03:00
.include <bsd.prog.mk>
1997-10-11 13:34:07 +04:00
.include <bsd.subdir.mk>
2001-06-09 09:17:51 +04:00
CPPFLAGS+= -DMAKE_NATIVE
COPTS.var.c += -Wno-cast-qual
COPTS.job.c += -Wno-format-nonliteral
COPTS.parse.c += -Wno-format-nonliteral
COPTS.var.c += -Wno-format-nonliteral
.ifdef TOOLDIR
# this is a native netbsd build,
# use libutil rather than the local emalloc etc.
CPPFLAGS+= -DUSE_EMALLOC
2006-08-26 22:17:41 +04:00
LDADD+=-lutil
DPADD+=${LIBUTIL}
2006-08-29 20:54:03 +04:00
.endif
2006-08-26 22:17:41 +04:00
COPTS.arch.c+= ${GCC_NO_FORMAT_TRUNCATION}
COPTS.dir.c+= ${GCC_NO_FORMAT_TRUNCATION}
COPTS.main.c+= ${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_STRINGOP_TRUNCATION}
COPTS.meta.c+= ${GCC_NO_FORMAT_TRUNCATION}
COPTS.parse.c+= ${GCC_NO_FORMAT_TRUNCATION}
2019-02-04 06:58:41 +03:00
# A simple unit-test driver to help catch regressions
accept test:
cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}