WiiFlow_Lite/resources/wiiflow_game_booter/Makefile
fix94.1 d61801fd3e -more work on the new wii game loader, hopefully you can use
cheats, save emu, nsmbw + pop patch, wanin cios and hermes cios,
and return to wiiflow again (works here with d2x again)
-fixed some important stuff in wiiflow itself, less corruption
of the dol and more static stuff to get it back to stability
2012-10-13 16:57:03 +00:00

67 lines
1.8 KiB
Makefile

#PREFIX = powerpc-gekko-
PREFIX = $(DEVKITPPC)/bin/powerpc-eabi-
#PREFIX = /home/megazig/Wii/bootmii-utils/bin/powerpc-elf-
AR = $(PREFIX)ar
AS = $(PREFIX)as
CC = $(PREFIX)gcc
CXX = $(PREFIX)g++
LD = $(PREFIX)ld
OBJCOPY = $(PREFIX)objcopy
RANLIB = $(PREFIX)ranlib
STRIP = $(PREFIX)strip
MACHDEP = -mcpu=750 -mno-eabi -mhard-float -DTINY -DDEBUG
#CFLAGS = $(MACHDEP) -Os -Wall -pipe -ffunction-sections -finline-functions-called-once -mno-sdata --combine -fwhole-program -ffreestanding
CFLAGS = $(MACHDEP) -O1 -Wall -pipe -ffunction-sections -finline-functions-called-once -mno-sdata
LDFLAGS = $(MACHDEP) -n -nostartfiles -nostdlib -Wl,-T,link.ld -L.
ASFLAGS = -D_LANGUAGE_ASSEMBLY -DHW_RVL -DTINY
TARGET_LINKED = boot.elf
TARGET = booter.bin
CFILES = apploader.c cios.c cache.c debug.c di.c disc.c ios.c patchcode.c usb.c utils.c video.c \
fst.c multidol.c wip.c main.c
#OBJS = crt0.o _all.o
OBJS = crt0.o apploader.o cios.o cache.o debug.o di.o disc.o ios.o patchcode.o patchhook.o usb.o utils.o video.o \
fst.o multidol.o wip.o main.o
DEPDIR = .deps
LIBS =
all: $(TARGET)
%.o: %.s
@echo " ASSEMBLE $<"
@$(CC) $(CFLAGS) $(DEFINES) $(ASFLAGS) -c $< -o $@
%.o: %.S
@echo " ASSEMBLE $<"
@$(CC) $(CFLAGS) $(DEFINES) $(ASFLAGS) -c $< -o $@
%.o: %.c
@echo " COMPILE $<"
@$(CC) $(CFLAGS) $(DEFINES) -c $< -o $@
%.o: %.cpp
@echo " COMPILE $<"
@$(CXX) $(CFLAGS) $(DEFINES) -c $< -o $@
#_all.o: $(CFILES)
# @echo " COMPILE ALL "
# @mkdir -p $(DEPDIR)
# @$(CC) $(CFLAGS) $(DEFINES) -Wp,-MMD,$(DEPDIR)/$(*F).d,-MQ,"$@",-MP -c $(CFILES) -o $@
$(TARGET_LINKED): $(OBJS)
@echo " LINK $@"
@$(CC) -g -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
$(TARGET): $(TARGET_LINKED)
@echo " OBJCOPY $@"
@$(OBJCOPY) -O binary $< $@
clean:
rm -rf $(TARGET_LINKED) $(TARGET) $(OBJS) $(DEPDIR)