diff --git a/Makefile b/Makefile index b841713..7a92cbc 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,16 @@ endif # QPU or emulation mode ifeq ($(QPU), 1) + +# Check platform before building. Can't be indented, otherwise make complains. +RET := $(shell Tools/detectPlatform.sh 1>/dev/null && echo "yes" || echo "no") +#$(info info: '$(RET)') +ifneq ($(RET), yes) +$(error QPU-mode specified on a non-Pi platform; aborting) +else +$(info Building on a Pi platform) +endif + CXX_FLAGS += -DQPU_MODE -I /opt/vc/include OBJ_DIR := $(OBJ_DIR)-qpu LIBS := -L /opt/vc/lib -l bcm_host @@ -63,6 +73,7 @@ OBJ = \ Target/Emulator.o \ Target/Encode.o \ VideoCore/Mailbox.o \ + VideoCore/RegisterMap.o \ VideoCore/Invoke.o \ VideoCore/VideoCore.o diff --git a/Tests/testMain.cpp b/Tests/testMain.cpp index e733e31..b6f1bbc 100644 --- a/Tests/testMain.cpp +++ b/Tests/testMain.cpp @@ -35,12 +35,11 @@ using RegMap = QPULib::RegisterMap; #define POSTFIX_QPU "" #endif -const char *AUTOTEST_PATH = "obj" POSTFIX_DEBUG POSTFIX_QPU "/bin/AutoTest"; - // // This is a good place to put simple, global tests // +const char *AUTOTEST_PATH = "obj" POSTFIX_DEBUG POSTFIX_QPU "/bin/AutoTest"; TEST_CASE("Check random specifications for interpreter and emulator2", "[specs]") {