-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (36 loc) · 1.02 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# ----------------------------------------
# Disciplina: MC404 - 1o semestre de 2015
# Professor: Edson Borin
#
# Descrição: Makefile para o segundo trabalho
# ----------------------------------------
# ----------------------------------
# SOUL object files -- Add your SOUL object files here
SOUL_OBJS=soul.o
# ----------------------------------
# Compiling/Assembling/Linking Tools and flags
AS=arm-eabi-as
AS_FLAGS=-g
CC=arm-eabi-gcc
CC_FLAGS=-g
LD=arm-eabi-ld
LD_FLAGS=-g
# ----------------------------------
# Default rule
all: disk.img
# ----------------------------------
# Generic Rules
%.o: %.s
$(AS) $(AS_FLAGS) $< -o $@
%.o: %.c
$(CC) $(CC_FLAGS) -c $< -o $@
# ----------------------------------
# Specific Rules
SOUL.x: $(SOUL_OBJS)
$(LD) $^ -o $@ $(LD_FLAGS) --section-start=.iv=0x778005e0 -Ttext=0x77800700 -Tdata=0x77801800 -e 0x778005e0
LOCO.x: loco.o bico.o
$(LD) $^ -o $@ $(LD_FLAGS) -Ttext=0x77802000
disk.img: SOUL.x LOCO.x
mksd.sh --so SOUL.x --user LOCO.x
clean:
rm -f SOUL.x LOCO.x disk.img *.o