removed some dirty physics hacks
[physics.git] / rules.mk
index ac7ed7d..258010c 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -1,10 +1,15 @@
 
-# HACK
-all: ${TARGET_$P} ${CFGS_$P} ${LIBSTXT_$P} ${LIBSCPY_$P} ${TXT_$P}
+${G_ALL_PHYSICS}: ${TARGET_$P} ${CFGS_$P} ${LIBSTXT_$P} ${LIBSCPY_$P} ${TXT_$P}
+${G_OBJS_PHYSICS}: ${L_OBJS_$P}
+${G_DEPS_PHYSICS}: ${L_DEPS_$P}
 
-#${G_OBJS_TESTS}: ${L_OBJS_$P}
-#${G_DEPS_TESTS}: ${L_DEPS_$P}
 
+${TARGETTMP_$D}: ${BINDIR_$P}${LIBSDIRNAME_$P}${SONAME_${G_LIB}}
+
+
+# rule to copy library lib into the working directory
+${BINDIR_$P}${LIBSDIRNAME_$P}${SONAME_${G_LIB}}: ${TARGET_${G_LIB}} | $${@D}
+       ${cmd-cp}
 
 # how to link the main target
 ${TARGETTMP_$P}: ${L_OBJS_$P} | $${@D}
@@ -14,20 +19,16 @@ ${TARGETTMP_$P}: ${L_OBJS_$P} | $${@D}
 ${TARGET_$P}: ${TARGETTMP_$P} | $${@D}
        ${cmd-cp}
 
-# how to copy a library to the bin directory
-#${BINDIR_$P}${SONAME_${G_LIB}}: ${TARGET_${G_LIB}} | $${@D}
-#      ${cmd-cp}
-
 # rule to copy the config files into the working directory
-${DSTCFGDIR_$P}%: ${SRCCFGDIR_$P}% | $$(dir $$@)
+${DSTCFGDIR_$P}%: ${SRCCFGDIR_$P}% | $${@D}
        ${cmd-cp}
 
 # rule to copy the library files into the working directory
-${DSTLIBSDIR_$P}%: ${SRCLIBSDIR_$P}% | $$(dir $$@)
+${DSTLIBSDIR_$P}%: ${SRCLIBSDIR_$P}% | $${@D}
        ${cmd-cp}
 
 # rule to copy the text files into the working directory
-${DSTTXTDIR_$P}%: ${SRCTXTDIR_$P}% | $$(dir $$@)
+${DSTTXTDIR_$P}%: ${SRCTXTDIR_$P}% | $${@D}
        ${cmd-cp}
 
 # rule to make an object file from a .cpp
@@ -39,34 +40,7 @@ ${DEPSDIR_$P}%.d: ${SRCSDIR_$P}%.cpp | $${@D}
        ${cmd-cpptodep}
 
 
-L_CLEANCMDS +=  cleanbin-$P
-cleanbin:       cleanbin-$P
-.PHONY:         cleanbin-$P
-cleanbin-$P:
-       ${Q1}${PRNTFMT} "rm" "${BINDIR}"
-       ${Q2}rm -rf ${BINDIR}
-
-L_CLEANCMDS +=  cleanobjs-$P
-cleanobjs:      cleanobjs-$P
-.PHONY:         cleanobjs-$P
-cleanobjs-$P:
-       ${Q1}${PRNTFMT} "rm" "${OBJSDIR}"
-       ${Q2}rm -rf ${OBJSDIR}
-
-L_CLEANCMDS +=  cleandeps-$P
-cleandeps:      cleandeps-$P
-.PHONY:         cleandeps-$P
-cleandeps-$P:
-       ${Q1}${PRNTFMT} "rm" "${DEPSDIR}"
-       ${Q2}rm -rf ${DEPSDIR}
-
-L_CLEANCMDS +=  clean-$P
-clean:          clean-$P
-.PHONY:         clean-$P
-clean-$P: cleanobjs-$P cleanbin-$P
-
-L_CLEANCMDS +=  cleanall-$P
-cleanall:       cleanall-$P
-.PHONY:         cleanall-$P
-cleanall-$P: cleanbin-$P cleanobjs-$P cleandeps-$P
+T := $P
+    include ${F_CLEANRULES}
+T :=