]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Makefile support for Safe TinyOS on AVR: Just pass the -safe option to ncc
authorregehr <regehr>
Mon, 11 Feb 2008 20:12:15 +0000 (20:12 +0000)
committerregehr <regehr>
Mon, 11 Feb 2008 20:12:15 +0000 (20:12 +0000)
which does the heavy lifting.

Usage: "make micaz safe"

support/make/avr/avr.rules
support/make/safe.extra [new file with mode: 0644]

index b0671d5214470710255a0ab584f0bfe410192114..3afd445a6c6b018e8ce97fb3fcb3301115de7fd7 100644 (file)
@@ -23,6 +23,12 @@ define AVR_HELP
 endef
 HELP += $(AVR_HELP)
 
+ifdef MAKE_DEPUTY_FLAG
+        NCC_SAFE_TINYOS_FLAG = -safe
+else
+        NCC_SAFE_TINYOS_FLAG =
+endif
+
 OBJCOPY = avr-objcopy
 OBJDUMP = avr-objdump
 SET_ID = tos-set-symbols
@@ -124,7 +130,10 @@ exe: exe0 bytes FORCE
 
 exe0: builddir $(BUILD_EXTRA_DEPS) FORCE
        @echo "    compiling $(COMPONENT) to a $(PLATFORM) binary"
-       $(NCC) -o $(MAIN_EXE) $(OPTFLAGS) $(PFLAGS) $(CFLAGS) $(WIRING_CHECK_FLAGS) $(COMPONENT).nc $(LIBS) $(LDFLAGS)
+ifdef MAKE_DEPUTY_FLAG
+       @echo "  ***** compiling Safe TinyOS *****"
+endif
+       $(NCC) -o $(MAIN_EXE) $(NCC_SAFE_TINYOS_FLAG) $(OPTFLAGS) $(PFLAGS) $(CFLAGS) $(WIRING_CHECK_FLAGS) $(COMPONENT).nc $(LIBS) $(LDFLAGS)
 ifdef WIRING_CHECK_FILE
        @nescc-wiring $(WIRING_CHECK_FILE)
 endif
diff --git a/support/make/safe.extra b/support/make/safe.extra
new file mode 100644 (file)
index 0000000..583186f
--- /dev/null
@@ -0,0 +1,5 @@
+#-*-Makefile-*-
+
+MAKE_DEPUTY_FLAG := 1
+export MAKE_DEPUTY_FLAG
+