2009-04-04 18:59:31 +02:00
|
|
|
include ../../starlet.mk
|
2009-01-07 17:56:57 +01:00
|
|
|
|
2009-04-04 18:59:31 +02:00
|
|
|
ASFLAGS += -D_LANGUAGE_ASSEMBLY
|
2009-05-12 21:50:05 +02:00
|
|
|
CFLAGS += -DCAN_HAZ_IRQ -DCAN_HAZ_IPC -mthumb-interwork
|
|
|
|
THUMBFLAGS = -mthumb
|
2009-04-05 16:03:04 +02:00
|
|
|
LDSCRIPT = mini.ld
|
2009-01-07 17:56:57 +01:00
|
|
|
LIBS = -lgcc
|
2008-12-28 14:35:37 +01:00
|
|
|
|
2009-01-06 00:13:39 +01:00
|
|
|
ELFLOADER = ../elfloader/elfloader.bin
|
|
|
|
MAKEBIN = python ../makebin.py
|
|
|
|
|
2009-04-04 18:59:31 +02:00
|
|
|
TARGET = armboot.elf
|
|
|
|
TARGET_BIN = armboot.bin
|
2009-05-12 21:50:05 +02:00
|
|
|
OBJS = start.o memory.o memory_asm.o utils_asm.o panic.o irq_asm.o ipc.o \
|
|
|
|
exception_asm.o nand.o exception.o ldhack.o
|
|
|
|
THUMB_OBJS = sdmmc.o sdhc.o boot2.o powerpc.o powerpc_elf.o diskio.o ff.o \
|
|
|
|
crypto.o seeprom.o utils.o main.o vsprintf.o string.o \
|
|
|
|
gecko.o irq.o
|
2008-12-28 14:35:37 +01:00
|
|
|
|
2009-04-04 18:59:31 +02:00
|
|
|
include ../../common.mk
|
2008-12-28 14:35:37 +01:00
|
|
|
|
2009-04-04 18:59:31 +02:00
|
|
|
all: $(TARGET_BIN)
|
2008-12-28 14:35:37 +01:00
|
|
|
|
2009-05-11 04:19:57 +02:00
|
|
|
main.o: main.c git_version.h
|
|
|
|
|
2009-05-12 21:50:05 +02:00
|
|
|
$(THUMB_OBJS): %.o : %.c
|
|
|
|
@echo " COMPILE[T] $<"
|
|
|
|
@mkdir -p $(DEPDIR)
|
|
|
|
@$(CC) $(CFLAGS) $(THUMBFLAGS) $(DEFINES) -Wp,-MMD,$(DEPDIR)/$(*F).d,-MQ,"$@",-MP -c $< -o $@
|
|
|
|
|
2009-04-04 18:59:31 +02:00
|
|
|
$(TARGET_BIN): $(TARGET) $(ELFLOADER)
|
|
|
|
@echo "MAKEBIN $@"
|
|
|
|
@$(MAKEBIN) $(ELFLOADER) $< $@
|
2008-12-28 14:35:37 +01:00
|
|
|
|
2009-04-10 17:25:13 +02:00
|
|
|
upload: $(TARGET_BIN)
|
|
|
|
@$(WIIDEV)/bin/bootmii -a $<
|
2009-05-11 04:19:57 +02:00
|
|
|
|
|
|
|
git_version.h:
|
2009-05-12 22:50:22 +02:00
|
|
|
@echo " GITVER $@"
|
|
|
|
@echo 'const char git_version[] = "'`./describesimple.sh`'";' > git_version.h
|
2009-04-10 17:25:13 +02:00
|
|
|
|
2009-04-04 18:59:31 +02:00
|
|
|
clean: myclean
|
2008-12-28 14:35:37 +01:00
|
|
|
|
2009-04-04 18:59:31 +02:00
|
|
|
myclean:
|
2009-05-11 04:19:57 +02:00
|
|
|
-rm -f $(TARGET_BIN) git_version.h
|
2008-12-28 14:35:37 +01:00
|
|
|
|