1###############################################################################
2# Makefile for any library
3#
4# Copyright (C) Nintendo.  All rights reserved.
5#
6# These coded instructions, statements, and computer programs contain
7# proprietary information of Nintendo of America Inc. and/or Nintendo
8# Company Ltd., and are protected by Federal copyright law.  They may
9# not be disclosed to third parties or copied or duplicated in any form,
10# in whole or in part, without the prior written consent of Nintendo.
11#
12###############################################################################
13
14# NOTE: Only MODULE_DEPTH needs to be modified!
15
16# This makefile must set the relative depth to the src directory
17# using only "..", without a trailing slash
18
19MODULE_DEPTH := ../..
20BUILD_MAKE_PATH := $(MODULE_DEPTH)/build/make
21
22# commondefs must be included near the top so that all common variables
23# will be defined before their use.  Define commondefs for compiler.
24
25include $(BUILD_MAKE_PATH)/commondefs.mk
26include $(BUILD_MAKE_PATH)/commondefs.cos.mk
27
28# LIB := TRUE tells modulerules to treat this as a library, not as an executable
29
30LIB := TRUE
31
32# CLIBSRCS, CPPLIBSRCS, and ASMLIBSRCS automatically lists all
33# C, C++, and assembly files that should be compiled and linked for the library
34# Use a different suffix if you do not want the file to be compiled and linked.
35
36CLIBSRCS   := $(FIND_C_SRCS)
37CPPLIBSRCS := $(FIND_CPP_SRCS)
38ASMLIBSRCS := $(FIND_ASM_SRCS)
39
40# The name of the library is automatically set to the directory name of this module.
41# The path to the library output is $(LIB_DIR)/$(LIBNAME)$(LIBSUFFIX)
42
43###############################################################################
44# modulerules contains the rules that will use the above variables
45# and dependencies below to construct the binaries specified.
46# Do not specify any targets before including modulerules.
47
48include $(BUILD_MAKE_PATH)/modulerules.mk
49
50###############################################################################
51# Shader-related targets/dependencies
52
53SHADER_H_FILES:=$(patsubst shaders/%.vs,shaders/headers/%.h,$(wildcard shaders/*.vs))
54
55$(SHADER_H_FILES): build_shaders
56
57$(OBJ_DIR)/gx2ut.o: $(SHADER_H_FILES)
58$(OBJ_DIR)/gx2utClear.o: $(SHADER_H_FILES)
59$(OBJ_DIR)/gx2utConvertDepth.o: $(SHADER_H_FILES)
60$(OBJ_DIR)/gx2utCopy.o: $(SHADER_H_FILES)
61$(OBJ_DIR)/gx2utExpandColor.o: $(SHADER_H_FILES)
62$(OBJ_DIR)/gx2utExpandDepth.o: $(SHADER_H_FILES)
63$(OBJ_DIR)/gx2utResolve.o: $(SHADER_H_FILES)
64
65build_shaders:
66	$(MAKE) -C shaders shader_headers
67
68clobber_shader_headers:
69	$(_@)echo "------------------------------------------------------------------" ; \
70	 echo "Clobbering $(MODULE_PATH_FROM_SRC)"
71	$(MAKE) -C shaders clobber
72
73clobber: clobber_shader_headers
74
75#
76#======== End of makefile ========#
77
78
79