Enable use of .depend on gmake. Also, generate extra dependencies for our shared libraries.
This commit is contained in:
12
mk/depend.mk
12
mk/depend.mk
@@ -1,8 +1,5 @@
|
||||
# This only works for make implementations that always include a .depend if
|
||||
# it exists. Only GNU make does not do this.
|
||||
|
||||
# Generate .depend
|
||||
# Copyright 2008 Roy Marples <roy@marples.name>
|
||||
# All rights reserved. Released under the 2-clause BSD license.
|
||||
|
||||
CLEANFILES+= .depend
|
||||
IGNOREFILES+= .depend
|
||||
@@ -10,4 +7,9 @@ IGNOREFILES+= .depend
|
||||
.depend: ${SRCS}
|
||||
${CC} ${CPPFLAGS} -MM ${SRCS} > .depend
|
||||
|
||||
depend: .depend
|
||||
depend: .depend extra_depend
|
||||
|
||||
# Nasty hack for gmake which does not automatically include .depend
|
||||
# if it exists, unlike every other make implementation.
|
||||
INC_DEPEND= $(shell if test -e .depend; then echo ".depend"; else echo ""; fi)
|
||||
include ${INC_DEPEND}
|
||||
|
Reference in New Issue
Block a user