#---------------------------------------------------------------------------- # Project: Horizon # File: platformdefs.om # # Copyright (C)2009-2011 Nintendo Co., Ltd. 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. # # $Rev: 40245 $ #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- # Class definitions #---------------------------------------------------------------------------- PlatformManager. = class PlatformManager this.platforms[] = $(EMPTY) new() = Dump() return $(this) Add(spec) = platforms += $(spec) return $(this) Select(targets) = echo $(platforms.nth 1) return $(if $(equal $(platforms.length),0),$(EMPTY),$(platforms.nth 1)) Dump() = platforms.foreach(v) println($"Platform: "$(v.Name)) return PlatformSpec.= class PlatformSpec this.platform_name = $(EMPTY) this.compiler_type = $(EMPTY) this.debugger_type = $(EMPTY) new(pn, ct, dt) = platform_name = $(pn) compiler_type = $(ct) debugger_type = $(dt) return $(this) Name() = return $(this.platform_name) GetCompilerType() = return $(this.compiler_type) GetDebuggerType() = return $(this.debugger_type) global.RegisterPlatform(name) = NN_PLATFORM_MANAGER = $(NN_PLATFORM_MANAGER.Add $(name)) export #---------------------------------------------------------------------------- # Variable Definitions #---------------------------------------------------------------------------- global.NN_PLATFORM_MANAGER = $(PlatformManager.new) #---------------------------------------------------------------------------- # Load platform definitions #---------------------------------------------------------------------------- foreach(om,$(ls i,$(ROOT_OMAKE)/platforms/*.om)) include $(removesuffix $(om)) export