changed all directory usages to dir/name instead of dir/name/
[libbear.git] / rules.mk
CommitLineData
fac0f562
PG
1
2define cmd-link
97c2dcb5 3 ${Q1s}${PRNTLOG} "${CXX}" "$@" ${Q1e}
3994427d
PG
4 ${Q2s}${PRNTFMT} "${CXX}" "$@" ${Q2e}
5 ${Q3s}${CXX} $^ -o $@ ${CXXFLAGS} ${LNKFLAGS} ${LIBS} ${Q3e}
6 ${Q4s}${CXX} $^ -o $@ ${CXXFLAGS} ${LNKFLAGS} ${LIBS} ${Q4e}
fac0f562
PG
7endef
8
9define cmd-cp
97c2dcb5 10 ${Q1s}${PRNTLOG} "cp" "$@" ${Q1e}
3994427d
PG
11 ${Q2s}${PRNTFMT} "cp" "$@" ${Q2e}
12 ${Q3s}cp $< $@ ${Q3e}
13 ${Q4s}cp $< $@ ${Q4e}
14endef
15
16define cmd-rm
97c2dcb5 17 ${Q1s}${PRNTLOG} "rm" "${CLEANTARGET}" ${Q1e}
3994427d
PG
18 ${Q2s}${PRNTFMT} "rm" "${CLEANTARGET}" ${Q2e}
19 ${Q3s}rm -f ${CLEANTARGET} ${Q3e}
20 ${Q4s}rm -f ${CLEANTARGET} ${Q4e}
21endef
22
23define cmd-rmrec
97c2dcb5 24 ${Q1s}${PRNTLOG} "rm" "${CLEANTARGET}" ${Q1e}
3994427d
PG
25 ${Q2s}${PRNTFMT} "rm" "${CLEANTARGET}" ${Q2e}
26 ${Q3s}rm -rf ${CLEANTARGET} ${Q3e}
27 ${Q4s}rm -rf ${CLEANTARGET} ${Q4e}
fac0f562
PG
28endef
29
30define cmd-cpptoobj
97c2dcb5 31 ${Q1s}${PRNTLOG} "${CXX}" "$@" ${Q1e}
3994427d 32 ${Q2s}${PRNTFMT} "${CXX}" "$@" ${Q2e}
7d60ddf6
PG
33 ${Q3s}${CXX} -c $< -o $@ -MF ${@:${OBJSDIR}%.o=${DEPSDIR}%.d} ${CXXFLAGS} ${INCFLAGS} -MMD -MQ $@ ${Q3e}
34 ${Q4s}${CXX} -c $< -o $@ -MF ${@:${OBJSDIR}%.o=${DEPSDIR}%.d} ${CXXFLAGS} ${INCFLAGS} -MMD -MQ $@ ${Q4e}
fac0f562
PG
35endef
36
7d60ddf6
PG
37# Do nothing. This is now done in parallel with cpptoobj. However, you still
38# need to write rules using this to cause dependency directories to be created
fac0f562 39define cmd-cpptodep
fac0f562
PG
40endef
41
016c4cab
PG
42
43${L_BLDDIRS}:
97c2dcb5 44 ${Q1s}${PRNTLOG} "mkdir" "$@" ${Q1e}
3994427d
PG
45 ${Q2s}${PRNTFMT} "mkdir" "$@" ${Q2e}
46 ${Q3s}mkdir $@ ${Q3e}
47 ${Q4s}mkdir $@ ${Q4e}
016c4cab 48