From: regehr Date: Mon, 11 Feb 2008 20:12:15 +0000 (+0000) Subject: Makefile support for Safe TinyOS on AVR: Just pass the -safe option to ncc X-Git-Tag: release_tinyos_2_1_0_0~558 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=c9a98d43014466bab076cf57bd461aef7950cd46 Makefile support for Safe TinyOS on AVR: Just pass the -safe option to ncc which does the heavy lifting. Usage: "make micaz safe" --- diff --git a/support/make/avr/avr.rules b/support/make/avr/avr.rules index b0671d52..3afd445a 100644 --- a/support/make/avr/avr.rules +++ b/support/make/avr/avr.rules @@ -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 index 00000000..583186f5 --- /dev/null +++ b/support/make/safe.extra @@ -0,0 +1,5 @@ +#-*-Makefile-*- + +MAKE_DEPUTY_FLAG := 1 +export MAKE_DEPUTY_FLAG +