aboutsummaryrefslogtreecommitdiff
path: root/tests/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/makefile')
-rw-r--r--tests/makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/makefile b/tests/makefile
index e69de29..2300a19 100644
--- a/tests/makefile
+++ b/tests/makefile
@@ -0,0 +1,24 @@
1include config.mk
2
3TEST_RUNNER=$(BUILD_DIR)/tester
4OBJS=$(BUILD_DIR)/csv-test.o
5
6$(TEST_RUNNER): $(OBJS) | libcsv
7 cc -o $@ $(LDFLAGS) $(OBJS)
8
9$(BUILD_DIR)/%.o: src/%.c | $(BUILD_DIR)
10 cc $(CFLAGS) -c $< -o $@
11
12$(BUILD_DIR):
13 mkdir -p $@
14
15.PHONY: libcsv
16libcsv:
17 $(MAKE) -C ../lib
18
19compile_flags.txt:
20 echo "$(CFLAGS)" | tr ' ' '\n' > $@
21
22.PHONY: clean
23clean:
24 rm -f $(TEST_RUNNER) $(OBJS)