From: smckown Date: Thu, 26 Feb 2009 20:57:31 +0000 (+0000) Subject: Possible tos.mk; see the comments inside. X-Git-Tag: patchset/2.1.1-4.4~23 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=bbb97f3ed9d066b269f54b9d5e35a06914078bef Possible tos.mk; see the comments inside. --- diff --git a/tos.mk b/tos.mk new file mode 100644 index 00000000..4ed360eb --- /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)