############################################################################### # vim:ts=4:sw=4:noexpandtab # Makefile for any library # # Copyright (C) 2010 Nintendo. All rights reserved. # # These coded instructions, statements, and computer programs contain # proprietary information of Nintendo of America Inc. and/or Nintendo # Company Ltd., and are protected by Federal copyright law. They may # not be disclosed to third parties or copied or duplicated in any form, # in whole or in part, without the prior written consent of Nintendo. # ############################################################################### # This makefile must set the relative depth to the build directory # using only "..", without a trailing slash ifeq ($(WIN64),TRUE) WIN64_BIN_PATH=$(CAFE_ROOT)/system/bin/win64 GFD_DLL=$(WIN64_BIN_PATH)/gfd.dll TEXUTILS_DLL=$(WIN64_BIN_PATH)/texUtils.dll TEXCONV2_EXE=$(WIN64_BIN_PATH)/TexConv2.exe else WIN32_BIN_PATH=$(CAFE_ROOT)/system/bin/win32 GFD_DLL=$(WIN32_BIN_PATH)/gfd.dll TEXUTILS_DLL=$(WIN32_BIN_PATH)/texUtils.dll TEXCONV2_EXE=$(WIN32_BIN_PATH)/TexConv2.exe endif DATA_DEST_ROOT=$(shell cygpath -u $(CAFE_ROOT))/data/disc/content/assets/textures DATA_DEST_DIR=$(DATA_DEST_ROOT)/$(ASSET_SUBDIR)/$(PLATFORM) # commondefs.mk must be included near the top so that all common variables # will be defined before their use. include $(BUILD_MAKE_PATH)/commondefs.mk include $(BUILD_MAKE_PATH)/commondefs.cos.mk .PHONY: default default: texture install: texture ############################################################################### # # For textures # ############################################################################### .PHONY: clobber clean clean_texture clobber: clean_texture clean: clobber clean_texture: $(_@)echo "------------------------------------------------------------------" ; \ echo "Cleaning textures" rm -Rf $(DATA_DEST_ROOT)/$(ASSET_SUBDIR) # Note: dependency is between destination subdirectory and source .sh file # (and the texture converter) # To force update for a particular texture set, touch the associated .sh file $(DATA_DEST_DIR)/%: %.sh $(TEXCONV2_EXE) $(TEXUTILS_DLL) $(GFD_DLL) $(_@)rm -Rf $(DATA_DEST_DIR)/$* ; $(_@)mkdir -p $(DATA_DEST_DIR)/$* ; $(_@)sed --in-place -e 's/\r\n/\n/' ./$*.sh &> /dev/null; ./$*.sh $(shell cygpath -m $(DATA_DEST_DIR))/$* "$(GTX_OPTIONS)"; $(TEXCONV2_EXE): $(ATI_BIN) make -C $(CAFE_ROOT)/system/src/tool/gfx/projects/TexConv2 # Note: GTX_OPTIONS are set up in commondefs.mk based on PLATFORM_GPU definition .PHONY: texture print_texture print_texture: $(call MOD_RULES_PHASE, "Converting/Installing $(MODULE_PATH_FROM_SRC)") texture: print_texture $(patsubst %.sh,$(DATA_DEST_DIR)/%,$(CONVERTER_SCRIPTS)) #======== End of makefile ========#