mirror of
https://github.com/modmii/YAWM-ModMii-Edition.git
synced 2024-11-25 17:46:52 +01:00
0ed791842f
- Added app load/launch code Notes: - Will add support for arguments later
47 lines
1000 B
Makefile
47 lines
1000 B
Makefile
|
|
PREFIX = $(DEVKITPPC)/bin/powerpc-eabi-
|
|
|
|
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 -meabi -mhard-float
|
|
CFLAGS = $(MACHDEP) -O0 -s -Werror -Wall -fdata-sections -ffunction-sections
|
|
LDFLAGS = $(MACHDEP) -n -nostartfiles -nostdlib -Wl,--gc-sections,-T,openstub.ld -L.
|
|
ASFLAGS = -D_LANGUAGE_ASSEMBLY -DHW_RVL
|
|
|
|
TARGET_LINKED = patcher.elf
|
|
TARGET = ../../data/appboot.bin
|
|
|
|
CFILES = main.c utils.c loaddol.c loadelf.c
|
|
OBJS = main.o utils.o loaddol.o loadelf.o
|
|
|
|
DEPDIR = .deps
|
|
|
|
LIBS =
|
|
|
|
all: $(TARGET)
|
|
|
|
%.o: %.s
|
|
@$(CC) $(CFLAGS) $(DEFINES) $(ASFLAGS) -c $< -o $@
|
|
|
|
%.o: %.S
|
|
@$(CC) $(CFLAGS) $(DEFINES) $(ASFLAGS) -c $< -o $@
|
|
|
|
%.o: %.c
|
|
@$(CC) $(CFLAGS) $(DEFINES) -c $< -o $@
|
|
|
|
$(TARGET_LINKED): $(OBJS)
|
|
@$(CC) -g -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
|
|
|
|
$(TARGET): $(TARGET_LINKED)
|
|
@$(OBJCOPY) -O binary -S $< $@
|
|
|
|
clean:
|
|
@-$(RM) -rf $(TARGET_LINKED) $(OBJS) $(DEPDIR)
|