mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
0dcd5e9b5a
This patch slightly revises CFLAGS and LDFLAGS to specify the optimization and debugging options and linker script in a way that is compatible with using Clang as the C compiler and to invoke the linker (i.e. CC = clang and LD = clang).
25 lines
459 B
Makefile
25 lines
459 B
Makefile
CONTIKI_CPU_DIRS += . init/common
|
|
|
|
CONTIKI_SOURCEFILES += gdt.c helpers.S idt.c cpu.c
|
|
|
|
CC = gcc
|
|
LD = gcc
|
|
AS = as
|
|
OBJCOPY = objcopy
|
|
SIZE = size
|
|
STRIP = strip
|
|
|
|
CFLAGS += -Wall
|
|
LDFLAGS += -Wl,-Map=contiki-$(TARGET).map,--build-id=none
|
|
|
|
ifeq ($(BUILD_RELEASE),1)
|
|
CFLAGS += -Os -fno-strict-aliasing
|
|
LDFLAGS += -Wl,--strip-all
|
|
else
|
|
ifeq ($(findstring clang,$(CC)),clang)
|
|
CFLAGS += -O0 -g
|
|
else
|
|
CFLAGS += -Og -ggdb3
|
|
endif
|
|
endif
|