From 79c13ba18aa749149e9fa1b091dd6c564d8c8202 Mon Sep 17 00:00:00 2001 From: StefanosChaliasos Date: Tue, 7 Jan 2020 16:12:54 +0200 Subject: [PATCH] Add missing Make dependencies (#168) * Add missing Make dependencies * Update gitignore --- .gitignore | 1 + Makefile | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 67cccf6..854e68f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ webdis websocket *.png pubsub +*.d diff --git a/Makefile b/Makefile index e29ad4b..0ac00ce 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ B64_OBJS?=b64/cencode.o FORMAT_OBJS?=formats/json.o formats/raw.o formats/common.o formats/custom-type.o HTTP_PARSER_OBJS?=http-parser/http_parser.o -CFLAGS ?= -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser +CFLAGS ?= -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -MD LDFLAGS ?= -levent -pthread # check for MessagePack @@ -17,6 +17,8 @@ ifneq ($(strip $(MSGPACK_LIB)),) endif + +OBJS_DEPS=$(wildcard *.d) DEPS=$(FORMAT_OBJS) $(HIREDIS_OBJ) $(JANSSON_OBJ) $(HTTP_PARSER_OBJS) $(B64_OBJS) OBJS=webdis.o cmd.o worker.o slog.o server.o acl.o md5/md5.o sha1/sha1.o http.o client.o websocket.o pool.o conf.o $(DEPS) @@ -45,7 +47,7 @@ $(INSTALL_DIRS): mkdir -p $@ clean: - rm -f $(OBJS) $(OUT) + rm -f $(OBJS) $(OUT) $(OBJS_DEPS) install: $(OUT) $(INSTALL_DIRS) cp $(OUT) $(DESTDIR)/$(PREFIX)/bin @@ -64,3 +66,5 @@ test: perftest: # This is a performance test that requires apache2-utils and curl ./tests/bench.sh + +-include $(OBJS:.o=.d)