diff --git a/hardware/arduino/sam/cores/sam/build_gcc/gcc.mk b/hardware/arduino/sam/cores/sam/build_gcc/gcc.mk index e7436816e..497463b9d 100644 --- a/hardware/arduino/sam/cores/sam/build_gcc/gcc.mk +++ b/hardware/arduino/sam/cores/sam/build_gcc/gcc.mk @@ -1,7 +1,22 @@ +# +# Copyright (c) 2011 Arduino. All right reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# # Tool suffix when cross-compiling -#CROSS_COMPILE = ../../../../tools/CodeSourcery_arm/bin/arm-none-eabi- -#CROSS_COMPILE = C:/CodeSourcery_2011.03-42/bin/arm-none-eabi- CROSS_COMPILE = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi- # Compilation tools @@ -9,12 +24,14 @@ AR = $(CROSS_COMPILE)ar CC = $(CROSS_COMPILE)gcc CXX = $(CROSS_COMPILE)g++ AS = $(CROSS_COMPILE)as -#LD = $(CROSS_COMPILE)ld -#SIZE = $(CROSS_COMPILE)size NM = $(CROSS_COMPILE)nm -#OBJCOPY = $(CROSS_COMPILE)objcopy +ifeq ($(OS),Windows_NT) RM=cs-rm -Rf -SEP=\\ +else +RM=rm -Rf +endif + +SEP=/ # --------------------------------------------------------------------------------------- # C Flags @@ -33,7 +50,7 @@ CFLAGS += -Wcast-align #CFLAGS += -Wmissing-noreturn #CFLAGS += -Wconversion -CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -nostdlib +CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -nostdlib -std=c99 CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D$(VARIANT) # To reduce application size use only integer printf function. @@ -54,7 +71,7 @@ CPPFLAGS += -Wpacked -Wredundant-decls -Winline -Wlong-long #CPPFLAGS += -Wconversion #-fno-rtti -fno-exceptions -CPPFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections +CPPFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -std=c++98 CPPFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) # To reduce application size use only integer printf function.