blob: c62b8a6e9a1055ecd1a943d93c30a5839fd00fa1 (
plain)
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
|
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
TARGET = stub
OBJS = start.o sh-stub.o
LIBS = -lgcc
.s.o:
sh-elf-as -o $@ $<
.c.o:
sh-elf-gcc -O -I../firmware/drivers -m1 -Wall -Wstrict-prototypes -c -o $@ $<
$(TARGET).out: $(TARGET).elf
sh-elf-objcopy -O binary $(TARGET).elf $(TARGET).out
scramble $(TARGET).out archos.mod
$(TARGET).elf: $(OBJS)
sh-elf-gcc -nostartfiles $(OBJS) -lgcc -Wl,-Map,$(TARGET).map -o $(TARGET).elf -Tlinker.cfg
clean:
rm $(OBJS) $(TARGET).map $(TARGET).elf $(TARGET).out archos.mod
start.o: start.s
sh-stub.o: sh-stub.c
|