xref: /freebsd/share/mk/local.autodep.mk (revision 732a02b4e77866604a120a275c082bb6221bd2ff)
1# $FreeBSD$
2
3.if ${.MAKE.DEPENDFILE:M*.${MACHINE}} == ""
4# by default only MACHINE0 does updates
5UPDATE_DEPENDFILE_MACHINE?= ${MACHINE0:U${MACHINE}}
6.if ${MACHINE} != ${UPDATE_DEPENDFILE_MACHINE}
7UPDATE_DEPENDFILE= no
8.endif
9.endif
10
11CFLAGS+= ${CFLAGS_LAST}
12CXXFLAGS+= ${CXXFLAGS_LAST}
13LDFLAGS+= ${LDFLAGS_LAST}
14
15CLEANFILES+= .depend
16
17# handy for debugging
18.SUFFIXES:  .S .c .cc .cpp .cpp-out
19
20
21.S.cpp-out .c.cpp-out: .NOMETA
22	@${CC} -E ${CFLAGS} ${.IMPSRC} | grep -v '^[[:space:]]*$$'
23
24.cc.cpp-out: .NOMETA
25	@${CXX} -E ${CXXFLAGS} ${.IMPSRC} | grep -v '^[[:space:]]*$$'
26