mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
21 lines
695 B
Makefile
21 lines
695 B
Makefile
ARM=1
|
|
|
|
ifndef LINKER_FILE # nRF5x targets define their own linker file.
|
|
LINKER_FILE = $(GENDIR)/linker.ld
|
|
endif
|
|
DEFINES += -DARM
|
|
ifndef ARM_HAS_OWN_CMSIS # nRF5x targets do not use the shared CMSIS files.
|
|
INCLUDE += -I$(ROOT)/targetlibs/arm
|
|
endif
|
|
OPTIMIZEFLAGS += -fno-common -fno-exceptions -fdata-sections -ffunction-sections
|
|
|
|
# I've no idea why this breaks the bootloader, but it does.
|
|
# Given we've left 10k for it, there's no real reason to enable LTO anyway.
|
|
ifndef BOOTLOADER
|
|
# Enable link-time optimisations (inlining across files)
|
|
OPTIMIZEFLAGS += -flto -fno-fat-lto-objects -Wl,--allow-multiple-definition
|
|
DEFINES += -DLINK_TIME_OPTIMISATION
|
|
endif
|
|
|
|
export CCPREFIX?=arm-none-eabi-
|