|
@@ -22,17 +22,20 @@ import signal
|
|
|
|
|
|
|
|
TEST_PATHS = 'tests'
|
|
TEST_PATHS = 'tests'
|
|
|
RULES = """
|
|
RULES = """
|
|
|
|
|
+# add block devices to sources
|
|
|
|
|
+TESTSRC ?= $(SRC) $(wildcard bd/*.c)
|
|
|
|
|
+
|
|
|
define FLATTEN
|
|
define FLATTEN
|
|
|
%(path)s%%$(subst /,.,$(target)): $(target)
|
|
%(path)s%%$(subst /,.,$(target)): $(target)
|
|
|
./scripts/explode_asserts.py $$< -o $$@
|
|
./scripts/explode_asserts.py $$< -o $$@
|
|
|
endef
|
|
endef
|
|
|
-$(foreach target,$(SRC),$(eval $(FLATTEN)))
|
|
|
|
|
|
|
+$(foreach target,$(TESTSRC),$(eval $(FLATTEN)))
|
|
|
|
|
|
|
|
-include %(path)s*.d
|
|
-include %(path)s*.d
|
|
|
.SECONDARY:
|
|
.SECONDARY:
|
|
|
|
|
|
|
|
%(path)s.test: %(path)s.test.o \\
|
|
%(path)s.test: %(path)s.test.o \\
|
|
|
- $(foreach t,$(subst /,.,$(SRC:.c=.o)),%(path)s.$t)
|
|
|
|
|
|
|
+ $(foreach t,$(subst /,.,$(TESTSRC:.c=.o)),%(path)s.$t)
|
|
|
$(CC) $(CFLAGS) $^ $(LFLAGS) -o $@
|
|
$(CC) $(CFLAGS) $^ $(LFLAGS) -o $@
|
|
|
|
|
|
|
|
# needed in case builddir is different
|
|
# needed in case builddir is different
|