1#!/usr/bin/env omake 2#---------------------------------------------------------------------------- 3# Project: NintendoWare 4# File: OMakefile 5# 6# Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. 7# 8# These coded instructions, statements, and computer programs contain proprietary 9# information of Nintendo and/or its licensed developers and are protected by 10# national and international copyright laws. They may not be disclosed to third 11# parties or copied or duplicated in any form, in whole or in part, without the 12# prior written consent of Nintendo. 13# 14# The content herein is highly confidential and should be handled accordingly. 15# 16# $Revision: $ 17#---------------------------------------------------------------------------- 18 19NW_LIBRARIES += libnw_demo 20NW4C_LAYOUT_ARCHIVER = $(NW4C_ROOT)/tools/LayoutEditor/Converter/NW4C_LayoutArchiver.exe 21NW4C_LAYOUT_CONVERTER = $(NW4C_ROOT)/tools/LayoutEditor/Converter/NW4C_LayoutConverter.exe 22 23public.LayoutBinary(outdir, sources) = 24 $(outdir): $(sources) 25 rm -rf $(outdir) 26 mkdir -p $(outdir) 27 $(NW4C_LAYOUT_CONVERTER) $(sources) $(outdir) 28 return $(outdir) 29 30public.LayoutArchive(outfile, indir) = 31 $(outfile): 32 mkdir -p $(dirname $@) 33 CREATE_SUBDIRS = true 34 .SUBDIRS: $(indir) 35 $(NW4C_LAYOUT_ARCHIVER) -c . $@ 36 return $(outfile) 37 38public.LayoutResources(rootDir) = 39 SHADER_ROOT = $(NW4C_ROOT)/shaders/ 40 LYT_SHADER_FILES = $(addprefix $(SHADER_ROOT), $(NW_LYT_SHADER_NAMES)) 41 OFILES[] = 42 foreach(file, $(LYT_SHADER_FILES)) 43 OUTPUT = $(rootDir)/shaders/$(basename $(file)) 44 OFILES[] += $(OUTPUT) 45 $(OUTPUT): $(file) 46 mkdir -p $(dirname $@) 47 cp $< $@ 48 export OFILES 49 return $(OFILES) 50 51SAMPLE_FONTS[] = 52 $(file commonRes/font/sample.bcfnt) 53 $(file commonRes/font/sample.bcfna) 54 55COMMON_RESOURCES[] = $(SAMPLE_FONTS) 56 57public.SetupScript(script, outputDir, files) = 58 OFILES = $(addprefix $(outputDir)$(DIRSEP), $(files)) 59 $(OFILES): $(COMMON_RESOURCES) 60 $(script) 61 return $(OFILES) 62 63.SUBDIRS: animShare archiveFont bounding commonRes extUserData group locationAdjust multiArc perspective simple simple2 tagGroupBind orthoStereo texVram 64 65DefineDefaultRules() 66