summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8385c3ac..49e22f2c 100644
--- a/Makefile
+++ b/Makefile
@@ -19,15 +19,16 @@ SRC = $(wildcard src/**/*.c)
OBJS = $(SRC:.c=.o)
TEST_SRC = $(wildcard $(TEST_DIR)/*.c)
TEST_OBJS = $(TEST_SRC:.c=.o)
+TESTS=$(patsubst %.c,%.bin,$(TEST_SRC))
all: $(OBJS)
-test: $(TEST_DIR)/tests.bin
+test: $(TESTS)
@set -o $(TEST_SET_OPTS) >/dev/null 2>&1
@export SHELLOPTS
@sh runtests.sh $(TEST_DIR)
-$(TEST_DIR)/tests.bin: $(TEST_OBJS) $(OBJS)
+$(TEST_DIR)/%.bin: $(TEST_DIR)/%.o $(OBJS)
@mkdir -p $(dir $@)
$(CC) $(LDFLAGS) $(CC_SYMBOLS) $(INCLUDES) -o $@ $^ $(LDLIBS)