2002-04-15 08:35:08 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
TARGET = stub
|
2002-05-11 20:04:48 +00:00
|
|
|
OBJS = start.o sh-stub.o
|
2002-04-15 08:35:08 +00:00
|
|
|
LIBS = -lgcc
|
|
|
|
|
|
|
|
.s.o:
|
|
|
|
sh-elf-as -o $@ $<
|
|
|
|
|
|
|
|
.c.o:
|
2002-04-23 20:33:45 +00:00
|
|
|
sh-elf-gcc -O -I../firmware/drivers -m1 -Wall -Wstrict-prototypes -c -o $@ $<
|
2002-04-15 08:35:08 +00:00
|
|
|
|
2002-06-19 12:04:21 +00:00
|
|
|
archos.mod: $(TARGET).elf
|
2002-04-15 08:35:08 +00:00
|
|
|
sh-elf-objcopy -O binary $(TARGET).elf $(TARGET).out
|
2002-06-19 12:04:21 +00:00
|
|
|
../tools/scramble $(TARGET).out archos.mod
|
2002-04-15 08:35:08 +00:00
|
|
|
|
|
|
|
$(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
|
2002-05-11 20:04:48 +00:00
|
|
|
sh-stub.o: sh-stub.c
|