diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-02-21 15:57:50 +0100 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-02-21 15:57:50 +0100 |
| commit | fd62678a9cf38e3f70efbdd093c1012d448548e1 (patch) | |
| tree | 0bd4f3e5a6572bc4f0d9c80674ea06039fb78f36 /tests/Makefile | |
| parent | 671a58519ef6207b54947ff70eea497ff7eb58ae (diff) | |
| download | Libft-fd62678a9cf38e3f70efbdd093c1012d448548e1.tar.gz Libft-fd62678a9cf38e3f70efbdd093c1012d448548e1.zip | |
Add compile_commands.json generation for clangd support
Diffstat (limited to 'tests/Makefile')
| -rw-r--r-- | tests/Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
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 |
