aboutsummaryrefslogtreecommitdiffstats
path: root/daemon/makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--daemon/makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/daemon/makefile b/daemon/makefile
index 351f8b7..2fac344 100644
--- a/daemon/makefile
+++ b/daemon/makefile
@@ -6,13 +6,22 @@ LD_FLAGS=
TARGETD=mutatord
TARGETS=mutatorserver
TARGETC=mutatorclient
+SRCS=$(wildcard *.c)
##################################RULES################################
.DEFAULT:all
-.PHONY:all clean help
+.PHONY:all clean help depend
all:$(TARGETC) $(TARGETS) $(TARGETD)
+depend:.depend
+
+.depend:$(SRCS)
+ rm -f ./.depend
+ $(CC) -MM $(CC_FLAGS) $^ > ./.depend
+
+-include .depend
+
.c.o:
$(CC) $(CC_FLAGS) -c $< -o $@
@@ -27,6 +36,7 @@ $(TARGETD): $(TARGETD).o daemon_aux.o
clean:
rm -f *.o *~ $(TARGETD) $(TARGETS) $(TARGETC)
+ rm ./.depend
help:
@echo 'all builds the daemon, the server and the client. all is the default.'