diff options
author | Preston Pan <135050157+ret2pop@users.noreply.github.com> | 2024-05-02 20:47:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-02 20:47:58 -0700 |
commit | 104437bf7533798087e77b07756cd6b5dcc45bcd (patch) | |
tree | d60076e1beee31c81e1f8a604f46b4fa0270d83b /Makefile | |
parent | 4738c0ffe90fc5e46a2a31b061b76d49317b6b1e (diff) | |
parent | 3f6e346cfb9cce3e24c27c400e345eccc34697d9 (diff) |
A few fixes and improvements
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -5,7 +5,7 @@ TARGET := stem SRCEXT := c SOURCES := $(shell find $(SRCDIR) -type f -name *.$(SRCEXT)) OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.o)) -CFLAGS := +CFLAGS := -MMD -MP LIB := -L lib -lm INC := -I include @@ -13,11 +13,14 @@ $(TARGET): $(OBJECTS) @echo " Linking..." @echo " $(CC) $^ -o $(TARGET) $(LIB)"; $(CC) $^ -o $(TARGET) $(LIB) -O3 -$(BUILDDIR)/%.o: $(SRCDIR)/%.$(SRCEXT) +$(BUILDDIR)/%.o: $(SRCDIR)/%.$(SRCEXT) Makefile @echo " Building..." @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) @@ -33,3 +36,5 @@ doc: site: doxygen rsync -uvrP --delete-after "html/" root@nullring.xyz:/var/www/stemdoc + +-include $(OBJECTS:.o=.d) |