WiiFlow_Lite/resources/extldr/Makefile
Fledge68 12d21fa0a7 - now compiled with devkitppc r39-2 (GCC 11) and libogc 2.3.1-1
- updated libwolfssl
- many thanks to blackb0x
2021-09-06 14:16:45 -05:00

52 lines
1.2 KiB
Makefile

export PATH := $(DEVKITPPC)/bin:$(PATH)
PREFIX = 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
FALSE_POSITIVES := -Wno-array-bounds -Wno-stringop-overflow -Wno-stringop-overread
MACHDEP = -mcpu=750 -mno-eabi
CFLAGS = $(FALSE_POSITIVES) $(MACHDEP) -O1 -Werror -Wall -pipe -mno-sdata
LDFLAGS = $(MACHDEP) -n -nostartfiles -nostdlib -Wl,-T,link.ld -L.
ASFLAGS = -D_LANGUAGE_ASSEMBLY -DHW_RVL -x assembler-with-cpp
TARGET_LINKED = boot.elf
TARGET = extldr.bin
CFILES = string.c ios.c utils.c cache.c usbgecko.c main.c
OBJS = crt0.o memory.o string.o ios.o utils.o cache.o usbgecko.o main.o
DEPDIR = .deps
all: $(TARGET)
%.o: %.s
@echo "$<"
@$(CC) $(CFLAGS) $(DEFINES) $(ASFLAGS) -c $< -o $@
%.o: %.S
@echo "$<"
@$(CC) $(CFLAGS) $(DEFINES) $(ASFLAGS) -c $< -o $@
%.o: %.c
@echo "$<"
@$(CC) $(CFLAGS) $(DEFINES) -c $< -o $@
$(TARGET_LINKED): $(OBJS)
@echo "linking ... $@"
@$(CC) -g -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
$(TARGET): $(TARGET_LINKED)
@echo "output ... $@"
@$(OBJCOPY) -O binary $< $@
clean:
@echo "clean ..."
@rm -rf $(TARGET_LINKED) $(TARGET) $(OBJS) $(DEPDIR)