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 17# Gfx�̃R���o�[�^�A�A�[�J�C�o 18BINARY_CONVERTER = $(NW4C_ROOT)/tools/CreativeStudio/NW4C_CreativeStudioConsole.exe 19 20public.GfxBinaryObject(ofile, files, option) = 21 $(ofile): $(files) $(BINARY_CONVERTER) 22 mkdir -p $(dirname $@) 23 $(BINARY_CONVERTER) $(filter-out %.exe, $^) --verbose -o=$@ $(option) 24 return $(ofile) 25 26# ���C�A�E�g�̃R���o�[�^�A�A�[�J�C�o 27NW4C_LAYOUT_CONVERTER = $(NW4C_ROOT)/tools/LayoutEditor/Converter/NW4C_LayoutConverter.exe 28NW4C_LAYOUT_ARCHIVER = $(NW4C_ROOT)/tools/LayoutEditor/Converter/NW4C_LayoutArchiver.exe 29 30public.LayoutBinaryConvert(outfile, outdir, sources) = 31 $(outfile): $(sources) 32 rm -rf $(outdir) 33 mkdir -p $(outdir) 34 $(NW4C_LAYOUT_CONVERTER) -g $(sources) $(outdir) 35 $(NW4C_LAYOUT_ARCHIVER) -c $(outfile) -a 128 -f $(outdir) ./blyt ./anim ./timg 36 return $(outfile) 37 38public.LayoutBinaryConvertNonAnim(outfile, outdir, sources) = 39 $(outfile): $(sources) 40 rm -rf $(outdir) 41 mkdir -p $(outdir) 42 $(NW4C_LAYOUT_CONVERTER) -g $(sources) $(outdir) 43 $(NW4C_LAYOUT_ARCHIVER) -c $(outfile) -a 128 -f $(outdir) ./blyt ./timg 44 return $(outfile) 45 46 47# �v���Z�X���T�|�[�g����^�[�Q�b�g���L�q���܂��B 48# �V�X�e�����͕K�� Process �ɂȂ�͂��ł��B 49SUPPORTED_TARGETS = CTR-*.Process.MPCore.* 50ROMFS_ROOT = romfiles 51TARGET_PROGRAM = Nw4cDemo 52 53 54# Gfx���\�[�X�̃R���o�[�g���s���܂��B 55 56# �o�C�i���R���o�[�g�̃I�v�V�������w�肵�܂��B 57MODEL_OPTION = --auto_create_shader=on 58 59# �s�G�� 60PIERROT_SET_NAME = ToyPierrot.bcmdl 61PIERROT_SET[] = 62 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrot.cmdl 63 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotAnimDance.cskla 64 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotAnimDance.cmata 65 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotAll.ctex 66 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotAllNmap.ctex 67 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotEye.0.ctex 68 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotEye.1.ctex 69 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotEye.2.ctex 70 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotStickRed.ctex 71 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyRoomCube.ctex 72 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyAllLut.clts 73 74PIERROT_TARGET = $(GfxBinaryObject $(ROMFS_ROOT)/$(PIERROT_SET_NAME), $(PIERROT_SET), $(MODEL_OPTION)) 75 76# �o�b�N�_���T�[�s�G�� 77BACK_DANCER_PIERROT_SET_NAME = ToyPierrotBackDancer.bcmdl 78BACK_DANCER_PIERROT_SET[] = 79 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotBackDancer.cmdl 80 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotBackDancerAnimDance.cskla 81 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotAnimDance.cmata 82 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotAllNmap.ctex 83 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotBackDancerAll.ctex 84 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotEye.0.ctex 85 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotEye.1.ctex 86 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotEye.2.ctex 87 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyPierrot\ToyPierrotStickRed.ctex 88 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyRoomCube.ctex 89 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyAllLut.clts 90 91BACK_DANCER_PIERROT_TARGET = $(GfxBinaryObject $(ROMFS_ROOT)/$(BACK_DANCER_PIERROT_SET_NAME), $(BACK_DANCER_PIERROT_SET), $(MODEL_OPTION)) 92 93# ���{�b�g 94ROBOT_SET_NAME = ToyRobot.bcmdl 95ROBOT_SET[] = 96 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyRobot\ToyRobot.cmdl 97 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyRobot\ToyRobotAnimDance.cskla 98 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyRobot\ToyRobot.cmata 99 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyRobot\ToyRobotAll.ctex 100 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyRobot\ToyRobotGear.ctex 101 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyRoomCube.ctex 102 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyAllLut.clts 103 104ROBOT_TARGET = $(GfxBinaryObject $(ROMFS_ROOT)/$(ROBOT_SET_NAME), $(ROBOT_SET), $(MODEL_OPTION)) 105 106# �o�b�N�_���T�[���{�b�g 107BACK_DANCER_ROBOT_SET_NAME = ToyRobotBackDancer.bcmdl 108BACK_DANCER_ROBOT_SET[] = 109 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyRobot\ToyRobotBackDancer.cmdl 110 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyRobot\ToyRobotBackDancerAnimDance.cskla 111 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyRobot\ToyRobot.cmata 112 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyRobot\ToyRobotBackDancerAll.ctex 113 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyRobot\ToyRobotGear.ctex 114 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyRoomCube.ctex 115 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyAllLut.clts 116 117BACK_DANCER_ROBOT_TARGET = $(GfxBinaryObject $(ROMFS_ROOT)/$(BACK_DANCER_ROBOT_SET_NAME), $(BACK_DANCER_ROBOT_SET), $(MODEL_OPTION)) 118 119# �X�e�[�W 120STAGE_SET_NAME = ToyStageMatFix.bcmdl 121STAGE_SET[] = 122 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageMatFix.cmdl 123 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageMatFix.cskla 124 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageMatFix.cmata 125 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageCarpet.ctex 126 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageConfetti.ctex 127 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageCurtain.ctex 128 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageParts01.ctex 129 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageParts02.ctex 130 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageParts03.ctex 131 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageRibbon.ctex 132 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageWood01.ctex 133 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageWood02.ctex 134 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyTentBlock.ctex 135 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyTentSpiralA.ctex 136 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyTentWall.ctex 137 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyTentWave.ctex 138 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyTentWood.ctex 139 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyTentSpiralA.ctex 140 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyRoomCube.ctex 141 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyAllLut.clts 142 143STAGE_TARGET = $(GfxBinaryObject $(ROMFS_ROOT)/$(STAGE_SET_NAME), $(STAGE_SET), $(MODEL_OPTION)) 144 145# �X�e�[�W�I�u�W�F�N�g 146STAGE_OBJECT_SET_NAME = ToyStageObj.bcmdl 147STAGE_OBJECT_SET[] = 148 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageObj.cmdl 149 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageObj.cskla 150 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageBilliard.ctex 151 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageScreen.ctex 152 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageRocketMoon.ctex 153 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyStage\ToyStageRocketMoonNmap.ctex 154 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyRoomCube.ctex 155 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyAllLut.clts 156 157STAGE_OBJECT_TARGET = $(GfxBinaryObject $(ROMFS_ROOT)/$(STAGE_OBJECT_SET_NAME), $(STAGE_OBJECT_SET), $(MODEL_OPTION)) 158 159# �ϋq 160AUDIENCE_SET_NAME = ToyAudience.bcmdl 161AUDIENCE_SET[] = 162 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyAudience\ToyAudience.cmdl 163 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyAudience\ToyAudience.cskla 164 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyAudience\ToyAudienceAll.ctex 165 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyAudience\ToyAudienceMask.ctex 166 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyAllLut.clts 167 168AUDIENCE_TARGET = $(GfxBinaryObject $(ROMFS_ROOT)/$(AUDIENCE_SET_NAME), $(AUDIENCE_SET), $(MODEL_OPTION)) 169 170# �V�� 171TOYBG_SET_NAME = ToyBg.bcmdl 172TOYBG_SET[] = 173 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyBg.cmdl 174 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyAllLut.clts 175 176TOYBG_TARGET = $(GfxBinaryObject $(ROMFS_ROOT)/$(TOYBG_SET_NAME), $(TOYBG_SET), $(MODEL_OPTION)) 177 178# �p�[�e�B�N�� 179PARTICLE_SET_NAME = ToyParticle.bcres 180PARTICLE_SET[] = 181 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyParticle\ToyParticle.cres 182 183PARTICLE_TARGET = $(GfxBinaryObject $(ROMFS_ROOT)/$(PARTICLE_SET_NAME), $(PARTICLE_SET), $(MODEL_OPTION)) 184 185 186# ���C�g 187LIGHT_SET_NAME = ToyMrnRbtLight.bcenv 188LIGHT_SET[] = 189 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyMrnRbtLight.cenv 190 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCommon\ToyAllLut.clts 191 192LIGHT_TARGET = $(GfxBinaryObject $(ROMFS_ROOT)/$(LIGHT_SET_NAME), $(LIGHT_SET), $(MODEL_OPTION)) 193 194# �J���� 195CAMERA_SET_NAME = ToyCamAni.bccam 196CAMERA_SET[] = 197 $(NW4C_ROOT)/SampleData\Nw4cDemo\ToyCamera\ToyCamAni.ccam 198 199CAMERA_TARGET = $(GfxBinaryObject $(ROMFS_ROOT)/$(CAMERA_SET_NAME), $(CAMERA_SET), $(MODEL_OPTION)) 200 201 202# ���C�A�E�g���\�[�X�̃R���o�[�g�A�A�[�J�C�u�����s���܂��B 203 204# ���C�� 205LYT_MAIN_ARV = ./romfiles/LayoutMain.arc 206LYT_MAIN_OUT = ./resource/LayoutMain 207LYT_MAIN_SET[] = 208 $(NW4C_ROOT)/SampleData\Nw4cDemo\LayoutDB\LayoutMain\Main.clyt 209 $(NW4C_ROOT)/SampleData\Nw4cDemo\LayoutDB\LayoutMain\Main.clan 210LYT_MAIN_TARGET = $(LayoutBinaryConvert $(LYT_MAIN_ARV), $(LYT_MAIN_OUT), $(LYT_MAIN_SET)) 211 212# �X���C�_�[ 213LYT_SLIDER_ARV = ./romfiles/LayoutSlider.arc 214LYT_SLIDER_OUT = ./resource/LayoutSlider 215LYT_SLIDER_SET[] = 216 $(NW4C_ROOT)/SampleData\Nw4cDemo\LayoutDB\LayoutSlider\Slider.clyt 217LYT_SLIDER_TARGET = $(LayoutBinaryConvertNonAnim $(LYT_SLIDER_ARV), $(LYT_SLIDER_OUT), $(LYT_SLIDER_SET)) 218 219# �s�G���{�^�� 220LYT_PIERROT_ARV = ./romfiles/LayoutPierrotButton.arc 221LYT_PIERROT_OUT = ./resource/LayoutPierrotButton 222LYT_PIERROT_SET[] = 223 $(NW4C_ROOT)/SampleData\Nw4cDemo\LayoutDB\LayoutPierrotButton/Button.clyt 224 $(NW4C_ROOT)/SampleData\Nw4cDemo\LayoutDB\LayoutPierrotButton/Button.clan 225LYT_PIERROT_TARGET = $(LayoutBinaryConvert $(LYT_PIERROT_ARV), $(LYT_PIERROT_OUT), $(LYT_PIERROT_SET)) 226 227# ���{�b�g�{�^�� 228LYT_ROBOT_ARV = ./romfiles/LayoutRobotButton.arc 229LYT_ROBOT_OUT = ./resource/LayoutRobotButton 230LYT_ROBOT_SET[] = 231 $(NW4C_ROOT)/SampleData\Nw4cDemo\LayoutDB\LayoutRobotButton/Button.clyt 232 $(NW4C_ROOT)/SampleData\Nw4cDemo\LayoutDB\LayoutRobotButton/Button.clan 233LYT_ROBOT_TARGET = $(LayoutBinaryConvert $(LYT_ROBOT_ARV), $(LYT_ROBOT_OUT), $(LYT_ROBOT_SET)) 234 235# �X�e�[�W�{�^�� 236LYT_STAGE_ARV = ./romfiles/LayoutStageButton.arc 237LYT_STAGE_OUT = ./resource/LayoutStageButton 238LYT_STAGE_SET[] = 239 $(NW4C_ROOT)/SampleData\Nw4cDemo\LayoutDB\LayoutStageButton/Button.clyt 240 $(NW4C_ROOT)/SampleData\Nw4cDemo\LayoutDB\LayoutStageButton/Button.clan 241LYT_STAGE_TARGET = $(LayoutBinaryConvert $(LYT_STAGE_ARV), $(LYT_STAGE_OUT), $(LYT_STAGE_SET)) 242 243# �ϋq�{�^�� 244LYT_AUDIENCE_ARV = ./romfiles/LayoutAudienceButton.arc 245LYT_AUDIENCE_OUT = ./resource/LayoutAudienceButton 246LYT_AUDIENCE_SET[] = 247 $(NW4C_ROOT)/SampleData\Nw4cDemo\LayoutDB\LayoutAudienceButton/Button.clyt 248 $(NW4C_ROOT)/SampleData\Nw4cDemo\LayoutDB\LayoutAudienceButton/Button.clan 249LYT_AUDIENCE_TARGET = $(LayoutBinaryConvert $(LYT_AUDIENCE_ARV), $(LYT_AUDIENCE_OUT), $(LYT_AUDIENCE_SET)) 250 251# �p�[�e�B�N���{�^�� 252LYT_PARTICLE_ARV = ./romfiles/LayoutParticleButton.arc 253LYT_PARTICLE_OUT = ./resource/LayoutParticleButton 254LYT_PARTICLE_SET[] = 255 $(NW4C_ROOT)/SampleData\Nw4cDemo\LayoutDB\LayoutParticleButton/Button.clyt 256 $(NW4C_ROOT)/SampleData\Nw4cDemo\LayoutDB\LayoutParticleButton/Button.clan 257LYT_PARTICLE_TARGET = $(LayoutBinaryConvert $(LYT_PARTICLE_ARV), $(LYT_PARTICLE_OUT), $(LYT_PARTICLE_SET)) 258 259 260ROMFS_DEPENDENCIES = $(PIERROT_TARGET) $(BACK_DANCER_PIERROT_TARGET) $(ROBOT_TARGET) $(BACK_DANCER_ROBOT_TARGET) $(STAGE_TARGET) $(STAGE_OBJECT_TARGET) $(AUDIENCE_TARGET) $(TOYBG_TARGET) $(PARTICLE_TARGET) $(LIGHT_TARGET) $(CAMERA_TARGET) $(LYT_MAIN_TARGET) $(LYT_SLIDER_TARGET) $(LYT_PIERROT_TARGET) $(LYT_ROBOT_TARGET) $(LYT_STAGE_TARGET) $(LYT_AUDIENCE_TARGET) $(LYT_PARTICLE_TARGET) 261 262# �r���h����\�[�X�t�@�C�� 263SOURCES[] = 264 sources/main.cpp 265 sources/demo.cpp 266 sources/GfxCtrl.cpp 267 sources/LytCtrl.cpp 268 sources/SmPerf.cpp 269 sources/SmModel.cpp 270 sources/SmPrimitive.cpp 271 sources/SmButton.cpp 272 sources/SmTouchPanelCamera.cpp 273 sources/SmCamera.cpp 274 sources/SmLayout.cpp 275 sources/SmLytButton.cpp 276 sources/SmRenderSystem.cpp 277 sources/SmSceneCtrl.cpp 278 sources/SmCommandUtility.cpp 279 sources/SmBase.cpp 280 sources/SmLytSliderBar.cpp 281 sources/SmInitialFileParser.cpp 282 sources/SmParticle.cpp 283 284SHADER_SOURCES[] = 285 sources/shader/nw4cDemo.vsh 286 287# �lj����郉�C�u���� 288NW_LIBRARIES += libnw_demo 289CCFLAGS += -DNN_SWITCH_ENABLE_HOST_IO 290LIBS += libnn_math libnn_ulcd libnn_gr 291include $(NW4C_ROOT)/build/omake/modulerules 292 293build: $(DEFAULT_TARGETS) 294