hbc/wiipax/stub/Makefile

67 lines
1.3 KiB
Makefile
Raw Normal View History

2016-11-23 06:35:12 +01:00
include ../../broadway.mk
CFLAGS += -mno-eabi -mno-sdata -O2 -ffreestanding
CFLAGS += -Wall -Wextra
DEFINES =
LDFLAGS += -nostartfiles -nodefaultlibs
OBJS_COMMON = crt0.o main.o string.o sync.o elf.o time.o LzmaDec.o
TARGET_ID =
2018-06-28 11:07:34 +02:00
ifeq ($(DKPPC),1)
DEFINES += -DDKPPC
2016-11-23 06:35:12 +01:00
OBJS = $(OBJS_COMMON)
2018-06-28 11:07:34 +02:00
LDSCRIPT = devkitppc.ld
TARGET_ID = _dkp
2016-11-23 06:35:12 +01:00
else
2018-06-28 11:07:34 +02:00
ifeq ($(DKPPCCHANNEL),1)
DEFINES += -DDKPPC
2016-11-23 06:35:12 +01:00
OBJS = realmode.o $(OBJS_COMMON)
LDSCRIPT = channel.ld
2018-06-28 11:07:34 +02:00
TARGET_ID = _dkpc
2016-11-23 06:35:12 +01:00
else
OBJS = realmode.o plunge.o $(OBJS_COMMON)
LDSCRIPT = realmode.ld
TARGET_ID = _mini
endif
endif
ifeq ($(NDEBUG),1)
DEFINES += -DNDEBUG
TARGET_DEBUG =
else
OBJS += exception.o exception_asm.o vsprintf.o gecko.o
TARGET_DEBUG = _debug
endif
TARGET = stub$(TARGET_ID)$(TARGET_DEBUG).elf
include ../../common.mk
all: xxd
xxd: $(TARGET)
@echo " XXD $^"
@xxd -i $(TARGET) > $(subst .elf,.c,$(TARGET))
distclean: clean
rm -f stub_*.elf stub_*.c
release:
$(Q)$(MAKE) clean
$(Q)$(MAKE)
$(Q)$(MAKE) clean
$(Q)$(MAKE) NDEBUG=1
$(Q)$(MAKE) NDEBUG=1 clean
2018-06-28 11:07:34 +02:00
$(Q)$(MAKE) DKPPC=1
$(Q)$(MAKE) DKPPC=1 clean
$(Q)$(MAKE) DKPPC=1 NDEBUG=1
$(Q)$(MAKE) DKPPC=1 NDEBUG=1 clean
$(Q)$(MAKE) DKPPCCHANNEL=1
$(Q)$(MAKE) DKPPCCHANNEL=1 clean
$(Q)$(MAKE) DKPPCCHANNEL=1 NDEBUG=1
$(Q)$(MAKE) DKPPCCHANNEL=1 NDEBUG=1 clean
2016-11-23 06:35:12 +01:00
.PHONY: release