############################################################################### # 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. # ############################################################################### # NOTE: Only MODULE_DEPTH needs to be modified! # This makefile must set the relative depth to the src directory # using only "..", without a trailing slash MODULE_DEPTH := ../.. BUILD_MAKE_PATH := $(MODULE_DEPTH)/build/make # commondefs must be included near the top so that all common variables # will be defined before their use. Define commondefs for compiler. include $(BUILD_MAKE_PATH)/commondefs.mk include $(BUILD_MAKE_PATH)/commondefs.cos.mk # LIB := TRUE tells modulerules to treat this as a library, not as an executable LIB := TRUE # CLIBSRCS, CPPLIBSRCS, and ASMLIBSRCS automatically lists all # C, C++, and assembly files that should be compiled and linked for the library # Use a different suffix if you do not want the file to be compiled and linked. CLIBSRCS := $(FIND_C_SRCS) CPPLIBSRCS := $(FIND_CPP_SRCS) ASMLIBSRCS := $(FIND_ASM_SRCS) # The name of the library is automatically set to the directory name of this module. # The path to the library output is $(LIB_DIR)/$(LIBNAME)$(LIBSUFFIX) ############################################################################### # modulerules contains the rules that will use the above variables # and dependencies below to construct the binaries specified. # Do not specify any targets before including modulerules. include $(BUILD_MAKE_PATH)/modulerules.mk ############################################################################### # Shader-related targets/dependencies SHADER_H_FILES:=$(patsubst shaders/%.vs,shaders/headers/%.h,$(wildcard shaders/*.vs)) $(SHADER_H_FILES): build_shaders $(OBJ_DIR)/gx2ut.o: $(SHADER_H_FILES) $(OBJ_DIR)/gx2utClear.o: $(SHADER_H_FILES) $(OBJ_DIR)/gx2utConvertDepth.o: $(SHADER_H_FILES) $(OBJ_DIR)/gx2utCopy.o: $(SHADER_H_FILES) $(OBJ_DIR)/gx2utExpandColor.o: $(SHADER_H_FILES) $(OBJ_DIR)/gx2utExpandDepth.o: $(SHADER_H_FILES) $(OBJ_DIR)/gx2utResolve.o: $(SHADER_H_FILES) build_shaders: $(MAKE) -C shaders shader_headers clobber_shader_headers: $(_@)echo "------------------------------------------------------------------" ; \ echo "Clobbering $(MODULE_PATH_FROM_SRC)" $(MAKE) -C shaders clobber clobber: clobber_shader_headers # #======== End of makefile ========#