removed srcpath
[libbear.git] / rules.mk
1
2 # HACK
3 all: ${TARGET_$P} ${CFGS_$P} ${LIBSTXT_$P} ${LIBSCPY_$P} ${TXT_$P}
4
5 #${G_OBJS_TESTS}: ${L_OBJS_$P}
6 #${G_DEPS_TESTS}: ${L_DEPS_$P}
7
8
9 # how to link the main target
10 ${TARGETTMP_$P}: ${L_OBJS_$P} | $${@D}
11         ${cmd-link}
12
13 # rule to copy tmp target to working directory
14 ${TARGET_$P}: ${TARGETTMP_$P} | $${@D}
15         ${cmd-cp}
16
17 # how to copy a library to the bin directory
18 #${BINDIR_$P}${SONAME_${G_LIB}}: ${TARGET_${G_LIB}} | $${@D}
19 #       ${cmd-cp}
20
21 # rule to copy the config files into the working directory
22 ${DSTCFGDIR_$P}%: ${SRCCFGDIR_$P}% | $$(dir $$@)
23         ${cmd-cp}
24
25 # rule to copy the library files into the working directory
26 ${DSTLIBSDIR_$P}%: ${SRCLIBSDIR_$P}% | $$(dir $$@)
27         ${cmd-cp}
28
29 # rule to copy the text files into the working directory
30 ${DSTTXTDIR_$P}%: ${SRCTXTDIR_$P}% | $$(dir $$@)
31         ${cmd-cp}
32
33 # rule to make an object file from a .cpp
34 ${OBJSDIR_$P}%.o: ${SRCSDIR_$P}%.cpp | $${@D}
35         ${cmd-cpptoobj}
36
37 # rule to make a depend file from a .cpp
38 ${DEPSDIR_$P}%.d: ${SRCSDIR_$P}%.cpp | $${@D}
39         ${cmd-cpptodep}
40
41
42 L_CLEANCMDS +=  cleanbin-$P
43 cleanbin:       cleanbin-$P
44 .PHONY:         cleanbin-$P
45 cleanbin-$P:
46         ${Q1}${PRNTFMT} "rm" "${BINDIR}"
47         ${Q2}rm -rf ${BINDIR}
48
49 L_CLEANCMDS +=  cleanobjs-$P
50 cleanobjs:      cleanobjs-$P
51 .PHONY:         cleanobjs-$P
52 cleanobjs-$P:
53         ${Q1}${PRNTFMT} "rm" "${OBJSDIR}"
54         ${Q2}rm -rf ${OBJSDIR}
55
56 L_CLEANCMDS +=  cleandeps-$P
57 cleandeps:      cleandeps-$P
58 .PHONY:         cleandeps-$P
59 cleandeps-$P:
60         ${Q1}${PRNTFMT} "rm" "${DEPSDIR}"
61         ${Q2}rm -rf ${DEPSDIR}
62
63 L_CLEANCMDS +=  clean-$P
64 clean:          clean-$P
65 .PHONY:         clean-$P
66 clean-$P: cleanobjs-$P cleanbin-$P
67
68 L_CLEANCMDS +=  cleanall-$P
69 cleanall:       cleanall-$P
70 .PHONY:         cleanall-$P
71 cleanall-$P: cleanbin-$P cleanobjs-$P cleandeps-$P
72