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 $ 3 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. 7# 8# _CCVER is used to detect changes to CCVER made in Makefile's after the 9# fact. 10CCVER ?= gcc2 11_CCVER := ${CCVER} 12 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}" 20. endif 21.else 22.error "Either set CCVER to a known compiler or specify CCVER_BSD_CPU_MK" 23.endif 24 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 28# by the user. 29# 30.if defined(.DIRECTIVE_MAKEENV) 31.makeenv CCVER 32.endif 33 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. 36# 37.if !defined(NO_CPU_CFLAGS) && !defined(_CPUCFLAGS_ASSIGNED) 38_CPUCFLAGS_ASSIGNED=TRUE 39CFLAGS += ${_CPUCFLAGS} 40.endif 41 42