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