diff --git a/.gitignore b/.gitignore index d6ffb7e..550020e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ *.so *.dylib *.a +Makefile.dep diff --git a/Makefile b/Makefile index 33ec7cd..5dcf116 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/test/Makefile b/test/Makefile index 5137dc3..80978ca 100644 --- a/test/Makefile +++ b/test/Makefile @@ -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