From 476044b4947632ba2b03bc368a513cba55cb1103 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Thu, 2 May 2024 21:04:36 +0100 Subject: Makefile: Add support for generating compile_flags.txt This helps tools like clangd understand where the header files are such that they can be used to navigate the codebase quickly and easily. --- Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9176f4d..9ee2833 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,9 @@ $(BUILDDIR)/%.o: $(SRCDIR)/%.$(SRCEXT) Makefile @mkdir -p $(BUILDDIR) @echo " $(CC) $(CFLAGS) $(INC) -c -o $@ $<"; $(CC) $(CFLAGS) $(INC) -c -o $@ $< -save-temps -O3 +compile_flags.txt: Makefile + printf "%s\n" $(CFLAGS) $(INC) >$@ + clean: @echo " Cleaning..."; @echo " $(RM) -r $(BUILDDIR) $(TARGET)"; $(RM) -r $(BUILDDIR) $(TARGET) -- cgit