* the GNU General Public License.
*
* Copyright 2004, 2005 Develer S.r.l. (http://www.develer.com/)
- *
+ * Copyright 2008 Bernie Innocenti <bernie@codewiz.org>
* -->
*
* \brief OS-specific definitions
*
* \version $Id$
- *
* \author Bernie Innocenti <bernie@codewiz.org>
*/
-#ifndef DEVLIB_OS_H
-#define DEVLIB_OS_H
-
-/** Macro to include OS-specific versions of the headers. */
-#define OS_HEADER(module) PP_STRINGIZE(emul/PP_CAT3(module, _, OS_ID).h)
-#define OS_CSOURCE(module) PP_STRINGIZE(emul/PP_CAT3(module, _, OS_ID).c)
+#ifndef CFG_OS_H
+#define CFG_OS_H
/*
* OS autodetection (Some systems trigger multiple OS definitions)
#error Neither hosted nor embedded OS environment
#endif
-#endif /* DEVLIB_OS_H */
+#if OS_HOSTED
+
+ /// Macro to include OS-specific headers.
+ #define OS_HEADER(module) PP_STRINGIZE(emul/PP_CAT3(module, _, OS_ID).h)
+
+ /// Macro to include OS-specific source files.
+ #define OS_CSOURCE(module) PP_STRINGIZE(emul/PP_CAT3(module, _, OS_ID).c)
+
+#else
+ // Fallbacks for embedded systems
+ #define OS_HEADER(module) CPU_HEADER(module)
+ #define OS_CSOURCE(module) CPU_CSOURCE(module)
+#endif
+
+#endif /* CFG_OS_H */