aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/.gitignore2
-rw-r--r--tests/Makefile5
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
index 0e64d2c..a325c28 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -1,3 +1,5 @@
*.o
bin/*
!.gitkeep
+compile_commands.json
+.cache/
diff --git a/tests/Makefile b/tests/Makefile
index f7f7ed4..c0c8059 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -38,5 +38,10 @@ $(LIB):
clean:
rm -f $(BINS)
+ rm -f compile_commands.json
+
+compile_commands.json: $(TESTS:%=$(SRCDIR)/%.c)
+ @echo '$(foreach t,$(TESTS),{"directory":"$(CURDIR)","command":"$(CC) $(CFLAGS) -c $(SRCDIR)/$(t).c","file":"$(SRCDIR)/$(t).c"})' \
+ | jq -s '.' > $@
.PHONY: all clean