getconf: don't include xpg4 bits, gcc7 includes xpg6 bits for us
[unleashed.git] / share / mk / init.mk
blob81b76d52a8037ebc4282381ad32151bdbdbc3e1e
1 # $Id: init.mk,v 1.15 2017/05/07 20:27:54 sjg Exp $
3 # @(#) Copyright (c) 2002, Simon J. Gerraty
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.
12 # Please send copies of changes and bug-fixes to:
13 # sjg@crufty.net
16 .if !target(__${.PARSEFILE}__)
17 __${.PARSEFILE}__:
19 .if ${MAKE_VERSION:U0} > 20100408
20 _this_mk_dir := ${.PARSEDIR:tA}
21 .else
22 _this_mk_dir := ${.PARSEDIR}
23 .endif
25 .-include <local.init.mk>
26 .-include <${.CURDIR:H}/Makefile.inc>
27 .include <own.mk>
29 .MAIN: all
31 # should have been set by sys.mk
32 CXX_SUFFIXES?= .cc .cpp .cxx .C
34 .if !empty(WARNINGS_SET) || !empty(WARNINGS_SET_${MACHINE_ARCH})
35 .include <warnings.mk>
36 .endif
38 COPTS += ${COPTS.${.IMPSRC:T}}
39 CPPFLAGS += ${CPPFLAGS.${.IMPSRC:T}}
40 CPUFLAGS += ${CPUFLAGS.${.IMPSRC:T}}
42 CC_PG?= -pg
43 CXX_PG?= ${CC_PG}
44 CC_PIC?= -DPIC
45 CXX_PIC?= ${CC_PIC}
46 PROFFLAGS?= -DGPROF -DPROF
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
53 .if !defined(.PARSEDIR)
54 # no-op is the best we can do if not bmake.
55 .WAIT:
56 .endif
58 # define this once for consistency
59 .if empty(_SKIP_BUILD)
60 # beforebuild is a hook for things that must be done early
61 all: beforebuild .WAIT realbuild
62 .else
63 all: .PHONY
64 .warning ${_SKIP_BUILD}
65 .endif
66 beforebuild:
67 realbuild:
69 .endif