xref: /dragonfly/contrib/bmake/mk/init.mk (revision cae2835b)
1# $Id: init.mk,v 1.12 2016/04/05 15:58:37 sjg Exp $
2#
3#	@(#) Copyright (c) 2002, Simon J. Gerraty
4#
5#	This file is provided in the hope that it will
6#	be of use.  There is absolutely NO WARRANTY.
7#	Permission to copy, redistribute or otherwise
8#	use this file is hereby granted provided that
9#	the above copyright notice and this notice are
10#	left intact.
11#
12#	Please send copies of changes and bug-fixes to:
13#	sjg@crufty.net
14#
15
16.if !target(__${.PARSEFILE}__)
17__${.PARSEFILE}__:
18
19.if ${MAKE_VERSION:U0} > 20100408
20_this_mk_dir := ${.PARSEDIR:tA}
21.else
22_this_mk_dir := ${.PARSEDIR}
23.endif
24
25.-include <local.init.mk>
26.-include <${.CURDIR:H}/Makefile.inc>
27.include <own.mk>
28
29.MAIN:		all
30
31# should have been set by sys.mk
32CXX_SUFFIXES?= .cc .cpp .cxx .C
33
34.if !empty(WARNINGS_SET) || !empty(WARNINGS_SET_${MACHINE_ARCH})
35.include <warnings.mk>
36.endif
37
38COPTS += ${COPTS.${.IMPSRC:T}}
39CPPFLAGS += ${CPPFLAGS.${.IMPSRC:T}}
40CPUFLAGS += ${CPUFLAGS.${.IMPSRC:T}}
41
42CC_PG?= -pg
43CXX_PG?= ${CC_PG}
44CC_PIC?= -DPIC
45CXX_PIC?= ${CC_PIC}
46PROFFLAGS?= -DGPROF -DPROF
47
48.if ${.MAKE.LEVEL:U1} == 0 && ${BUILD_AT_LEVEL0:Uyes:tl} == "no"
49# this tells lib.mk and prog.mk to not actually build anything
50_SKIP_BUILD = not building at level 0
51.endif
52
53.if !empty(_SKIP_BUILD)
54all: .PHONY
55.warning ${_SKIP_BUILD}
56.endif
57.endif
58