1 /*---------------------------------------------------------------------------*
2   Project:  NintendoWare
3   File:     platform.h
4 
5   Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain proprietary
8   information of Nintendo and/or its licensed developers and are protected by
9   national and international copyright laws. They may not be disclosed to third
10   parties or copied or duplicated in any form, in whole or in part, without the
11   prior written consent of Nintendo.
12 
13   The content herein is highly confidential and should be handled accordingly.
14 
15   $Revision: 31311 $
16  *---------------------------------------------------------------------------*/
17 
18 #ifndef NW_CONFIG_PLATFORM_H_
19 #define NW_CONFIG_PLATFORM_H_
20 
21 #if defined( NW_PLATFORM_RVL )
22     #include <nw/config/platform/rvl.h>
23 #elif defined( NW_PLATFORM_TWL )
24     #include <nw/config/platform/twl.h>
25 #elif defined( NN_PLATFORM_CTR )
26     #include <nw/config/platform/ctr.h>
27 #elif defined( NW_PLATFORM_CTRWIN )
28     #include <nw/config/platform/ctrwin.h>
29 #elif defined( NW_PLATFORM_WIN32 )
30     #include <nw/config/platform/win32.h>
31 #else
32 
33 #error "Unknown platform"
34 
35 #endif
36 
37 // TODO: 今からの変更は影響が大きいが、 TARGET と PLATFORM の名前の用途が逆の方がよいかも。
38 
39 // ByteOrder Macro
40 #define NW_ENDIAN_LITTLE    (0)
41 #define NW_ENDIAN_BIG       (1)
42 
43 
44 // NW_PLATFORM_ENDIAN (ターゲットとなるプラットフォームのバイトオーダー) の決定
45 #if defined( NW_LITTLE_ENDIAN )
46     #define NW_PLATFORM_ENDIAN NW_ENDIAN_LITTLE
47     #define NW_CPU_ENDIAN      NW_ENDIAN_LITTLE
48 #else
49     #define NW_PLATFORM_ENDIAN NW_ENDIAN_BIG
50     #define NW_CPU_ENDIAN      NW_ENDIAN_BIG
51 #endif
52 
53 /* NW_CONFIG_PLATFORM_H_ */
54 #endif
55