libsel4bench: Move ARMv7-a-specific file into subdirectory. This restructure prevents this file being built for all ARM platforms, restricting it to *only* ARMv7-a platforms. The irrelevant code was previously ifdefed out, so it was not causing problems, but this change avoids invoking the compiler at all on non-ARMv7-a platforms.
diff --git a/libsel4bench/Makefile b/libsel4bench/Makefile index ebd6d43..84fcd25 100644 --- a/libsel4bench/Makefile +++ b/libsel4bench/Makefile
@@ -14,7 +14,8 @@ # Source files required to build the target CFILES := \ $(patsubst $(SOURCE_DIR)/%,%,$(wildcard $(SOURCE_DIR)/src/*.c)) \ - $(patsubst $(SOURCE_DIR)/%,%,$(wildcard $(SOURCE_DIR)/src/arch-$(ARCH)/*.c)) + $(patsubst $(SOURCE_DIR)/%,%,$(wildcard $(SOURCE_DIR)/src/arch-$(ARCH)/*.c)) \ + $(patsubst $(SOURCE_DIR)/%,%,$(wildcard $(SOURCE_DIR)/src/arch-$(ARCH)/armv/$(ARMV)/*.c)) # Header files/directories this library provides # Note: sel4_client.h may not have been built at the time this is evaluated.
diff --git a/libsel4bench/src/arch-arm/event_counters_armv7a.c b/libsel4bench/src/arch-arm/armv/armv7-a/event_counters_armv7a.c similarity index 97% rename from libsel4bench/src/arch-arm/event_counters_armv7a.c rename to libsel4bench/src/arch-arm/armv/armv7-a/event_counters_armv7a.c index 5ae1544..5b5b0d7 100644 --- a/libsel4bench/src/arch-arm/event_counters_armv7a.c +++ b/libsel4bench/src/arch-arm/armv/armv7-a/event_counters_armv7a.c
@@ -8,11 +8,9 @@ * @TAG(NICTA_BSD) */ -#if defined(ARMV7_A) - #include <utils/util.h> -#include "event_counters.h" +#include "../../event_counters.h" #define NAME_EVENT(id, name) EVENT_COUNTER_FORMAT(SEL4BENCH_ARMV7A_EVENT_##id, name) @@ -58,5 +56,3 @@ { return ARRAY_SIZE(sel4bench_arch_event_counter_data); } - -#endif /* defined(ARMV7_A) */