pkgsrc/devel/cpuflags/files/cpuflags.mk
abs f73e6f4726 Update cpuflags to 0.6:
Introduce make fragment to be (optionally) included in mk.conf
    Document environment variables set in cpuflags.mk
    Ensure cpuflags.Linux works on gcc 2.7.x
2001-06-29 11:24:51 +00:00

21 lines
702 B
Makefile

# $Id: cpuflags.mk,v 1.1 2001/06/29 11:24:51 abs Exp $
# Makefile include fragment to simplify use of cpuflags in pkgsrc
# abs@netbsd.org - freely distributable, no warrenties, stick no bills.
# Try to optimise based on CPU
# Does not affect Imakefiles, and any package that overrides CFLAGS/CXXFLAGS
# Sets four variables:
#
# CPU_FLAGS The output of cpuflags
# CPU_DIR CPU_FLAGS with spaces stripped (eg: for use in PACKAGES)
# CFLAGS Has CPU_FLAGS appended
# CXXFLAGS Has CPU_FLAGS appended
#
.if ! defined(CPU_FLAGS)
CPU_FLAGS!=/usr/pkg/bin/cpuflags
CPU_DIR!=echo ${CPU_FLAGS} | sed 's/ //'
MAKE_ENV+=CPU_FLAGS=${CPU_FLAGS} CPU_DIR=${CPU_DIR}
CFLAGS+=${CPU_FLAGS}
CXXFLAGS+=${CPU_FLAGS}
.endif