blob: e4a3154a52a784fdf818f7a35ab1f01c5090622f [file] [log] [blame]
Björn Stenbergd42d78f2002-04-15 08:35:08 +00001# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9TARGET = stub
10OBJS = start.o sh-stub.o
Björn Stenbergd42d78f2002-04-15 08:35:08 +000011LIBS = -lgcc
12
13.s.o:
14 sh-elf-as -o $@ $<
15
16.c.o:
Linus Nielsen Feltzing88c398a2002-04-23 20:33:45 +000017 sh-elf-gcc -O -I../firmware/drivers -m1 -Wall -Wstrict-prototypes -c -o $@ $<
Björn Stenbergd42d78f2002-04-15 08:35:08 +000018
19$(TARGET).out: $(TARGET).elf
20 sh-elf-objcopy -O binary $(TARGET).elf $(TARGET).out
21 scramble $(TARGET).out archos.mod
22
23$(TARGET).elf: $(OBJS)
24 sh-elf-gcc -nostartfiles $(OBJS) -lgcc -Wl,-Map,$(TARGET).map -o $(TARGET).elf -Tlinker.cfg
25
26clean:
27 rm $(OBJS) $(TARGET).map $(TARGET).elf $(TARGET).out archos.mod
28
29start.o: start.s
30stub.o: stub.c
31s-stub.o: sh-stub.c