From 2501929ccc46bf2c9566a2c7ea8a87befec867c3 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 22 Apr 2014 11:09:41 -0600 Subject: [PATCH] assume we can't use ARMv7 instructions on non-iOS platforms by default The only Linux/ARM machine I have access to does not support ARMv7. I don't know how common that is in general, but this seems like the safe default. You can always override it on the command line. I've also broken the test target into build-test and run-test subtargets, which can be useful when you're building on a shared filesystem and running the tests on another machine (without using the remote-test-host option). If there's clock skew, the other machine might try to rebuild stuff unecessarily. Using run-test avoids that. --- makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index a7e4389511..1622e7896d 100755 --- a/makefile +++ b/makefile @@ -471,6 +471,12 @@ ifeq ($(arch),arm) endif endif +ifneq ($(platform),darwin) +# By default, assume we can't use armv7-specific instructions on +# non-iOS platforms. Ideally, we'd detect this at runtime. + armv6=true +endif + ifeq ($(armv6),true) cflags += -DAVIAN_ASSUME_ARMV6 endif @@ -1465,8 +1471,15 @@ debug: build vg: build $(library-path) $(vg) $(test-executable) $(test-args) + .PHONY: test -test: build $(build)/run-tests.sh $(build)/test.sh $(unittest-executable) +test: build-test run-test + +.PHONY: build-test +build-test: build $(build)/run-tests.sh $(build)/test.sh $(unittest-executable) + +.PHONY: run-test +run-test: ifneq ($(remote-test),true) /bin/sh $(build)/run-tests.sh else