forked from jameswalmsley/RaspberryPi-FreeRTOS
-
Notifications
You must be signed in to change notification settings - Fork 46
/
Makefile
33 lines (24 loc) · 846 Bytes
/
Makefile
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
#
# Makefile for FreeRTOS demo on Raspberry Pi
#
BASE=$(shell pwd)/
BUILD_DIR=$(shell pwd)/build/
MODULE_NAME="RaspberryPi BSP"
TARGETS=kernel7.img kernel.list kernel.syms kernel.elf kernel.map
LINKER_SCRIPT=raspberrypi.ld
-include .dbuild/dbuild.mk
all: kernel.list kernel7.img kernel.syms
@$(SIZE) kernel.elf
kernel7.img: kernel.elf
$(Q)$(PRETTY) IMAGE $(MODULE_NAME) $@
$(Q)$(OBJCOPY) kernel.elf -O binary $@
kernel.list: kernel.elf
$(Q)$(PRETTY) LIST $(MODULE_NAME) $@
$(Q)$(OBJDUMP) -D -S kernel.elf > $@
kernel.syms: kernel.elf
$(Q)$(PRETTY) SYMS $(MODULE_NAME) $@
$(Q)$(OBJDUMP) -t kernel.elf > $@
kernel.elf: LDFLAGS += -L "/usr/lib/gcc/arm-none-eabi/4.9.3" -lgcc
kernel.elf: LDFLAGS += -L "/usr/lib/arm-none-eabi/lib" -lc
kernel.elf: $(OBJECTS)
$(Q)$(LD) $(OBJECTS) -Map kernel.map -o $@ -T $(LINKER_SCRIPT) $(LDFLAGS)