diff options
Diffstat (limited to 'devel/cpuflags/files/cpuflags.mk')
-rw-r--r-- | devel/cpuflags/files/cpuflags.mk | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/devel/cpuflags/files/cpuflags.mk b/devel/cpuflags/files/cpuflags.mk index 2b3aaa37b98..e01269ae74d 100644 --- a/devel/cpuflags/files/cpuflags.mk +++ b/devel/cpuflags/files/cpuflags.mk @@ -1,4 +1,4 @@ -# $Id: cpuflags.mk,v 1.3 2002/01/03 11:54:47 abs Exp $ +# $Id: cpuflags.mk,v 1.4 2002/06/27 20:49:02 abs Exp $ # Makefile include fragment to simplify use of cpuflags in pkgsrc # abs@netbsd.org - freely distributable, no warrenties, stick no bills. @@ -14,16 +14,27 @@ # LOWER_CPU_DIR As CPU_FLAGS but all lower case -.if ! defined(CPU_FLAGS) +.ifndef CPU_FLAGS + CPU_FLAGS!=/usr/pkg/bin/cpuflags CPU_DIR!=echo ${CPU_FLAGS} | sed 's/ //' LOWER_CPU_DIR!=echo ${CPU_DIR} | tr A-Z a-z -CFLAGS+=${CPU_FLAGS} -CXXFLAGS+=${CPU_FLAGS} - # Make the flags available to make -MAKE_ENV+=CPU_FLAGS=${CPU_FLAGS} CPU_DIR=${CPU_DIR} +MAKE_ENV+=CPU_FLAGS=${CPU_FLAGS} CPU_DIR=${CPU_DIR} LOWER_CPU_DIR=${LOWER_CPU_DIR} + +.endif +.ifdef BSD_PKG_MK + +# Try to catch the varuous package mechanisms +CFLAGS+=${CPU_FLAGS} +CXXFLAGS+=${CPU_FLAGS} # Override CCOPTIONS for imake MAKE_FLAGS+=CCOPTIONS=${CPU_FLAGS} + +.else + +# Assume we are in the standard build system, only touch COPTS +COPTS+=${CPU_FLAGS} + .endif |