summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b4dcc2c..83ec0a8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,20 @@
CFLAGS += -O2 -Wall -Wextra -Wpedantic
+CPPFLAGS += -MMD -MP
LDFLAGS += -lm -lncurses
TARGET := dartbot
SRC := $(wildcard *.c)
OBJ := $(SRC:.c=.o)
+DEP := $(OBJ:.o=.d)
all: $(TARGET)
$(TARGET): $(OBJ)
clean:
- rm -f $(TARGET) $(OBJ)
+ rm -f $(TARGET) $(OBJ) $(DEP)
+
+-include $(DEP)
.PHONY: all clean