tests: automatically build dependencies.
Signed-off-by: Michael Hope <mlhx@google.com>
This commit is contained in:
parent
31f13e3d9c
commit
b8a9df2aa4
|
@ -31,7 +31,8 @@ COMMON_FLAGS = \
|
|||
-ggdb3 \
|
||||
-O0 \
|
||||
-DUNIT_TEST \
|
||||
-isystem $(GTEST_DIR)/inc
|
||||
-isystem $(GTEST_DIR)/inc \
|
||||
-MMD -MP
|
||||
|
||||
# Flags passed to the C compiler.
|
||||
C_FLAGS = $(COMMON_FLAGS) \
|
||||
|
@ -130,6 +131,9 @@ LIBCLEANFLIGHT_SRC = \
|
|||
|
||||
LIBCLEANFLIGHT_OBJ = $(LIBCLEANFLIGHT_SRC:%.c=$(OBJECT_DIR)/%.o)
|
||||
|
||||
DEPS = $(LIBCLEANFLIGHT_OBJ:%.o=%.d) \
|
||||
$(TEST_BINARIES:%=%.d)
|
||||
|
||||
LIBS = $(OBJECT_DIR)/libcleanflight.a $(OBJECT_DIR)/gtest_main.a
|
||||
|
||||
$(OBJECT_DIR)/libcleanflight.a: $(LIBCLEANFLIGHT_OBJ)
|
||||
|
@ -366,3 +370,5 @@ test: $(TESTS:%=test-%)
|
|||
|
||||
test-%: $(OBJECT_DIR)/%
|
||||
$<
|
||||
|
||||
-include $(DEPS)
|
||||
|
|
Loading…
Reference in New Issue