00001 /* 00002 * Copyright (C) 2003-2009 Olivier Boudeville 00003 * 00004 * This file is part of the Ceylan library. 00005 * 00006 * The Ceylan 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 Ceylan 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 the GNU General Public License along with the Ceylan 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 CEYLAN_CONFIG_FOR_NINTENDO_DS 00028 #define CEYLAN_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 CEYLAN_RUNS_ON_ARM7 or 00035 * or CEYLAN_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 */ 00040 00041 #define CEYLAN_USES_STRERROR 00042 00043 00044 // Auto-set the arch flags expected by libnds: 00045 #ifdef CEYLAN_RUNS_ON_ARM7 00046 00047 #define ARM7 00048 00049 #define CEYLAN_DS_LOG(messageString) 00050 00051 #else // CEYLAN_RUNS_ON_ARM7 00052 00053 #ifdef CEYLAN_RUNS_ON_ARM9 00054 00055 #define ARM9 00056 00057 // For iprintf and al: 00058 #include <stdio.h> 00059 00060 #define CEYLAN_DS_LOG(messageString) ::iprintf( "[Debug] %s\n", ((messageString).c_str()) ) 00061 00062 // Only included in the DS ARM9 case: 00063 #include "CeylanFIFO.h" 00064 00065 00066 #else // CEYLAN_RUNS_ON_ARM9 00067 00068 #error CeylanConfigForNintendoDS.h: either CEYLAN_RUNS_ON_ARM7 or CEYLAN_RUNS_ON_ARM9 must be defined. 00069 00070 #endif // CEYLAN_RUNS_ON_ARM9 00071 00072 #endif // CEYLAN_RUNS_ON_ARM7 00073 00074 00075 // For iprintf and al: 00076 #include <stdio.h> 00077 00078 // For libnds (discriminates between ARM7/ARM9): 00079 #include "nds.h" 00080 00081 00082 #endif // CEYLAN_CONFIG_FOR_NINTENDO_DS 00083