summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Kacur <jkacur@redhat.com>2015-10-05 19:52:47 +0200
committerJohn Kacur <jkacur@redhat.com>2015-10-06 11:27:03 +0200
commit7faa666c373ff91657849554bba1c3450cd21932 (patch)
tree6768422f43c49752370226584b661aa87e3d01a6
parent675f5512022b6ce1427f11e664e2e45e37048f68 (diff)
downloadrt-tests-7faa666c373ff91657849554bba1c3450cd21932.tar.gz
Makefile: Document certain compiling options
- Document compiling with and without NUMA, explaining the defaults - Document compiling with HAVE_PARSE_CPUSTRING_ALL Reorganize these options a little for readability Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r--Makefile31
1 files changed, 21 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 25024c9..ace2c80 100644
--- a/Makefile
+++ b/Makefile
@@ -24,20 +24,10 @@ bindir ?= $(prefix)/bin
mandir ?= $(prefix)/share/man
srcdir ?= $(prefix)/src
-machinetype = $(shell $(CC) -dumpmachine | \
- sed -e 's/-.*//' -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/')
-
CFLAGS ?= -Wall -Wno-nonnull
CPPFLAGS += -D_GNU_SOURCE -Isrc/include
LDFLAGS ?=
-ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),)
-NUMA := 1
-ifdef HAVE_PARSE_CPUSTRING_ALL
- CFLAGS += -DHAVE_PARSE_CPUSTRING_ALL
-endif
-endif
-
PYLIB ?= $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()')
ifndef DEBUG
@@ -46,9 +36,30 @@ else
CFLAGS += -O0 -g
endif
+# We make some gueses on how to compile rt-tests based on the machine type
+# These can often be overridden
+machinetype = $(shell $(CC) -dumpmachine | \
+ sed -e 's/-.*//' -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/')
+
+# The default is to assume you have libnuma installed, which is fine to do
+# even on non-numa machines. If you don't want to install the numa libs, for
+# example, they might not be available in an embedded environment, then
+# compile with
+# make NUMA=0
+ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),)
+NUMA := 1
+endif
+
+# The default is to assume that you only have numa_parse_cpustring
+# If you are sure you have a version of libnuma with numa_parse_cpustring_all
+# then compile with
+# make HAVE_PARSE_CPUSTRING_ALL=1
ifeq ($(NUMA),1)
CFLAGS += -DNUMA
NUMA_LIBS = -lnuma
+ifdef HAVE_PARSE_CPUSTRING_ALL
+ CFLAGS += -DHAVE_PARSE_CPUSTRING_ALL
+endif
endif
# Bionic (android) does not have: