xref: /dragonfly/usr.bin/bmake/Makefile (revision ec1c3f3a)
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 $
4
5PROG=	make
6SRCS=	\
7	arch.c		\
8	buf.c		\
9	compat.c	\
10	cond.c		\
11	dir.c		\
12	for.c		\
13	hash.c		\
14	job.c		\
15	lst.c		\
16	main.c		\
17	make.c		\
18	make_malloc.c	\
19	meta.c		\
20	metachar.c	\
21	parse.c		\
22	str.c		\
23	stresep.c	\
24	suff.c		\
25	targ.c		\
26	trace.c		\
27	util.c		\
28	var.c
29
30# you can use this Makefile if you have an earlier version of bmake.
31srcdir= ${.CURDIR}/../../contrib/bmake
32
33# Base version on src date
34MAKE_VERSION= 20220928
35.if defined(BOOTSTRAPPING)
36DEFAULT_SYS_PATH = ${.CURDIR}/../../share/mk
37.else
38DEFAULT_SYS_PATH = /usr/share/mk
39.endif
40
41# move vital dports information to bmake for performance reasons
42DFLYVERSION!=	awk '/^\#define[[:blank:]]__DragonFly_version/ {print $$3}' \
43		< ${.CURDIR}/../../sys/sys/param.h
44OSREL!=		echo ${DFLYVERSION} | \
45		awk '{a=int($$1/100000); b=int(($$1-(a*100000))/100); \
46			print a "." b}'
47
48CPPFLAGS+=	-DUSE_EMALLOC
49CPPFLAGS+=	-DUSE_META
50CPPFLAGS+=	-DMAKE_NATIVE
51CFLAGS+=	${CPPFLAGS}
52CFLAGS+=	-D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\"
53CFLAGS+=	-I${.CURDIR}
54CFLAGS+=	-I${.OBJDIR}
55CFLAGS+=	-I${srcdir}
56CFLAGS+=	-DHAVE_CONFIG_H -DHAVE_NBTOOL_CONFIG_H=0
57CFLAGS+=	-DCCVER=\"${CCVER}\"
58CFLAGS+=	-DDFVER=\"${DFLYVERSION}\" -DOSREL=\"${OSREL}\"
59CFLAGS+=	-DNO_PWD_OVERRIDE
60CFLAGS+=	${XDEFS}
61CFLAGS+=	${CFLAGS_${.TARGET:T}}
62CFLAGS+=	${COPTS.${.ALLSRC:M*.c:T}}
63COPTS.main.c=	"-DMAKE_VERSION=\"${MAKE_VERSION}\""
64COPTS.var.c=	-Wno-cast-qual
65COPTS.job.c=	-Wno-format-nonliteral
66COPTS.parse.c=	-Wno-format-nonliteral
67COPTS.var.c=	-Wno-format-nonliteral
68
69WARNS=	3
70
71.PATH:	${srcdir}
72
73MAN=	make.1
74make.1:	bmake.1
75	@sed -e '/^.Nm/s/bmake/${PROG}/' -e 's/Xr make 1/Nm bmake/' \
76	    -e 's/ $$//' -e 's/^make$$/.Nm/' -e 's/ NetBSD$$/\'$$'\n.Nx/' \
77	    -e '/^NetBSD .\..$$/s/NetBSD/.Nx/' \
78	    < ${.ALLSRC} > ${.TARGET}
79
80CLEANFILES+=	make.1
81
82.include <bsd.prog.mk>
83