1 1.68 riastrad # $NetBSD: Makefile,v 1.68 2020/01/19 19:50:54 riastradh Exp $ 2 1.8 christos # @(#)Makefile 5.2 (Berkeley) 12/28/90 3 1.1 cgd 4 1.1 cgd PROG= make 5 1.4 cgd SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ 6 1.58 christos make.c metachar.c parse.c str.c suff.c targ.c trace.c var.c util.c 7 1.45 dsl SRCS+= strlist.c 8 1.46 dsl SRCS+= make_malloc.c 9 1.1 cgd SRCS+= lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \ 10 1.1 cgd lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c \ 11 1.1 cgd lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c \ 12 1.1 cgd lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c \ 13 1.1 cgd lstMember.c lstNext.c lstOpen.c lstRemove.c lstReplace.c lstSucc.c 14 1.40 dsl SRCS += lstPrev.c 15 1.40 dsl 16 1.59 sjg USE_META ?= yes 17 1.51 sjg .if ${USE_META:tl} != "no" 18 1.68 riastrad 19 1.51 sjg SRCS+= meta.c 20 1.51 sjg CPPFLAGS+= -DUSE_META 21 1.68 riastrad 22 1.67 riastrad USE_FILEMON ?= ktrace 23 1.66 riastrad .if ${USE_FILEMON:tl} != "no" 24 1.68 riastrad 25 1.67 riastrad .PATH: ${.CURDIR}/filemon 26 1.67 riastrad SRCS+= filemon_${USE_FILEMON}.c 27 1.66 riastrad CPPFLAGS+= -DUSE_FILEMON 28 1.68 riastrad 29 1.68 riastrad .if ${USE_FILEMON} == "dev" 30 1.68 riastrad FILEMON_H ?= /usr/include/dev/filemon/filemon.h 31 1.68 riastrad .if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" 32 1.68 riastrad COPTS.filemon_dev.c += -DHAVE_FILEMON_H -I${FILEMON_H:H} 33 1.65 maxv .endif 34 1.68 riastrad .endif # USE_FILEMON == dev 35 1.68 riastrad 36 1.68 riastrad .endif # USE_FILEMON 37 1.68 riastrad 38 1.68 riastrad .endif # USE_META 39 1.51 sjg 40 1.14 gwr .PATH: ${.CURDIR}/lst.lib 41 1.60 christos SUBDIR.roff+= PSD.doc 42 1.29 sjg .if make(obj) || make(clean) 43 1.29 sjg SUBDIR+= unit-tests 44 1.29 sjg .endif 45 1.1 cgd 46 1.1 cgd .include <bsd.prog.mk> 47 1.16 mycroft .include <bsd.subdir.mk> 48 1.24 sjg 49 1.47 perry CPPFLAGS+= -DMAKE_NATIVE 50 1.55 christos COPTS.var.c += -Wno-cast-qual 51 1.55 christos COPTS.job.c += -Wno-format-nonliteral 52 1.55 christos COPTS.parse.c += -Wno-format-nonliteral 53 1.55 christos COPTS.var.c += -Wno-format-nonliteral 54 1.29 sjg 55 1.41 sjg .ifdef TOOLDIR 56 1.41 sjg # this is a native netbsd build, 57 1.41 sjg # use libutil rather than the local emalloc etc. 58 1.44 joerg CPPFLAGS+= -DUSE_EMALLOC 59 1.37 christos LDADD+=-lutil 60 1.37 christos DPADD+=${LIBUTIL} 61 1.38 christos .endif 62 1.37 christos 63 1.63 mrg COPTS.arch.c+= ${GCC_NO_FORMAT_TRUNCATION} 64 1.63 mrg COPTS.dir.c+= ${GCC_NO_FORMAT_TRUNCATION} 65 1.63 mrg COPTS.main.c+= ${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_STRINGOP_TRUNCATION} 66 1.63 mrg COPTS.meta.c+= ${GCC_NO_FORMAT_TRUNCATION} 67 1.63 mrg COPTS.parse.c+= ${GCC_NO_FORMAT_TRUNCATION} 68 1.61 mrg 69 1.29 sjg # A simple unit-test driver to help catch regressions 70 1.29 sjg accept test: 71 1.56 sjg cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET} 72