refactor: consolidate per-test subdirectories into flat test/api structure with merged returns and value files

This commit is contained in:
Bob Nystrom
2015-08-13 16:09:27 +00:00
parent f9f8b55b29
commit 7551fa8c9b
18 changed files with 72 additions and 103 deletions
+3 -2
View File
@@ -21,9 +21,10 @@
# Files.
CLI_HEADERS := $(wildcard src/cli/*.h)
VM_HEADERS := $(wildcard src/vm/*.h)
TEST_HEADERS := $(wildcard test/api/*.h)
CLI_SOURCES := $(wildcard src/cli/*.c)
VM_SOURCES := $(wildcard src/vm/*.c)
TEST_SOURCES := $(shell find test/api -name '*.c')
TEST_SOURCES := $(wildcard test/api/*.c)
BUILD_DIR := build
C_WARNINGS := -Wall -Wextra -Werror -Wno-unused-parameter
@@ -143,7 +144,7 @@ $(BUILD_DIR)/vm/%.o: src/vm/%.c $(VM_HEADERS)
@$(CC) -c $(CFLAGS) -Isrc/include -o $@ $(FILE_FLAG) $<
# Test object files.
$(BUILD_DIR)/test/%.o: test/api/%.c $(VM_HEADERS)
$(BUILD_DIR)/test/%.o: test/api/%.c $(CLI_HEADERS) $(TEST_HEADERS) $(VM_HEADERS)
@printf "%10s %-30s %s\n" $(CC) $< "$(C_OPTIONS)"
@mkdir -p $(dir $@)
@$(CC) -c $(CFLAGS) -Isrc/include -Isrc/cli -o $@ $(FILE_FLAG) $<