Makefile
1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
include ion/src/device/boot/Makefile
include ion/src/device/bench/Makefile
include ion/src/device/usb/Makefile
ion/src/shared/platform_info.o: SFLAGS += -DHEADER_SECTION="__attribute__((section(\".header\")))"
objs += $(addprefix ion/src/shared/, \
console_line.o \
events_modifier.o \
)
# If you need to profile execution, you can replace events_keyboard with
# events_replay.o and dummy/events_modifier.o
objs += $(addprefix ion/src/device/, \
backlight.o \
battery.o\
base64.o\
console.o \
device.o\
display.o\
events.o\
flash.o\
keyboard.o\
led.o\
power.o\
sd_card.o\
swd.o \
usb.o \
wakeup.o \
)
# When using the register.h C++ file in production mode, we expect the compiler
# to completely inline all bit manipulations. For some reason, if we build using
# the -Os optimization flag, GCC doesn't inline everything and and ends up
# emitting calls to aeabi_llsl for 64-bits registers. This is very sub-optimal
# so we're enforcing -O3 for this specific file.
ifneq ($(DEBUG),1)
ifneq ($(COMPILER),llvm)
ion/src/device/led.o: SFLAGS+=-O3
ion/src/device/console.o: SFLAGS+=-O3
ion/src/device/display.o: SFLAGS+=-O3
ion/src/device/swd.o: SFLAGS+=-O3
endif
endif
#objs += $(addprefix ion/src/device/keyboard/, keyboard.o)