2015-07-02 20:13:53 -03:00
|
|
|
CONTIKI_CPU_DIRS += . init/common
|
2007-05-13 08:41:11 +00:00
|
|
|
|
2015-04-29 14:58:29 -03:00
|
|
|
CONTIKI_SOURCEFILES += gdt.c helpers.S idt.c cpu.c
|
2006-06-17 22:41:10 +00:00
|
|
|
|
|
|
|
CC = gcc
|
2007-03-15 21:52:00 +00:00
|
|
|
LD = gcc
|
2006-06-17 22:41:10 +00:00
|
|
|
AS = as
|
|
|
|
OBJCOPY = objcopy
|
2015-07-01 18:20:20 -03:00
|
|
|
SIZE = size
|
2006-06-17 22:41:10 +00:00
|
|
|
STRIP = strip
|
2015-04-29 14:58:29 -03:00
|
|
|
|
2015-07-26 19:28:31 -07:00
|
|
|
# Omit exception handling unwind tables (see
|
|
|
|
# http://wiki.dwarfstd.org/index.php?title=Exception_Handling). Removing these
|
|
|
|
# tables saves space and has not caused any readily-apparent functional
|
|
|
|
# changes.
|
|
|
|
#
|
|
|
|
# Synchronize the unwind table options here with the CFLAGS and CXXFLAGS in
|
|
|
|
# ./bsp/libc/build_newlib.sh.
|
|
|
|
CFLAGS += -Wall -fno-asynchronous-unwind-tables -fno-unwind-tables
|
2015-07-06 18:39:18 -03:00
|
|
|
LDFLAGS += -Wl,-Map=contiki-$(TARGET).map,--build-id=none
|
2015-07-10 11:01:57 -03:00
|
|
|
|
|
|
|
ifeq ($(BUILD_RELEASE),1)
|
2015-09-29 17:06:21 -03:00
|
|
|
CFLAGS += -Os -fno-strict-aliasing -ffunction-sections -fdata-sections
|
|
|
|
# XXX: --gc-sections can be very tricky sometimes. If somehow the release
|
|
|
|
# binary seems to be broken, check if removing this option fixes the issue.
|
|
|
|
LDFLAGS += -Wl,--strip-all,--gc-sections
|
2015-07-10 11:44:28 -03:00
|
|
|
else
|
2015-10-02 09:19:15 -03:00
|
|
|
CFLAGS += -O0
|
2015-07-29 07:28:13 -07:00
|
|
|
ifeq ($(findstring clang,$(CC)),clang)
|
2015-10-02 09:19:15 -03:00
|
|
|
CFLAGS += -g
|
2015-07-29 07:28:13 -07:00
|
|
|
else
|
2015-10-02 09:19:15 -03:00
|
|
|
CFLAGS += -ggdb3
|
2015-07-29 07:28:13 -07:00
|
|
|
endif
|
2015-07-10 11:01:57 -03:00
|
|
|
endif
|