2012-06-06 16:24:31 +02:00
|
|
|
# $NetBSD: Makefile,v 1.55 2011/08/14 13:06:09 christos Exp $
|
2010-02-04 17:52:54 +01:00
|
|
|
# @(#)Makefile 5.2 (Berkeley) 12/28/90
|
|
|
|
|
|
|
|
PROG= make
|
|
|
|
SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \
|
|
|
|
make.c parse.c str.c suff.c targ.c trace.c var.c util.c
|
|
|
|
SRCS+= strlist.c
|
|
|
|
SRCS+= make_malloc.c
|
|
|
|
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
|
|
|
|
SRCS += lstPrev.c
|
|
|
|
|
2012-06-06 16:24:31 +02:00
|
|
|
# let people experiment for a bit
|
|
|
|
USE_META ?= no
|
|
|
|
.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
|
2010-02-04 17:52:54 +01:00
|
|
|
.endif
|
2012-06-06 16:24:31 +02:00
|
|
|
|
|
|
|
# For MINIX
|
|
|
|
CPPFLAGS+= -DHAVE_SETENV -DHAVE_STRERROR -DHAVE_STRDUP \
|
|
|
|
-DHAVE_STRFTIME -DHAVE_VSNPRINTF -DUSE_SELECT
|
|
|
|
|
|
|
|
CPPFLAGS+= -DMAKE_MACHINE=\"${MACHINE}\" -DMAKE_MACHINE_ARCH=\"${MACHINE_ARCH}\"
|
|
|
|
|
|
|
|
|
|
|
|
.PATH: ${.CURDIR}/lst.lib
|
|
|
|
#.if make(install)
|
|
|
|
#SUBDIR= PSD.doc
|
|
|
|
#.endif
|
2010-02-04 17:52:54 +01:00
|
|
|
.if make(obj) || make(clean)
|
|
|
|
SUBDIR+= unit-tests
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
.include <bsd.subdir.mk>
|
|
|
|
|
2012-06-06 16:24:31 +02:00
|
|
|
.ifdef TOOLDIR
|
2010-02-04 17:52:54 +01:00
|
|
|
CPPFLAGS+= -DMAKE_NATIVE
|
2012-06-06 16:24:31 +02: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
|
2010-02-04 17:52:54 +01:00
|
|
|
|
|
|
|
# this is a native netbsd build,
|
|
|
|
# use libutil rather than the local emalloc etc.
|
|
|
|
CPPFLAGS+= -DUSE_EMALLOC
|
|
|
|
LDADD+=-lutil
|
|
|
|
DPADD+=${LIBUTIL}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# A simple unit-test driver to help catch regressions
|
|
|
|
accept test:
|
2010-06-26 01:25:48 +02:00
|
|
|
cd ${.CURDIR}/unit-tests && ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
|