1999-08-11 06:00:15 +04:00
|
|
|
# $NetBSD: bsd.dep.mk,v 1.27 1999/08/11 02:00:15 sommerfeld Exp $
|
1997-03-08 02:10:18 +03:00
|
|
|
|
1997-05-07 12:42:18 +04:00
|
|
|
.PHONY: cleandepend
|
1998-08-09 18:46:19 +04:00
|
|
|
cleandir distclean: cleandepend
|
1997-05-07 00:54:31 +04:00
|
|
|
|
|
|
|
MKDEP?= mkdep
|
1993-08-15 23:37:04 +04:00
|
|
|
|
|
|
|
# some of the rules involve .h sources, so remove them from mkdep line
|
1997-05-07 20:44:04 +04:00
|
|
|
depend: beforedepend
|
1993-08-15 23:37:04 +04:00
|
|
|
.if defined(SRCS)
|
1997-05-07 20:44:04 +04:00
|
|
|
depend: .depend
|
1999-02-04 00:08:05 +03:00
|
|
|
@true # hack to prevent "make depend" from using implicit rules
|
1997-05-09 01:18:59 +04:00
|
|
|
.NOPATH: .depend
|
1997-05-09 17:25:46 +04:00
|
|
|
.depend: ${SRCS} ${DPSRCS}
|
1995-09-27 04:15:09 +03:00
|
|
|
@rm -f .depend
|
|
|
|
@files="${.ALLSRC:M*.s} ${.ALLSRC:M*.S}"; \
|
1993-12-05 05:42:42 +03:00
|
|
|
if [ "$$files" != " " ]; then \
|
1997-03-08 02:10:18 +03:00
|
|
|
echo ${MKDEP} -a ${MKDEPFLAGS} \
|
1999-02-25 01:04:15 +03:00
|
|
|
${AFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} ${AINC:Q} $$files; \
|
1997-03-08 02:10:18 +03:00
|
|
|
${MKDEP} -a ${MKDEPFLAGS} \
|
1999-02-25 01:04:15 +03:00
|
|
|
${AFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files; \
|
1993-09-05 21:46:15 +04:00
|
|
|
fi
|
1995-09-27 04:15:09 +03:00
|
|
|
@files="${.ALLSRC:M*.c}"; \
|
1993-08-15 23:37:04 +04:00
|
|
|
if [ "$$files" != "" ]; then \
|
1997-03-08 02:10:18 +03:00
|
|
|
echo ${MKDEP} -a ${MKDEPFLAGS} \
|
1999-02-07 20:29:40 +03:00
|
|
|
${CFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \
|
1997-03-08 02:10:18 +03:00
|
|
|
${MKDEP} -a ${MKDEPFLAGS} \
|
|
|
|
${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
|
1993-08-15 23:37:04 +04:00
|
|
|
fi
|
1998-08-18 21:31:21 +04:00
|
|
|
@files="${.ALLSRC:M*.m}"; \
|
1998-08-18 23:12:42 +04:00
|
|
|
if [ "$$files" != "" ]; then \
|
1998-08-18 21:31:21 +04:00
|
|
|
echo ${MKDEP} -a ${MKDEPFLAGS} \
|
1999-02-07 20:29:40 +03:00
|
|
|
${OBJCFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \
|
1998-08-18 21:31:21 +04:00
|
|
|
${MKDEP} -a ${MKDEPFLAGS} \
|
|
|
|
${OBJCFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
|
|
|
|
fi
|
1995-09-27 04:15:09 +03:00
|
|
|
@files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \
|
1993-08-15 23:37:04 +04:00
|
|
|
if [ "$$files" != " " ]; then \
|
1997-03-08 02:10:18 +03:00
|
|
|
echo ${MKDEP} -a ${MKDEPFLAGS} \
|
1999-02-07 20:29:40 +03:00
|
|
|
${CXXFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \
|
1997-03-08 02:10:18 +03:00
|
|
|
${MKDEP} -a ${MKDEPFLAGS} \
|
|
|
|
${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
|
1993-08-15 23:37:04 +04:00
|
|
|
fi
|
1997-05-09 11:56:00 +04:00
|
|
|
cleandepend:
|
1999-08-11 06:00:15 +04:00
|
|
|
rm -f .depend ${.CURDIR}/tags ${CLEANDEPEND}
|
1997-05-09 11:56:00 +04:00
|
|
|
.else
|
|
|
|
cleandepend:
|
1993-08-15 23:37:04 +04:00
|
|
|
.endif
|
1997-05-07 21:06:16 +04:00
|
|
|
depend: afterdepend
|
1997-05-09 11:56:00 +04:00
|
|
|
|
1993-08-16 01:09:20 +04:00
|
|
|
beforedepend:
|
|
|
|
afterdepend:
|
1993-08-16 00:42:39 +04:00
|
|
|
|
|
|
|
.if !target(tags)
|
1993-08-16 01:14:45 +04:00
|
|
|
.if defined(SRCS)
|
1997-05-07 21:06:16 +04:00
|
|
|
tags: ${SRCS}
|
1993-08-16 00:42:39 +04:00
|
|
|
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \
|
|
|
|
sed "s;\${.CURDIR}/;;" > tags
|
1993-08-16 01:14:45 +04:00
|
|
|
.else
|
|
|
|
tags:
|
|
|
|
.endif
|
1993-08-16 00:42:39 +04:00
|
|
|
.endif
|