diff options
author | Clark Williams <williams@redhat.com> | 2011-09-26 14:49:36 -0500 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2011-09-26 14:49:36 -0500 |
commit | cb1540450329d745f528e38f54a4906dab91eb96 (patch) | |
tree | a3305cc83a63a305796b14459690a39fba739032 | |
parent | e1fab5b28076ec1f61601498f393c08a0cb817cd (diff) | |
download | rt-tests-cb1540450329d745f528e38f54a4906dab91eb96.tar.gz |
Modified Makefile to be smarter about turning on/off NUMA compile
Combined Uwe Kleine-König and Frank Rowand's suggestions into a
Makefile modification that tries to be smart about turning on
NUMA, while allowing it to be explicitly enabled/disabled via
command line options
Signed-off-by: Clark Williams <williams@redhat.com>
-rw-r--r-- | Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -14,7 +14,11 @@ bindir ?= $(prefix)/bin mandir ?= $(prefix)/share/man srcdir ?= $(prefix)/src -NUMA := 1 +machinetype = $(shell uname -m | \ + sed -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/') +ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),) +NUMA := 1 +endif CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include @@ -26,7 +30,7 @@ else CFLAGS += -O0 -g endif -ifdef NUMA +ifeq ($(NUMA),1) CFLAGS += -DNUMA NUMA_LIBS = -lnuma endif |