mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-03 14:24:15 +01:00
58 lines
2.2 KiB
Makefile
58 lines
2.2 KiB
Makefile
#
|
|
# 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 = ../../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
|
|
AR = $(CROSS_COMPILE)ar
|
|
CC = $(CROSS_COMPILE)gcc
|
|
AS = $(CROSS_COMPILE)as
|
|
#LD = $(CROSS_COMPILE)ld
|
|
#SIZE = $(CROSS_COMPILE)size
|
|
NM = $(CROSS_COMPILE)nm
|
|
#OBJCOPY = $(CROSS_COMPILE)objcopy
|
|
RM=cs-rm -Rf
|
|
SEP=/
|
|
|
|
# Flags
|
|
|
|
CFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int
|
|
CFLAGS += -Werror-implicit-function-declaration -Wmain -Wparentheses
|
|
CFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
|
|
CFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
|
|
CFLAGS += -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings
|
|
CFLAGS += -Wsign-compare -Waggregate-return -Wstrict-prototypes
|
|
CFLAGS += -Wmissing-prototypes -Wmissing-declarations
|
|
CFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
|
|
CFLAGS += -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wlong-long
|
|
CFLAGS += -Wunreachable-code
|
|
CFLAGS += -Wcast-align
|
|
#CFLAGS += -Wmissing-noreturn
|
|
#CFLAGS += -Wconversion
|
|
|
|
# To reduce application size use only integer printf function.
|
|
CFLAGS += -Dprintf=iprintf
|
|
|
|
CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections
|
|
CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP)
|
|
|
|
ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -a -g $(INCLUDES)
|