NetBSD/usr.bin/make/Makefile

56 lines
1.6 KiB
Makefile
Raw Normal View History

2019-02-04 06:58:41 +03:00
# $NetBSD: Makefile,v 1.61 2019/02/04 03:58:41 mrg 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
FILEMON_H ?= ${.CURDIR:H:H}/sys/dev/filemon/filemon.h
.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h"
COPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
.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
2019-02-04 06:58:41 +03:00
.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
COPTS.arch.c += -Wno-error=format-truncation
.endif
# 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}