2015-07-02 23:13:53 +00:00
|
|
|
CONTIKI_CPU_DIRS += . init/common
|
2007-05-13 08:41:11 +00:00
|
|
|
|
2015-04-29 17:58:29 +00: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 21:20:20 +00:00
|
|
|
SIZE = size
|
2006-06-17 22:41:10 +00:00
|
|
|
STRIP = strip
|
2015-04-29 17:58:29 +00:00
|
|
|
|
2015-07-27 02:28:31 +00: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 21:39:18 +00:00
|
|
|
LDFLAGS += -Wl,-Map=contiki-$(TARGET).map,--build-id=none
|
2015-07-10 14:01:57 +00:00
|
|
|
|
|
|
|
ifeq ($(BUILD_RELEASE),1)
|
2015-09-29 20:06:21 +00: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 14:44:28 +00:00
|
|
|
else
|
2015-10-02 12:19:15 +00:00
|
|
|
CFLAGS += -O0
|
2015-07-29 14:28:13 +00:00
|
|
|
ifeq ($(findstring clang,$(CC)),clang)
|
2015-10-02 12:19:15 +00:00
|
|
|
CFLAGS += -g
|
2015-07-29 14:28:13 +00:00
|
|
|
else
|
2015-10-02 12:19:15 +00:00
|
|
|
CFLAGS += -ggdb3
|
2015-07-29 14:28:13 +00:00
|
|
|
endif
|
2015-07-10 14:01:57 +00:00
|
|
|
endif
|