From fd62678a9cf38e3f70efbdd093c1012d448548e1 Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Sat, 21 Feb 2026 15:57:50 +0100 Subject: Add compile_commands.json generation for clangd support --- tests/Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/Makefile') 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 -- cgit v1.2.3