From 092c69639c099562741cc5b30ed5ec6d298c3769 Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Wed, 11 Jul 2012 00:06:39 +0100 Subject: [PATCH] Enable `native` target for cross-compiling - by now it would have worked if you set CC via command line (e.g. `make CC=clang`, though it wouldn't work when CC is set in the platform makefile which includes `Makefile.native`. --- cpu/native/Makefile.native | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cpu/native/Makefile.native b/cpu/native/Makefile.native index 56fb6688b..166c139cc 100644 --- a/cpu/native/Makefile.native +++ b/cpu/native/Makefile.native @@ -3,12 +3,12 @@ CONTIKI_CPU_DIRS = . net CONTIKI_SOURCEFILES += mtarch.c rtimer-arch.c elfloader-stub.c watchdog.c ### Compiler definitions -CC = gcc -LD = gcc -AS = as -NM = nm -OBJCOPY = objcopy -STRIP = strip +CC ?= gcc +LD ?= gcc +AS ?= as +NM ?= nm +OBJCOPY ?= objcopy +STRIP ?= strip ifdef WERROR CFLAGSWERROR=-Werror -pedantic -std=c99 -Werror endif