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

Store Makefile dependencies in separate file

parent ee39aff4
...@@ -4,3 +4,4 @@ ...@@ -4,3 +4,4 @@
*.so *.so
*.dylib *.dylib
*.a *.a
Makefile.dep
...@@ -10,14 +10,6 @@ BINS=hiredis-example hiredis-test ...@@ -10,14 +10,6 @@ BINS=hiredis-example hiredis-test
all: $(DYLIBNAME) $(BINS) 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) $(DYLIBNAME): $(OBJ)
$(DYLIB_MAKE_CMD) $(OBJ) $(DYLIB_MAKE_CMD) $(OBJ)
...@@ -67,8 +59,10 @@ check: hiredis-test ...@@ -67,8 +59,10 @@ check: hiredis-test
clean: clean:
rm -rf $(DYLIBNAME) $(STLIBNAME) $(BINS) hiredis-example* *.o *.gcda *.gcno *.gcov test/*.o rm -rf $(DYLIBNAME) $(STLIBNAME) $(BINS) hiredis-example* *.o *.gcda *.gcno *.gcov test/*.o
-include ./Makefile.dep
dep: dep:
$(CC) -MM *.c $(CC) -MM *.c > Makefile.dep
# Installation related variables and target # Installation related variables and target
PREFIX?=/usr/local PREFIX?=/usr/local
......
...@@ -17,7 +17,7 @@ test-%: test-%.o $(OBJ) ../$(STLIBNAME) ...@@ -17,7 +17,7 @@ test-%: test-%.o $(OBJ) ../$(STLIBNAME)
clean: clean:
rm -f *.o $(TESTS) rm -f *.o $(TESTS)
include ./Makefile.dep -include ./Makefile.dep
dep: dep:
$(CC) -MM *.c > Makefile.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