diff --git a/.gitignore b/.gitignore index 801b2be..ebaa1e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /compile_commands.json +/compile_flags.txt /build /docs/*.pdf /ain48 diff --git a/Makefile b/Makefile index 05aea33..08540e9 100644 --- a/Makefile +++ b/Makefile @@ -26,8 +26,10 @@ DOCS=$(patsubst docs/%.typ, docs/%.pdf, $(DOCSRC)) PROGRAM=ain48 -.PHONY: all build docs clean deepclean -all: build docs +.PHONY: all build docs clean deepclean setup +all: setup build docs + +setup: compile_flags.txt build: $(PROGRAM) @@ -44,6 +46,9 @@ deepclean: clean $(RM) $(PROGRAM) $(RM) $(DOCS) +compile_flags.txt: Makefile + printf "%s\n" $(CFLAGS) > $@ + $(PROGRAM): $(OBJS) $(LD) $(LDFLAGS) $(OBJS) -o $@