summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index ec9ee02..a80043d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,11 @@
WORK_DIR = .
SRC_DIR = $(WORK_DIR)/src
-CSH_FLAGS = -O2 -g -Wall -Wextra -Werror -pedantic -I$(SRC_DIR)
+CSH_FLAGS = \
+ -O2 -g \
+ -Wall -Wextra -Werror -pedantic \
+ -MMD -MP \
+ -I$(SRC_DIR)
CC = clang
CC_STD = -std=c11
@@ -50,6 +54,8 @@ OBJECTS := $(SOURCES:.cc=.o)
OBJECTS := $(OBJECTS:.c=.o)
OBJECTS += $(MI_OBJECT)
+DEPS = $(OBJECTS:.o=.d)
+
LIBRARIES = -lwayland-client
all: $(WAYCLOCK)
@@ -77,4 +83,6 @@ $(WAYCLOCK): $(OBJECTS)
.PHONY: clean
clean:
@$(RM) $(OBJECTS) $(WAYCLOCK)
- @$(RM) $(MI_BUILD) \ No newline at end of file
+ @$(RM) $(MI_BUILD)
+
+-include $(DEPS) \ No newline at end of file