00001 /* 00002 * Copyright (C) 2003-2009 Olivier Boudeville 00003 * 00004 * This file is part of the OSDL library. 00005 * 00006 * The OSDL library is free software: you can redistribute it and/or modify 00007 * it under the terms of either the GNU Lesser General Public License or 00008 * the GNU General Public License, as they are published by the Free Software 00009 * Foundation, either version 3 of these Licenses, or (at your option) 00010 * any later version. 00011 * 00012 * The OSDL library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU Lesser General Public License and the GNU General Public License 00016 * for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License and of the GNU General Public License along with the OSDL library. 00020 * If not, see <http://www.gnu.org/licenses/>. 00021 * 00022 * Author: Olivier Boudeville (olivier.boudeville@esperide.com) 00023 * 00024 */ 00025 00026 00027 #ifndef OSDL_CONFIG_FOR_NINTENDO_DS 00028 #define OSDL_CONFIG_FOR_NINTENDO_DS 00029 00030 00031 /* 00032 * Common defines for cross-compilation to the Nintendo DS. 00033 * 00034 * The library user just has to ensure that either OSDL_RUNS_ON_ARM7 or 00035 * or OSDL_RUNS_ON_ARM9 is set to 1, the other one being set to 0. 00036 * 00037 * Not related in any way to autoconf. 00038 * 00039 * Some Ceylan symbols are defined, so that direct includes of Ceylan C header 00040 * can be performed. 00041 * 00042 */ 00043 00044 #define CEYLAN_ARCH_NINTENDO_DS 1 00045 00046 00047 // Auto-set the arch flags expected by libnds: 00048 #ifdef OSDL_RUNS_ON_ARM7 00049 00050 #define ARM7 00051 00052 #define OSDL_DS_LOG(messageString) 00053 00054 #define CEYLAN_RUNS_ON_ARM7 1 00055 00056 #else // OSDL_RUNS_ON_ARM7 00057 00058 #ifdef OSDL_RUNS_ON_ARM9 00059 00060 #define ARM9 00061 00062 #define CEYLAN_RUNS_ON_ARM9 1 00063 00064 // For iprintf and al: 00065 #include <stdio.h> 00066 00067 #define OSDL_DS_LOG(messageString) ::iprintf( "[Debug] %s\n", ((messageString).c_str()) ) 00068 00069 // Only included in the DS ARM9 case: 00070 #include "OSDLCommandManager.h" 00071 00072 #else // OSDL_RUNS_ON_ARM9 00073 00074 #error OSDLConfigForNintendoDS.h: either OSDL_RUNS_ON_ARM7 or OSDL_RUNS_ON_ARM9 must be defined. 00075 00076 #endif // OSDL_RUNS_ON_ARM9 00077 00078 #endif // OSDL_RUNS_ON_ARM7 00079 00080 00081 // For iprintf and al: 00082 #include <stdio.h> 00083 00084 // For libnds (discriminates between ARM7/ARM9): 00085 #include "nds.h" 00086 00087 00088 // Not available on the DS: 00089 #define OSDL_USES_AGAR 0 00090 #define OSDL_USES_LIBPNG 0 00091 // OSDL_USES_OPENGL partly used on the DS. 00092 #define OSDL_USES_PHYSICSFS 0 00093 #define OSDL_USES_SDL 0 00094 #define OSDL_USES_SDL_GFX 0 00095 #define OSDL_USES_SDL_IMAGE 0 00096 #define OSDL_USES_MIXER 0 00097 #define OSDL_USES_SDL_TTF 0 00098 00099 00100 00101 #endif // OSDL_CONFIG_FOR_NINTENDO_DS