#! make -f #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- # usage: # # make import # This creates a single WAD file that uses $(TARGET_BANNER) and then imports it # # make checkicon # To check for icon processing lag, this creates and imports 47 WAD files that use $(TARGET_BANNER) # # # make checkbanner # To check for banner processing lag, this creates 1 WAD file that uses $(TARGET_BANNER) and 46 WAD files that use icons for testing and then imports those files # # #---------------------------------------------------------------------------- # CONFIG # # Define the path to the Icon Banner Tools package as an environment variable. # When no setting is specified, it will be set to be the same as $(REVOLUTION_SDK_ROOT). RVL_ICON_BANNER_TOOL_DIR ?= $(REVOLUTION_SDK_ROOT) # Current directory name CURRENT_DIR = $(shell basename $(shell pwd)) # Basic information about channel applications. # This is used when creating WAD files with 'make import'. GAME_CODE := ICBN # This is used when creating WAD files with 'make checkicon' or 'make checkbanner' GAME_CODE_HEADER := Cs GAME_CODE_HEADER_HEX := 4373 COMPANY_CODE := 01 TITLE_VERSION := 0 # DOL filenames that will be the content of the channel application and the channel's WAD filenames TARGET_DOL := simple.dol TARGET_BANNER := opening.bnr # Icon banner, title code, and DOL filename for the channel to use for testing CHECKCHANNEL_BANNER := checkchannel.bnr CHECKCHANNEL_CODE_HEADER := $(GAME_CODE_HEADER) CHECKCHANNEL_DOL := simple.dol # Path to the folder for holding all the various output files CHAN_BIN_DIR := bin # Required makeWad options for displaying channel applications with WiiMenu3CSViewer. # This is not required when checking the display on the Wii Menu. # When creating a WAD file for a master submission, ALWAYS COMMENT OUT THIS OPTION so that it is not set!!! # # CSVIEWER_SPECIAL_OPT := -E 0000 # Path to Nmenu.elf NMENU = $(RVL_ICON_BANNER_TOOL_DIR)/RVL/bin/tools/Nmenu.elf # Path to makeWad MAKEWAD = $(RVL_ICON_BANNER_TOOL_DIR)/X86/bin/makeWad.exe # Path to the viewer folder(s) below DVDROOT when running Nmenu.elf. # Nmenu.elf references and automatically imports the channel application. DVD_VIEWER_DIR = $(RVL_ICON_BANNER_TOOL_DIR)/dvddata/viewer #---------------------------------------------------------------------------- # NW4R commondefs # include $(NW4R_ROOT)/Library/build/buildtools/commondefs #---------------------------------------------------------------------------- # Create a binary file and import a single WAD file # import: $(MAKE) sampleelf $(MAKE) wad1 GAME_CODE=$(GAME_CODE) TARGET_WAD=$(GAME_CODE).wad ndrun $(NMENU) -d=$(RVL_ICON_BANNER_TOOL_DIR)/build/demos/iconbanner/$(CURRENT_DIR)/nmenu.ddf -a -i $(GAME_CODE).wad #---------------------------------------------------------------------------- # Create a binary file and import 47 WAD files # checkicon: $(MAKE) sampleelf $(MAKE) import47 #---------------------------------------------------------------------------- # Create a binary file and import 1 WAD file and 46 channels for testing # checkbanner: $(MAKE) checkelf $(MAKE) import46 #---------------------------------------------------------------------------- # Create the ELF file of the main channel application # sampleelf: $(MAKE) -C main #---------------------------------------------------------------------------- # Create the ELF file for the 'check' channel # checkelf: $(MAKE) -C main #---------------------------------------------------------------------------- # Create the WAD file # wad1: $(MAKEWAD) -n $(subst .wad,,$(TARGET_WAD)) -l $(CHAN_BIN_DIR)/$(TARGET_DOL) -m $(TARGET_BANNER) -g $(COMPANY_CODE) -gc $(GAME_CODE) -I $(TITLE_VERSION) $(CSVIEWER_SPECIAL_OPT) $(MV) $(TARGET_WAD) $(CHAN_BIN_DIR) $(MKDIRP) $(DVD_VIEWER_DIR) $(CP) $(CHAN_BIN_DIR)/$(TARGET_WAD) $(DVD_VIEWER_DIR) GAME_CODE_NUM_LIST47= \ 01 02 03 04 05 06 07 08 09 10 \ 11 12 13 14 15 16 17 18 19 20 \ 21 22 23 24 25 26 27 28 29 30 \ 31 32 33 34 35 36 37 38 39 40 \ 41 42 43 44 45 46 47 #---------------------------------------------------------------------------- # Create 46 WAD files for channels used for testing # makecheckchannel1: $(MAKEWAD) -n $(subst .wad,,$(TARGET_WAD)) -l $(CHAN_BIN_DIR)/$(CHECKCHANNEL_DOL) -m $(CHECKCHANNEL_BANNER) -g $(COMPANY_CODE) -gc $(GAME_CODE) -I $(TITLE_VERSION) $(CSVIEWER_SPECIAL_OPT) $(MV) $(TARGET_WAD) $(CHAN_BIN_DIR) $(MKDIRP) $(DVD_VIEWER_DIR) $(CP) $(CHAN_BIN_DIR)/$(TARGET_WAD) $(DVD_VIEWER_DIR) makecheckchannel47: $(foreach gc,$(GAME_CODE_NUM_LIST47),make makecheckchannel1 GAME_CODE=0x$(GAME_CODE_HEADER_HEX)`expr 30 + $(gc) / 10``expr 30 + $(gc) % 10` TARGET_WAD=$(CHECKCHANNEL_CODE_HEADER)$(gc).wad &&) true #---------------------------------------------------------------------------- # Create 47 WAD files # Cs01 - Cs47 wad47: $(foreach gc,$(GAME_CODE_NUM_LIST47),make wad1 GAME_CODE=0x$(GAME_CODE_HEADER_HEX)`expr 30 + $(gc) / 10``expr 30 + $(gc) % 10` TARGET_WAD=$(GAME_CODE_HEADER)$(gc).wad &&) true #---------------------------------------------------------------------------- # Import the channel application # # Import 47 channel applications (to check for icon processing lag) import47: wad47 ndrun $(NMENU) -d=$(RVL_ICON_BANNER_TOOL_DIR)/build/demos/iconbanner/$(CURRENT_DIR)/nmenu.ddf -a $(foreach gc,$(GAME_CODE_NUM_LIST47),-i $(GAME_CODE_HEADER)$(gc).wad) # Import 1 channel application and 46 sample channels. #(Used to check whether there is processing lag when expanding the banner) # The first page has channels such as the Mii Channel, so a channel in the middle (the 24th) is overwritten for checking. # import46: makecheckchannel47 $(MAKE) wad1 GAME_CODE=0x$(GAME_CODE_HEADER_HEX)3234 TARGET_WAD=$(CHECKCHANNEL_CODE_HEADER)24.wad ndrun $(NMENU) -d=$(RVL_ICON_BANNER_TOOL_DIR)/build/demos/iconbanner/$(CURRENT_DIR)/nmenu.ddf -a $(foreach gc,$(GAME_CODE_NUM_LIST47),-i $(CHECKCHANNEL_CODE_HEADER)$(gc).wad) #---------------------------------------------------------------------------- # Erases all binary files # clean: clean_all clean_all: $(RM) $(CHAN_BIN_DIR)/* $(MAKE) -C main clean ifneq ($(findstring iconCs.arc,$(CHAN_CONTENTS)),) $(MAKE) -C iconCs clean endif ifneq ($(findstring bannerCs.arc,$(CHAN_CONTENTS)),) $(MAKE) -C bannerCs clean endif #---------------------------------------------------------------------------- # NW4R modulerules # include $(NW4R_ROOT)/Library/build/buildtools/modulerules #===== End of Makefile =====