2016-02-08 03:15:12 +00:00
|
|
|
PROGRAM=tests
|
|
|
|
|
|
|
|
EXTRA_LINKER_SCRIPTS = $(PROGRAM_DIR)ld/tests.ld
|
|
|
|
PROGRAM_SRC_DIR = $(PROGRAM_DIR) $(PROGRAM_DIR)cases
|
|
|
|
|
2016-02-09 10:03:50 +00:00
|
|
|
# Add unity test framework headers & core source file
|
|
|
|
PROGRAM_INC_DIR = $(PROGRAM_DIR)unity/src
|
|
|
|
PROGRAM_EXTRA_SRC_FILES = $(PROGRAM_DIR)unity/src/unity.c
|
|
|
|
|
2016-02-08 03:15:12 +00:00
|
|
|
# append -u <basename_test_entry to the linker arguments for
|
|
|
|
# each source file in the 'cases' directory, so the test case
|
|
|
|
# entries get added to the compiled binary
|
|
|
|
TESTCASE_SRC_FILES = $(wildcard $(PROGRAM_DIR)cases/*.c)
|
|
|
|
TESTCASE_ENTRIES = $(sort $(patsubst %.c,%,$(TESTCASE_SRC_FILES)))
|
2016-02-09 10:03:50 +00:00
|
|
|
EXTRA_LDFLAGS = $(foreach entry,$(TESTCASE_ENTRIES),$(BUILD_DIR)program/$(entry).o)
|
2016-02-08 03:15:12 +00:00
|
|
|
|
|
|
|
include ../common.mk
|