2020-01-19 22:49:36 +03:00
|
|
|
# $NetBSD: Makefile,v 1.67 2020/01/19 19:49:36 riastradh Exp $
|
1995-06-14 19:18:37 +04:00
|
|
|
# @(#)Makefile 5.2 (Berkeley) 12/28/90
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
PROG= make
|
1994-03-05 03:34:29 +03:00
|
|
|
SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \
|
2015-06-17 20:43:23 +03:00
|
|
|
make.c metachar.c parse.c str.c suff.c targ.c trace.c var.c util.c
|
2008-12-21 01:41:53 +03:00
|
|
|
SRCS+= strlist.c
|
2009-01-24 14:59:39 +03:00
|
|
|
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
|
2010-09-13 19:36:57 +04:00
|
|
|
.if ${USE_META:tl} != "no"
|
|
|
|
SRCS+= meta.c
|
|
|
|
CPPFLAGS+= -DUSE_META
|
2020-01-19 22:49:36 +03:00
|
|
|
USE_FILEMON ?= ktrace
|
2020-01-19 22:42:32 +03:00
|
|
|
.if ${USE_FILEMON:tl} != "no"
|
2020-01-19 22:49:36 +03:00
|
|
|
.PATH: ${.CURDIR}/filemon
|
|
|
|
SRCS+= filemon_${USE_FILEMON}.c
|
2020-01-19 22:42:32 +03:00
|
|
|
CPPFLAGS+= -DUSE_FILEMON
|
2019-12-19 10:14:07 +03:00
|
|
|
.endif
|
2010-09-13 19:36:57 +04:00
|
|
|
.endif
|
|
|
|
|
1997-05-09 01:11:01 +04:00
|
|
|
.PATH: ${.CURDIR}/lst.lib
|
2018-06-10 20:55:11 +03:00
|
|
|
SUBDIR.roff+= PSD.doc
|
2003-07-29 02:52:10 +04:00
|
|
|
.if make(obj) || make(clean)
|
|
|
|
SUBDIR+= unit-tests
|
|
|
|
.endif
|
1994-06-25 09:57:47 +04:00
|
|
|
|
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
|
|
|
|
2009-03-20 23:48:00 +03:00
|
|
|
CPPFLAGS+= -DMAKE_NATIVE
|
2011-08-14 17:06:09 +04:00
|
|
|
COPTS.var.c += -Wno-cast-qual
|
|
|
|
COPTS.job.c += -Wno-format-nonliteral
|
|
|
|
COPTS.parse.c += -Wno-format-nonliteral
|
|
|
|
COPTS.var.c += -Wno-format-nonliteral
|
2003-07-29 02:52:10 +04:00
|
|
|
|
2006-11-02 02:48:20 +03:00
|
|
|
.ifdef TOOLDIR
|
|
|
|
# this is a native netbsd build,
|
|
|
|
# use libutil rather than the local emalloc etc.
|
2008-10-07 02:09:21 +04:00
|
|
|
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
|
|
|
|
2019-10-13 10:28:04 +03: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
|
|
|
|
2003-07-29 02:52:10 +04:00
|
|
|
# A simple unit-test driver to help catch regressions
|
|
|
|
accept test:
|
2012-05-31 01:54:23 +04:00
|
|
|
cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
|