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.6 2004/03/22 20:58:15 dillon 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
13 .if ${CCVER} == "gcc2"
14 . include <bsd.cpu.gcc2.mk>
15 .elif ${CCVER} == "gcc3"
16 . include <bsd.cpu.gcc3.mk>
17 .elif defined(CCVER_BSD_CPU_MK)
18 . if ${CCVER_BSD_CPU_MK} != ""
19 . include "${CCVER_BSD_CPU_MK}"
22 .error "Either set CCVER to a known compiler or specify CCVER_BSD_CPU_MK"
25 # /usr/bin/cc depend on the CCVER environment variable, make sure CCVER is
26 # exported for /usr/bin/cc and friends. Note that CCVER is unsupported when
27 # cross compiling from 4.x or older versions of DFly and should not be set
30 .if defined(.DIRECTIVE_MAKEENV)
34 # We can reassign _CPUCFLAGS and CFLAGS will evaluate properly to the
35 # new value, we do not have to add the variable to CFLAGS twice.
37 .if !defined(NO_CPU_CFLAGS) && !defined(_CPUCFLAGS_ASSIGNED)
38 _CPUCFLAGS_ASSIGNED=TRUE
39 CFLAGS += ${_CPUCFLAGS}