Commit afb46269 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Store Makefile dependencies in separate file

parent ee39aff4
......@@ -4,3 +4,4 @@
*.so
*.dylib
*.a
Makefile.dep
......@@ -10,14 +10,6 @@ BINS=hiredis-example hiredis-test
all: $(DYLIBNAME) $(BINS)
# Deps (use make dep to generate this)
net.o: net.c fmacros.h net.h hiredis.h
async.o: async.c async.h hiredis.h sds.h dict.c dict.h
example.o: example.c hiredis.h
hiredis.o: hiredis.c fmacros.h hiredis.h net.h sds.h
sds.o: sds.c sds.h
test.o: test.c hiredis.h
$(DYLIBNAME): $(OBJ)
$(DYLIB_MAKE_CMD) $(OBJ)
......@@ -67,8 +59,10 @@ check: hiredis-test
clean:
rm -rf $(DYLIBNAME) $(STLIBNAME) $(BINS) hiredis-example* *.o *.gcda *.gcno *.gcov test/*.o
-include ./Makefile.dep
dep:
$(CC) -MM *.c
$(CC) -MM *.c > Makefile.dep
# Installation related variables and target
PREFIX?=/usr/local
......
......@@ -17,7 +17,7 @@ test-%: test-%.o $(OBJ) ../$(STLIBNAME)
clean:
rm -f *.o $(TESTS)
include ./Makefile.dep
-include ./Makefile.dep
dep:
$(CC) -MM *.c > Makefile.dep
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment