1#!/usr/bin/env omake 2#---------------------------------------------------------------------------- 3# Project: NintendoWare 4# File: OMakefile 5# 6# Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. 7# 8# These coded instructions, statements, and computer programs contain 9# proprietary information of Nintendo of America Inc. and/or Nintendo 10# Company Ltd., and are protected by Federal copyright law. They may 11# not be disclosed to third parties or copied or duplicated in any form, 12# in whole or in part, without the prior written consent of Nintendo. 13# 14# $Revision:$ 15#---------------------------------------------------------------------------- 16 17RESOURCE_DIR = Common/resources 18SHADER_DIR = Common/shaders 19 20BINARY_CONVERTER = $(NW4C_ROOT)/tools/CreativeStudio/NW4C_CreativeStudioConsole.exe 21.PHONY: resource 22 23GEOMETRY_SHADER_INCLUDES[] = 24GEOMETRY_SHADER_PATH = $(CTRSDK_ROOT)/resources/shaders 25 26public.GfxVertexShaderObject(files) = 27 OFILES = 28 OBJDIR = objects 29 foreach(file, $(files)) 30 OFILE = $(OBJDIR)/$(rootname $(basename $(file))).o 31 $(OFILE): $(file) 32 mkdir -p $(dirname $@) 33 $(VERTEX_SHADER_ASSEMBLER) $(addprefix -I, $(VERTEX_SHADER_INCLUDES)) -O$@ $< -nowarning 34 OFILES += $(OFILE) 35 export OFILES 36 return $(OFILES) 37 38public.GfxVertexShader(outdir, name, files) = 39 GEOMERY_FULL_NAME = $(addprefix $(GEOMETRY_SHADER_PATH)/, $(GEOMETRY_SHADER_INCLUDES)) 40 OBJS = $(GfxVertexShaderObject $(files)) 41 OFILE = $(outdir)/$(name).shbin 42 43 $(OFILE): $(OBJS) $(GEOMERY_FULL_NAME) 44 mkdir -p $(dirname $@) 45 $(VERTEX_SHADER_LINKER) -O$@ $+ 46 47 return $(OFILE) 48 49public.GfxBinaryObject(ofile, files, option) = 50 $(ofile): $(files) $(BINARY_CONVERTER) 51 mkdir -p $(dirname $@) 52 $(BINARY_CONVERTER) $(filter-out %.exe, $^) --verbose -o=$@ $(option) 53 return $(ofile) 54 55public.GfxBinaryObjects(outdir, files, option) = 56 OFILES = 57 foreach(file, $(files)) 58 OFILE = 59 suffix_name = $(suffix $(file)) 60 binary_suffix_name = $(addprefix ., $(join b, $(removeprefix ., $(suffix $(file))))) 61 OFILE = $(outdir)/$(replacesuffixes $(suffix_name), $(binary_suffix_name), $(basename $(file))) 62 OFILES += $(GfxBinaryObject $(OFILE), $(file), $(option)) 63 export OFILES 64 65 return $(OFILES) 66 67DEMOS[] = 68 SceneTreeDemo 69 SimpleDemo 70 AnimationDemo 71 AnimationBlendDemo 72 AnimationChangeDemo 73 PartialAnimationDemo 74 ParticleDemo 75 ResourceDemo 76 LowLayerDemo 77 LowLayerAnimationDemo 78 ParticleUpdaterDemo 79 ParticleRecycleDemo 80 ParticleChokeDemo 81 ParticleCtrlEmissionDemo 82 ParticleApplicationDemo 83 MultiInstanceDemo 84 ParticleMultiEmitterDemo 85 ParticleMultiModelDemo 86 MultiAnimationDemo 87 ParticleChangeVtxDemo 88 ProjectionShadowDemo 89 ShadowMapDemo 90 ParticleLowLayerDemo 91 ConstraintDemo 92 DynamicMaterialDemo 93 ParticleScaleDemo 94 95if $(defined NW_PRIVATE) 96 DEMOS += ParticleProfile 97 export DEMOS 98 99.SUBDIRS: $(DEMOS) 100 101DefineDefaultRules() 102