1#----------------------------------------------------------------------------
2# Project:  Horizon
3# File:     CTR.targetdefs.om
4#
5# Copyright (C)2009-2011 Nintendo Co., Ltd.  All rights reserved.
6#
7# These coded instructions, statements, and computer programs contain
8# proprietary information of Nintendo of America Inc. and/or Nintendo
9# Company Ltd., and are protected by Federal copyright law. They may
10# not be disclosed to third parties or copied or duplicated in any form,
11# in whole or in part, without the prior written consent of Nintendo.
12#
13# $Rev: 41755 $
14#----------------------------------------------------------------------------
15
16#----------------------------------------------------------------------------
17# CTR platform definition
18#----------------------------------------------------------------------------
19TargetSpecCTR. =
20    extends $(TargetSpec)
21    class TargetSpecCTR
22
23    platform    = CTR
24
25    new(name) =
26        this.name = $(name)
27        return $(this)
28
29    getMinimumLibraries(systemname, processor) =
30        libs =
31        switch($(systemname))
32        case Process
33            libs +=
34                switch($(processor))
35                case MPCore
36                    value libnn_dbg         \
37                          libnn_err         \
38                          libnn_fnd         \
39                          libnn_init        \
40                          libnn_ndm         \
41                          libnn_nstd        \
42                          libnn_os          \
43                          libnn_srv         \
44                          libnn_svc         \
45                          libnn_svcDbg      \
46                          libnn_util        \
47                          librtport
48            export
49        return $(libs)
50
51    getDefaultLibraries(systemname, processor) =
52        libs = $(getMinimumLibraries $(systemname), $(processor))
53        switch($(systemname))
54        case Process
55            libs +=
56                switch($(processor))
57                case MPCore
58                    value libgles2          \
59                          libnn_ac          \
60                          libnn_applet      \
61                          libnn_boss        \
62                          libnn_camera      \
63                          libnn_cec         \
64                          libnn_cfg         \
65                          libnn_crypto      \
66                          libnn_cryptoRsa   \
67                          libnn_cx          \
68                          libnn_dbm         \
69                          libnn_dlp         \
70                          libnn_dsp         \
71                          libnn_erreula     \
72                          libnn_font        \
73                          libnn_friends     \
74                          libnn_fs          \
75                          libnn_gd          \
76                          libnn_gr          \
77                          libnn_gxlow       \
78                          libnn_hid         \
79                          libnn_hidlow      \
80                          libnn_http        \
81                          libnn_ir          \
82                          libnn_jpegmp      \
83                          libnn_math        \
84                          libnn_mic         \
85                          libnn_news        \
86                          libnn_ngc         \
87                          libnn_nwm         \
88                          libnn_phtsel      \
89                          libnn_pl          \
90                          libnn_ptm         \
91                          libnn_rdt         \
92                          libnn_snd         \
93                          libnn_socket      \
94                          libnn_ssl         \
95                          libnn_swkbd       \
96                          libnn_tpl         \
97                          libnn_ubl         \
98                          libnn_uds         \
99                          libnn_ulcd        \
100                          libnn_voicesel    \
101                          libnn_y2r
102            export
103        return $(libs)
104
105    getHostIoLibraries(systemname, processor) =
106        libs =
107        switch($(systemname))
108        case Process
109            libs +=
110                switch($(processor))
111                case MPCore
112                    value libnn_dev         \
113                          libnn_fshio       \
114                          libnn_hio         \
115                          libnn_midi
116            export
117        return $(libs)
118
119    getPreloadProcesses(processor, moduledir) =
120        switch($(processor))
121        case MPCore
122            return $(EMPTY)
123        return $(EMPTY)
124
125    getMacroFlags(systemname, processor) =
126        flags = -DNN_PROCESSOR_ARM
127        flags +=
128            switch($(processor))
129            case MPCore
130                value -DNN_PROCESSOR_ARM11MPCORE -DNN_PROCESSOR_ARM_V6 -DNN_PROCESSOR_ARM_VFP_V2
131        return $(flags)
132
133    getDefaultRomSpecFile(hardware) =
134        return Application.rsf
135
136    getSystemFlags(systemname) =
137        return $(EMPTY)
138
139#----------------------------------------------------------------------------
140# Hardware definition
141#----------------------------------------------------------------------------
142
143#----------------------------------------------------------------------------
144section
145    private.spec = $(TargetSpecCTR.new $'CTR-TS')
146    spec.hardware     = CTR-TS
147    spec.processors   = MPCore
148    spec.getSystemFlags(systemname) =
149        private.flags = -DNN_DEBUGGER_KMC_PARTNER
150        return $(flags)
151
152    spec.getMacroFlags(systemname, processor) =
153        return $(TargetSpecCTR::getMacroFlags $(systemname), $(processor)) -DNN_HARDWARE_CTR
154
155    TARGET_MANAGER = $(TARGET_MANAGER.register $(spec))
156    export TARGET_MANAGER
157
158