openrc/mk/depend.mk

16 lines
426 B
Makefile
Raw Normal View History

# Generate .depend
2008-01-09 17:14:43 +05:30
# Copyright 2008 Roy Marples <roy@marples.name>
2008-01-09 17:14:43 +05:30
CLEANFILES+= .depend
2008-03-03 18:34:08 +05:30
IGNOREFILES+= .depend
2008-01-09 17:14:43 +05:30
.depend: ${SRCS}
${CC} ${CPPFLAGS} -MM ${SRCS} > .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}