aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2024-05-02 21:04:36 +0100
committerTomasz Kramkowski <tomasz@kramkow.ski>2024-05-02 21:37:17 +0100
commit476044b4947632ba2b03bc368a513cba55cb1103 (patch)
tree6245b04828f77820d8ce59c1b50ed6e16de7d8fc /Makefile
parent38f90d7bd6669bd6f48be178669a6186e40b30de (diff)
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
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)