fixed makefile hack to get tests depending on libs
[libbear.git] / tests / rules.mk
1
2 ${G_OBJS_TESTS}: ${L_OBJS_$P}
3 ${G_DEPS_TESTS}: ${L_DEPS_$P}
4
5 # how to copy a library to the tests bin directory
6 ${WORKINGDIR_$P}${SONAME_${G_LIB}}: ${TARGET_${G_LIB}} | $${@D}
7         ${cmd-cp}
8
9 # rule to make an object file from a .cpp
10 ${OBJSDIR_$P}%.o: ${SRCSDIR_$P}%.cpp | $${@D}
11         ${cmd-cpptoobj}
12
13 # rule to make a depend file from a .cpp
14 #   be clever and escape the / chars in file paths
15 #   DON'T simply use another sed delimiter or it can't appear in the file paths
16 ${DEPSDIR_$P}%.d: ${SRCSDIR_$P}%.cpp | $${@D}
17         ${cmd-cpptodep}
18
19
20 L_CLEANCMDS +=  cleanbin-$P
21 cleanbin:       cleanbin-$P
22 .PHONY:         cleanbin-$P
23 cleanbin-$P:
24         ${Q1}${PRNTFMT} "rm" "${WORKINGDIR}"
25         ${Q2}rm -rf ${WORKINGDIR}
26
27 L_CLEANCMDS +=  cleanobjs-$P
28 cleanobjs:      cleanobjs-$P
29 .PHONY:         cleanobjs-$P
30 cleanobjs-$P:
31         ${Q1}${PRNTFMT} "rm" "${OBJSDIR}"
32         ${Q2}rm -rf ${OBJSDIR}
33
34 L_CLEANCMDS +=  cleandeps-$P
35 cleandeps:      cleandeps-$P
36 .PHONY:         cleandeps-$P
37 cleandeps-$P:
38         ${Q1}${PRNTFMT} "rm" "${DEPSDIR}"
39         ${Q2}rm -rf ${DEPSDIR}
40
41 L_CLEANCMDS +=  clean-$P
42 clean:          clean-$P
43 .PHONY:         clean-$P
44 clean-$P: cleanobjs-$P cleanbin-$P
45
46 L_CLEANCMDS +=  cleanall-$P
47 cleanall:       cleanall-$P
48 .PHONY:         cleanall-$P
49 cleanall-$P: cleanbin-$P cleanobjs-$P cleandeps-$P
50