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