summaryrefslogtreecommitdiff
path: root/mk/depend.mk
blob: 2ae6e1e85f5ab317afad4353a332260e11aeba64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Generate .depend
# Copyright 2008 Roy Marples <roy@marples.name>

CLEANFILES+=	.depend
IGNOREFILES+=	.depend

.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}