Home | History | Annotate | Line # | Download | only in make
Makefile revision 1.67
      1 #	$NetBSD: Makefile,v 1.67 2020/01/19 19:49:36 riastradh Exp $
      2 #	@(#)Makefile	5.2 (Berkeley) 12/28/90
      3 
      4 PROG=	make
      5 SRCS=	arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \
      6 	make.c metachar.c parse.c str.c suff.c targ.c trace.c var.c util.c 
      7 SRCS+=  strlist.c
      8 SRCS+=  make_malloc.c
      9 SRCS+=	lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \
     10 	lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c \
     11 	lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c \
     12 	lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c \
     13 	lstMember.c lstNext.c lstOpen.c lstRemove.c lstReplace.c lstSucc.c
     14 SRCS += lstPrev.c
     15 
     16 USE_META ?= yes
     17 .if ${USE_META:tl} != "no"
     18 SRCS+=	meta.c
     19 CPPFLAGS+= -DUSE_META
     20 USE_FILEMON ?= ktrace
     21 .if ${USE_FILEMON:tl} != "no"
     22 .PATH:	${.CURDIR}/filemon
     23 SRCS+=	filemon_${USE_FILEMON}.c
     24 CPPFLAGS+= -DUSE_FILEMON
     25 .endif
     26 .endif
     27 
     28 .PATH:	${.CURDIR}/lst.lib
     29 SUBDIR.roff+=	PSD.doc
     30 .if make(obj) || make(clean)
     31 SUBDIR+= unit-tests
     32 .endif
     33 
     34 .include <bsd.prog.mk>
     35 .include <bsd.subdir.mk>
     36 
     37 CPPFLAGS+= -DMAKE_NATIVE
     38 COPTS.var.c += -Wno-cast-qual
     39 COPTS.job.c += -Wno-format-nonliteral
     40 COPTS.parse.c += -Wno-format-nonliteral
     41 COPTS.var.c += -Wno-format-nonliteral
     42 
     43 .ifdef TOOLDIR
     44 # this is a native netbsd build, 
     45 # use libutil rather than the local emalloc etc.
     46 CPPFLAGS+= -DUSE_EMALLOC
     47 LDADD+=-lutil
     48 DPADD+=${LIBUTIL}
     49 .endif
     50 
     51 COPTS.arch.c+=	${GCC_NO_FORMAT_TRUNCATION}
     52 COPTS.dir.c+=	${GCC_NO_FORMAT_TRUNCATION}
     53 COPTS.main.c+=	${GCC_NO_FORMAT_TRUNCATION} ${GCC_NO_STRINGOP_TRUNCATION}
     54 COPTS.meta.c+=	${GCC_NO_FORMAT_TRUNCATION}
     55 COPTS.parse.c+=	${GCC_NO_FORMAT_TRUNCATION}
     56 
     57 # A simple unit-test driver to help catch regressions
     58 accept test:
     59 	cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
     60