Catch up with renaming of macros IRQn -> ICU_IRQn in i386/icu/icu.h,1.7
[dragonfly.git] / share / mk / bsd.cpu.mk
blob297eb8d429c4910addc31e3a3cfe401849369588
1 # $FreeBSD: src/share/mk/bsd.cpu.mk,v 1.2.2.5 2002/07/19 08:09:32 ru Exp $
2 # $DragonFly: src/share/mk/bsd.cpu.mk,v 1.11 2005/06/05 22:43:19 corecode Exp $
4 # include compiler-specific bsd.cpu.mk. Note that CCVER may or may not
5 # be passed as an environment variable. If not set we make it consistent
6 # within make but do not otherwise export it.
8 # _CCVER is used to detect changes to CCVER made in Makefile's after the
9 # fact.
11 # HOST_CCVER is used by the native system compiler and defaults to CCVER.
12 # It is not subject to local CCVER overrides in Makefiles and it is inherited
13 # by all sub-makes.
15 CCVER ?= gcc34
16 _CCVER := ${CCVER}
17 HOST_CCVER?= ${_CCVER}
19 .if ${CCVER} == "gcc2"
20 . include <bsd.cpu.gcc2.mk>
21 .elif ${CCVER} == "gcc3"
22 . include <bsd.cpu.gcc3.mk>
23 .elif ${CCVER} == "gcc34"
24 . include <bsd.cpu.gcc34.mk>
25 .elif ${CCVER} == "gcc40"
26 . include <bsd.cpu.gcc40.mk>
27 .elif defined(CCVER_BSD_CPU_MK)
28 . if ${CCVER_BSD_CPU_MK} != ""
29 . include "${CCVER_BSD_CPU_MK}"
30 . endif
31 .else
32 .error "Either set CCVER to a known compiler or specify CCVER_BSD_CPU_MK"
33 .endif
35 # /usr/bin/cc depend on the CCVER environment variable, make sure CCVER is
36 # exported for /usr/bin/cc and friends. Note that CCVER is unsupported when
37 # cross compiling from 4.x or older versions of DFly and should not be set
38 # by the user.
40 .if defined(.DIRECTIVE_MAKEENV)
41 .makeenv CCVER
42 .makeenv HOST_CCVER
43 .endif
45 # We can reassign _CPUCFLAGS and CFLAGS will evaluate properly to the
46 # new value, we do not have to add the variable to CFLAGS twice.
48 .if !defined(NO_CPU_CFLAGS) && !defined(_CPUCFLAGS_ASSIGNED)
49 _CPUCFLAGS_ASSIGNED=TRUE
50 CFLAGS += ${_CPUCFLAGS}
51 .endif