2019-01-23 19:30:07 +01:00
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
.SUFFIXES:
|
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
ifeq ($(strip $(DEVKITPRO)),)
|
|
|
|
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitPro")
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(strip $(DEVKITPPC)),)
|
|
|
|
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>/devkitPro/devkitPPC")
|
|
|
|
endif
|
|
|
|
|
|
|
|
include $(DEVKITPPC)/base_rules
|
|
|
|
|
|
|
|
PORTLIBS := $(PORTLIBS_PATH)/wiiu $(PORTLIBS_PATH)/ppc
|
|
|
|
|
|
|
|
export PATH := $(PORTLIBS_PATH)/wiiu/bin:$(PORTLIBS_PATH)/ppc/bin:$(PATH)
|
|
|
|
|
|
|
|
WUT_ROOT ?= $(DEVKITPRO)/wut
|
|
|
|
|
2019-05-03 10:02:15 +02:00
|
|
|
RPXSPECS := -specs=$(WUT_ROOT)/share/wut.specs
|
2019-01-23 19:30:07 +01:00
|
|
|
RPLSPECS := -specs=$(WUT_ROOT)/share/wut.specs -specs=$(WUT_ROOT)/share/rpl.specs
|
|
|
|
|
|
|
|
MACHDEP = -DESPRESSO -mcpu=750 -meabi -mhard-float
|
|
|
|
|
2021-01-05 17:41:04 +01:00
|
|
|
WUHB_DEPS :=
|
|
|
|
WUHB_OPTIONS :=
|
|
|
|
|
|
|
|
ifneq ($(strip $(APP_CONTENT)),)
|
|
|
|
WUHB_OPTIONS += --content=$(APP_CONTENT)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(strip $(APP_NAME)),)
|
|
|
|
WUHB_OPTIONS += --name "$(APP_NAME)"
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(strip $(APP_SHORTNAME)),)
|
|
|
|
WUHB_OPTIONS += --short-name "$(APP_SHORTNAME)"
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(strip $(APP_AUTHOR)),)
|
|
|
|
WUHB_OPTIONS += --author "$(APP_AUTHOR)"
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(strip $(APP_ICON)),)
|
|
|
|
WUHB_DEPS += $(APP_ICON)
|
|
|
|
WUHB_OPTIONS += --icon=$(APP_ICON)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(strip $(APP_TV_SPLASH)),)
|
|
|
|
WUHB_DEPS += $(APP_TV_SPLASH)
|
|
|
|
WUHB_OPTIONS += --tv-image=$(APP_TV_SPLASH)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(strip $(APP_DRC_SPLASH)),)
|
|
|
|
WUHB_DEPS += $(APP_DRC_SPLASH)
|
|
|
|
WUHB_OPTIONS += --drc-image=$(APP_DRC_SPLASH)
|
|
|
|
endif
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
%.wuhb: %.rpx $(WUHB_DEPS)
|
|
|
|
$(SILENTCMD)wuhbtool $< $@ $(WUHB_OPTIONS)
|
|
|
|
@echo built ... $(notdir $@)
|
|
|
|
|
2019-01-23 19:30:07 +01:00
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
%.rpx: %.elf
|
2020-12-13 16:21:33 +01:00
|
|
|
$(SILENTCMD)elf2rpl $< $@ $(ERROR_FILTER)
|
2019-01-23 19:30:07 +01:00
|
|
|
@echo built ... $(notdir $@)
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
%.rpl: %.elf
|
2020-12-13 16:21:33 +01:00
|
|
|
$(SILENTCMD)elf2rpl --rpl $< $@ $(ERROR_FILTER)
|
2019-01-23 19:30:07 +01:00
|
|
|
@echo built ... $(notdir $@)
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
%.elf:
|
|
|
|
@echo linking ... $(notdir $@)
|
2020-04-30 13:56:57 +02:00
|
|
|
$(SILENTCMD)$(LD) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@ $(ERROR_FILTER)
|
|
|
|
$(SILENTCMD)$(NM) -CSn $@ > $(notdir $*.lst) $(ERROR_FILTER)
|
2019-01-23 19:30:07 +01:00
|
|
|
|
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
%.o: %.def
|
2020-04-30 13:56:57 +02:00
|
|
|
$(SILENTMSG) $(notdir $<)
|
|
|
|
$(SILENTCMD)rplimportgen $< $*.s $(ERROR_FILTER)
|
|
|
|
$(SILENTCMD)$(CC) -x assembler-with-cpp $(ASFLAGS) -c $*.s -o $@ $(ERROR_FILTER)
|