Store Makefile dependencies in separate file
This commit is contained in:
parent
ee39aff4bc
commit
afb462698f
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@
|
||||
*.so
|
||||
*.dylib
|
||||
*.a
|
||||
Makefile.dep
|
||||
|
||||
12
Makefile
12
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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user