#----------------------------------------------------------------------
# Some SCONS shortcuts
#----------------------------------------------------------------------
-
-CONCURRENCY_LEVEL ?= 2
+CONCURRENCY_LEVEL ?= $(shell grep process /proc/cpuinfo | wc -l)
ifdef final
SCONS_ARGS += "final="$(final)
%/build:
$(SCONS) $*
+#----------------------------------------------------------------------
+# remote compile targets
+#----------------------------------------------------------------------
+JOBS := 1
+all@% all_docs@% all_test@% build@%:
+ ssh $* "cd `pwd` && $(MAKE) -j $(JOBS) $(firstword $(subst @, ,$@))"
+
+
#----------------------------------------------------------------------
# test coverage
#----------------------------------------------------------------------