Makefile revision 1.72
11.72Srillig# $NetBSD: Makefile,v 1.72 2020/07/25 20:50:00 rillig Exp $ 21.8Schristos# @(#)Makefile 5.2 (Berkeley) 12/28/90 31.1Scgd 41.1ScgdPROG= make 51.70SrilligSRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c 61.70SrilligSRCS+= make.c make_malloc.c metachar.c parse.c 71.72SrilligSRCS+= str.c strlist.c suff.c targ.c trace.c var.c util.c 81.70SrilligSRCS+= lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c 91.70SrilligSRCS+= lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c 101.70SrilligSRCS+= lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c 111.70SrilligSRCS+= lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c lstMember.c 121.70SrilligSRCS+= lstNext.c lstOpen.c lstPrev.c lstRemove.c lstReplace.c lstSucc.c 131.40Sdsl 141.71SrilligUSE_META?= yes 151.51Ssjg.if ${USE_META:tl} != "no" 161.68Sriastrad 171.71SrilligSRCS+= meta.c 181.71SrilligCPPFLAGS+= -DUSE_META 191.68Sriastrad 201.71SrilligUSE_FILEMON?= ktrace 211.72Srillig. if ${USE_FILEMON:tl} != "no" 221.68Sriastrad 231.67Sriastrad.PATH: ${.CURDIR}/filemon 241.71SrilligSRCS+= filemon_${USE_FILEMON}.c 251.71SrilligCPPFLAGS+= -DUSE_FILEMON 261.71SrilligCPPFLAGS+= -DUSE_FILEMON_${USE_FILEMON:tu} 271.68Sriastrad 281.72Srillig. if ${USE_FILEMON} == "dev" 291.71SrilligFILEMON_H?= /usr/include/dev/filemon/filemon.h 301.72Srillig. if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" 311.71SrilligCOPTS.filemon_dev.c+= \ 321.71Srillig -DHAVE_FILEMON_H -I${FILEMON_H:H} 331.72Srillig. endif 341.72Srillig. endif 351.72Srillig. endif 361.65Smaxv.endif 371.51Ssjg 381.14Sgwr.PATH: ${.CURDIR}/lst.lib 391.60SchristosSUBDIR.roff+= PSD.doc 401.29Ssjg.if make(obj) || make(clean) 411.71SrilligSUBDIR+= unit-tests 421.29Ssjg.endif 431.1Scgd 441.1Scgd.include <bsd.prog.mk> 451.16Smycroft.include <bsd.subdir.mk> 461.24Ssjg 471.71SrilligCPPFLAGS+= -DMAKE_NATIVE 481.71SrilligCOPTS.var.c+= -Wno-cast-qual 491.71SrilligCOPTS.job.c+= -Wno-format-nonliteral 501.71SrilligCOPTS.parse.c+= -Wno-format-nonliteral 511.71SrilligCOPTS.var.c+= -Wno-format-nonliteral 521.29Ssjg 531.72Srillig.if defined(TOOLDIR) 541.71Srillig# This is a native NetBSD build, use libutil rather than the local emalloc etc. 551.71SrilligCPPFLAGS+= -DUSE_EMALLOC 561.71SrilligLDADD+= -lutil 571.71SrilligDPADD+= ${LIBUTIL} 581.38Schristos.endif 591.37Schristos 601.63SmrgCOPTS.arch.c+= ${GCC_NO_FORMAT_TRUNCATION} 611.63SmrgCOPTS.dir.c+= ${GCC_NO_FORMAT_TRUNCATION} 621.63SmrgCOPTS.main.c+= ${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_STRINGOP_TRUNCATION} 631.63SmrgCOPTS.meta.c+= ${GCC_NO_FORMAT_TRUNCATION} 641.63SmrgCOPTS.parse.c+= ${GCC_NO_FORMAT_TRUNCATION} 651.61Smrg 661.29Ssjg# A simple unit-test driver to help catch regressions 671.69Ssjgaccept test: .MAKE 681.56Ssjg cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET} 69