1#!/usr/bin/env omake
2#----------------------------------------------------------------------------
3# Project: Horizon
4# File:    targetdefs.CTR.om
5#
6# Copyright 2007-2009 Nintendo.  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# $Date:: 2010-12-02#$
15# $Rev: 32145 $
16# $Author: hatamoto_minoru $
17#----------------------------------------------------------------------------
18
19#----------------------------------------------------------------------------
20# CTR プラットフォームの定義
21#----------------------------------------------------------------------------
22TargetSpecCTR. =
23    extends $(TargetSpec)
24    class TargetSpecCTR
25
26    platform    = CTR
27
28    new(name) =
29        this.name = $(name)
30        return $(this)
31
32    getMinimumLibraries(systemname, processor) =
33        libs =
34        switch($(systemname))
35        case Process
36            libs +=
37                switch($(processor))
38                case MPCore
39                    value libnn_dbg         \
40                          libnn_fnd         \
41                          libnn_init        \
42                          libnn_ndm         \
43                          libnn_os          \
44                          libnn_nstd        \
45                          libnn_svc         \
46                          libnn_svcDbg      \
47                          libnn_util        \
48                          libnn_err         \
49                          librtport         \
50                          libnn_srv
51            export
52        return $(libs)
53
54    getDefaultLibraries(systemname, processor) =
55        libs = $(getMinimumLibraries $(systemname), $(processor))
56        switch($(systemname))
57        case Process
58            libs +=
59                switch($(processor))
60                case MPCore
61                    value libnn_math        \
62                          libgles2          \
63                          libnn_dsp         \
64                          libnn_fs          \
65                          libnn_gxlow       \
66                          libnn_hid         \
67                          libnn_hidlow      \
68                          libnn_snd         \
69                          libnn_mic         \
70                          libnn_ptm         \
71                          libnn_socket      \
72                          libnn_ac          \
73                          libnn_http        \
74                          libnn_camera      \
75                          libnn_y2r         \
76                          libnn_jpegmp      \
77                          libnn_cfg         \
78                          libnn_ndm         \
79                          libnn_uds         \
80                          libnn_dbm         \
81                          libnn_cec         \
82                          libnn_pl          \
83                          libnn_cx          \
84                          libnn_dlp         \
85                          libnn_font        \
86                          libnn_applet      \
87                          libnn_crypto
88            export
89        return $(libs)
90
91    getHostIoLibraries(systemname, processor) =
92        libs =
93        switch($(systemname))
94        case Process
95            libs +=
96                switch($(processor))
97                case MPCore
98                    value libnn_hio         \
99                          libnn_dev
100            export
101        return $(libs)
102
103    getPreloadProcesses(processor, moduledir) =
104        switch($(processor))
105        case MPCore
106            return $(EMPTY)
107        case ARM946ES
108            return $(EMPTY)
109        case ARM7TDMI
110            return $(EMPTY)
111        return $(EMPTY)
112
113    getMacroFlags(systemname, processor) =
114        flags = -DNN_PROCESSOR_ARM
115        flags +=
116            switch($(processor))
117            case MPCore
118                value -DNN_PROCESSOR_ARM11MPCORE -DNN_PROCESSOR_ARM_V6 -DNN_PROCESSOR_ARM_VFP_V2
119            case ARM946ES
120                value -DNN_PROCESSOR_ARM946ES -DNN_PROCESSOR_ARM_V5
121            case ARM7TDMI
122                value -DNN_PROCESSOR_ARM7TDMI -DNN_PROCESSOR_ARM_V4
123        return $(flags)
124
125    getDefaultRomSpecFile(hardware) =
126        return Application.rsf
127
128    getSystemFlags(systemname) =
129        return $(EMPTY)
130
131#----------------------------------------------------------------------------
132# ハードウェア定義
133#----------------------------------------------------------------------------
134
135#----------------------------------------------------------------------------
136section
137    spec = $(TargetSpecCTR.new $'CTR-TS')
138    spec.hardware     = CTR-TS
139    spec.processors   = MPCore ARM946ES
140    spec.getSystemFlags(systemname) =
141        flags = -DNN_DEBUGGER_KMC_PARTNER
142        switch($(systemname))
143        case Kernel
144            flags += -DFIRM_TARGET_KERNEL -DBROM_TARGET_KERNEL
145            export
146        return $(flags)
147
148    spec.getMacroFlags(systemname, processor) =
149        return $(TargetSpecCTR::getMacroFlags $(systemname), $(processor)) -DNN_HARDWARE_CTR
150
151    TARGET_MANAGER.register($(spec))
152    export
153
154
155
156if $(test -f $(ROOT_OMAKE)/targetdefs.CTR.internal.om)
157    include $(ROOT_OMAKE)/targetdefs.CTR.internal.om
158    export
159