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