sbin/mount_hammer: Use calloc(3) and cleanups
[dragonfly.git] / usr.bin / bmake / Makefile
blob25cb789440f1375d90548a6f0815005760af8725
1 # $NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $
2 # @(#)Makefile 5.2 (Berkeley) 12/28/90
3 # $Id: Makefile.in,v 1.174 2012/10/10 18:46:24 sjg Exp $
5 PROG= make
6 SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \
7 make.c parse.c str.c suff.c targ.c trace.c var.c util.c
8 SRCS+= strlist.c
9 SRCS+= make_malloc.c
10 SRCS+= lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \
11 lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c \
12 lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c \
13 lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c \
14 lstMember.c lstNext.c lstOpen.c lstRemove.c lstReplace.c lstSucc.c
15 SRCS += lstPrev.c
17 SRCS+= stresep.c
18 SRCS+= meta.c metachar.c
20 # you can use this Makefile if you have an earlier version of bmake.
21 srcdir= ${.CURDIR}/../../contrib/bmake
23 # Base version on src date
24 MAKE_VERSION= 20160818
25 .if defined(BOOTSTRAPPING)
26 DEFAULT_SYS_PATH = ${.CURDIR}/../../share/mk
27 .else
28 DEFAULT_SYS_PATH = /usr/share/mk:.../share/mk
29 .endif
31 # move vital dports information to bmake for performance reasons
32 DFLYVERSION!= awk '/^\#define[[:blank:]]__DragonFly_version/ {print $$3}' \
33 < ${.CURDIR}/../../sys/sys/param.h
34 OSREL!= echo ${DFLYVERSION} | \
35 awk '{a=int($$1/100000); b=int(($$1-(a*100000))/100); \
36 print a "." b}'
38 CPPFLAGS+= -DUSE_EMALLOC
39 CPPFLAGS+= -DUSE_META
40 CPPFLAGS+= -DMAKE_NATIVE
41 CFLAGS+= ${CPPFLAGS}
42 CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\"
43 CFLAGS+= -I${.CURDIR}
44 CFLAGS+= -I${.OBJDIR}
45 CFLAGS+= -I${srcdir}
46 CFLAGS+= -DHAVE_CONFIG_H
47 CFLAGS+= -DCCVER=\"${CCVER}\"
48 CFLAGS+= -DDFVER=\"${DFLYVERSION}\" -DOSREL=\"${OSREL}\"
49 CFLAGS+= -DNO_PWD_OVERRIDE
50 CFLAGS+= ${XDEFS}
51 CFLAGS+= ${CFLAGS_${.TARGET:T}}
52 CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T}}
53 COPTS.main.c= "-DMAKE_VERSION=\"${MAKE_VERSION}\""
54 COPTS.var.c= -Wno-cast-qual
55 COPTS.job.c= -Wno-format-nonliteral
56 COPTS.parse.c= -Wno-format-nonliteral
57 COPTS.var.c= -Wno-format-nonliteral
59 DPADD= ${LIBUTIL}
60 LDADD= -lutil
62 .PATH: ${srcdir}
63 .PATH: ${srcdir}/lst.lib
65 MAN= make.1
66 make.1: bmake.1
67 @sed -e '/^.Nm/s/bmake/${PROG}/' -e 's/Xr make 1/Nm bmake/' \
68 -e 's/ $$//' -e 's/^make$$/.Nm/' -e 's/ NetBSD$$/\'$$'\n.Nx/' \
69 -e '/^NetBSD .\..$$/s/NetBSD/.Nx/' \
70 < ${.ALLSRC} > ${.TARGET}
72 CLEANFILES+= make.1
74 .include <bsd.prog.mk>