Commit | Line | Data |
---|---|---|
6d8ae407 PG |
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 | ||
c569b5d1 PG |
8 | ${TARGETTMP_$D}: ${BINDIR_$P}${SONAME_${G_LIB}} |
9 | ||
10 | ||
11 | # how to copy a library to the tests bin directory | |
12 | ${BINDIR_$P}${SONAME_${G_LIB}}: ${TARGET_${G_LIB}} | $${@D} | |
13 | ${cmd-cp} | |
6d8ae407 PG |
14 | |
15 | # how to link the main target | |
16 | ${TARGETTMP_$P}: ${L_OBJS_$P} | $${@D} | |
17 | ${cmd-link} | |
18 | ||
19 | # rule to copy tmp target to working directory | |
20 | ${TARGET_$P}: ${TARGETTMP_$P} | $${@D} | |
21 | ${cmd-cp} | |
22 | ||
23 | # how to copy a library to the bin directory | |
24 | #${BINDIR_$P}${SONAME_${G_LIB}}: ${TARGET_${G_LIB}} | $${@D} | |
25 | # ${cmd-cp} | |
26 | ||
27 | # rule to copy the config files into the working directory | |
28 | ${DSTCFGDIR_$P}%: ${SRCCFGDIR_$P}% | $$(dir $$@) | |
29 | ${cmd-cp} | |
30 | ||
31 | # rule to copy the library files into the working directory | |
32 | ${DSTLIBSDIR_$P}%: ${SRCLIBSDIR_$P}% | $$(dir $$@) | |
33 | ${cmd-cp} | |
34 | ||
35 | # rule to copy the text files into the working directory | |
36 | ${DSTTXTDIR_$P}%: ${SRCTXTDIR_$P}% | $$(dir $$@) | |
37 | ${cmd-cp} | |
38 | ||
39 | # rule to make an object file from a .cpp | |
40 | ${OBJSDIR_$P}%.o: ${SRCSDIR_$P}%.cpp | $${@D} | |
41 | ${cmd-cpptoobj} | |
42 | ||
43 | # rule to make a depend file from a .cpp | |
44 | ${DEPSDIR_$P}%.d: ${SRCSDIR_$P}%.cpp | $${@D} | |
45 | ${cmd-cpptodep} | |
46 | ||
47 | ||
48 | L_CLEANCMDS += cleanbin-$P | |
49 | cleanbin: cleanbin-$P | |
50 | .PHONY: cleanbin-$P | |
51 | cleanbin-$P: | |
52 | ${Q1}${PRNTFMT} "rm" "${BINDIR}" | |
53 | ${Q2}rm -rf ${BINDIR} | |
54 | ||
55 | L_CLEANCMDS += cleanobjs-$P | |
56 | cleanobjs: cleanobjs-$P | |
57 | .PHONY: cleanobjs-$P | |
58 | cleanobjs-$P: | |
59 | ${Q1}${PRNTFMT} "rm" "${OBJSDIR}" | |
60 | ${Q2}rm -rf ${OBJSDIR} | |
61 | ||
62 | L_CLEANCMDS += cleandeps-$P | |
63 | cleandeps: cleandeps-$P | |
64 | .PHONY: cleandeps-$P | |
65 | cleandeps-$P: | |
66 | ${Q1}${PRNTFMT} "rm" "${DEPSDIR}" | |
67 | ${Q2}rm -rf ${DEPSDIR} | |
68 | ||
69 | L_CLEANCMDS += clean-$P | |
70 | clean: clean-$P | |
71 | .PHONY: clean-$P | |
72 | clean-$P: cleanobjs-$P cleanbin-$P | |
73 | ||
74 | L_CLEANCMDS += cleanall-$P | |
75 | cleanall: cleanall-$P | |
76 | .PHONY: cleanall-$P | |
77 | cleanall-$P: cleanbin-$P cleanobjs-$P cleandeps-$P | |
78 |