]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Possible tos.mk; see the comments inside.
authorsmckown <smckown@4bc1554a-c7f2-4f65-a403-e0be01f0239c>
Thu, 26 Feb 2009 20:57:31 +0000 (20:57 +0000)
committerR. Steve McKown <rsmckown@gmail.com>
Thu, 4 Nov 2010 14:24:53 +0000 (08:24 -0600)
tos.mk [new file with mode: 0644]

diff --git a/tos.mk b/tos.mk
new file mode 100644 (file)
index 0000000..4ed360e
--- /dev/null
+++ b/tos.mk
@@ -0,0 +1,24 @@
+# User makefiles include this one to setup the tinyos environment for this
+# instance of the TinyOS source tree and build scripts.
+#
+# The pro of this approach is that we don't need any environment support for
+# doing make-ish things in TinyOS.  The con is that things that run outside
+# of make break, like tos-check-env, tos-deluge, and tos-bsl (the latter if
+# under Cygwin and using cp2103 based motes).
+
+# Set TOSROOT to the directory in which this include file is located
+this := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+export TOSROOT := $(shell dirname $(this))
+
+# Build an updated CLASSPATH
+ifeq (,$(CLASSPATH))
+  tmpCLASS := $(TOSROOT)/support/sdk/java
+else
+  tmpCLASS := $(CLASSPATH):$(TOSROOT)/support/sdk/java
+endif
+
+export TOSDIR = $(TOSROOT)/tos
+export CLASSPATH = $(tmpCLASS)
+export MAKERULES = $(TOSROOT)/support/make/Makerules
+
+include $(MAKERULES)