summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Kacur <jkacur@redhat.com>2015-10-06 07:44:07 +0200
committerJohn Kacur <jkacur@redhat.com>2015-10-06 11:27:10 +0200
commitd3bd5df7070ff05c9bade7b7bfe263d9f9240258 (patch)
treefbb010bb0de1d3ce744cccee34fc510d0e1db5b7
parent8d26afdc2d2fd495e701b56adac44ac9eecf151f (diff)
downloadrt-tests-d3bd5df7070ff05c9bade7b7bfe263d9f9240258.tar.gz
Bionic: Move android functionality into it's own arch Makefile
- Make the Makefile more readable by moving android functionality to it's own Makefile. - Don't evaluate TARGETS until after including arch Makefiles Signed-off-by: John Kacur <jkacur@redhat.com> Tested-by: Henrik Austad <haustad@cisco.com>
-rw-r--r--Makefile30
-rw-r--r--src/arch/bionic/Makefile25
2 files changed, 29 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index ef52616..7686ed1 100644
--- a/Makefile
+++ b/Makefile
@@ -16,8 +16,6 @@ sources = cyclictest.c \
sigwaittest.c \
svsematest.c
-TARGETS = $(sources:.c=)
-
LIBS = -lrt -lpthread
RTTESTLIB = -lrttest -L$(OBJDIR)
EXTRA_LIBS ?= -ldl # for get_cpu
@@ -70,30 +68,10 @@ ifdef HAVE_PARSE_CPUSTRING_ALL
endif
endif
-# Bionic (android) does not have:
-# - pthread barriers
-# - pthread_[gs]etaffinity
-#
-# Typically see something like "aarch64-linux-android"
-ifeq (android,$(ostype))
- USE_BIONIC := 1
- CFLAGS += -DNO_PTHREAD_BARRIER
- CFLAGS += -DNO_PTHREAD_SETAFFINITY
-
- LDFLAGS += -pie
-# -lrt and -lpthread is in standard bionic library, no standalone library
- LIBS := $(filter-out -lrt,$(LIBS))
- LIBS := $(filter-out -lpthread,$(LIBS))
-
-# BIONIC does not support PI, barriers and have different files in
-# include/. This means that currently, only these binaries will compile
-# and link properly:
-# - cyclictest
-# - hackbench
-# - hwlatdetect
- sources := cyclictest.c hackbench.c hwlatdetect.c
- TARGETS = $(sources:.c=)
-endif
+# Include any arch specific makefiles here. Make sure that TARGETS aren't
+# evaluated until AFTER this include
+include src/arch/bionic/Makefile
+TARGETS = $(sources:.c=)
VPATH = src/cyclictest:
VPATH += src/signaltest:
diff --git a/src/arch/bionic/Makefile b/src/arch/bionic/Makefile
new file mode 100644
index 0000000..410d2c9
--- /dev/null
+++ b/src/arch/bionic/Makefile
@@ -0,0 +1,25 @@
+
+# Bionic (android) does not have:
+# - pthread barriers
+# - pthread_[gs]etaffinity
+#
+# Typically see something like "aarch64-linux-android"
+ifeq (android,$(ostype))
+ USE_BIONIC := 1
+ CFLAGS += -DNO_PTHREAD_BARRIER
+ CFLAGS += -DNO_PTHREAD_SETAFFINITY
+
+ LDFLAGS += -pie
+# -lrt and -lpthread is in standard bionic library, no standalone library
+ LIBS := $(filter-out -lrt,$(LIBS))
+ LIBS := $(filter-out -lpthread,$(LIBS))
+
+# BIONIC does not support PI, barriers and has different files in
+# include/. This means that currently, only these binaries will compile
+# and link properly:
+# - cyclictest
+# - hackbench
+# - hwlatdetect
+ sources := cyclictest.c hackbench.c hwlatdetect.c
+endif
+