summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-05-14 12:37:05 +0000
committerThomas Martitz <kugel@rockbox.org>2010-05-14 12:37:05 +0000
commit3cca7e865082c8144a47687e3a2455fba5a927d5 (patch)
treeb5bf8a0d943b9af94be5ef5b47f1046ce84576e3
parent3d1a85695b64029d93de631d0c6fd81c3311d6e7 (diff)
downloadrockbox-3cca7e865082c8144a47687e3a2455fba5a927d5.zip
rockbox-3cca7e865082c8144a47687e3a2455fba5a927d5.tar.gz
rockbox-3cca7e865082c8144a47687e3a2455fba5a927d5.tar.bz2
rockbox-3cca7e865082c8144a47687e3a2455fba5a927d5.tar.xz
Include host system's header files and don't compile our c library replacements in the sim.
This makes it possible to move the simulator code into the target tree (for Rockbox as an application). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26019 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugin.c2
-rw-r--r--apps/plugin.h2
-rw-r--r--firmware/SOURCES10
-rw-r--r--firmware/firmware.make5
4 files changed, 15 insertions, 4 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index a1a68af..1ab15f8 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -434,7 +434,9 @@ static const struct plugin_api rockbox_api = {
memset,
memcpy,
memmove,
+#ifndef SIMULATOR
_ctype_,
+#endif
atoi,
strchr,
strcat,
diff --git a/apps/plugin.h b/apps/plugin.h
index 26d17a2..584c146 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -548,7 +548,9 @@ struct plugin_api {
void* (*memset)(void *dst, int c, size_t length);
void* (*memcpy)(void *out, const void *in, size_t n);
void* (*memmove)(void *out, const void *in, size_t n);
+#ifndef SIMULATOR
const unsigned char *_rbctype_;
+#endif
int (*atoi)(const char *str);
char *(*strchr)(const char *s, int c);
char *(*strcat)(char *s1, const char *s2);
diff --git a/firmware/SOURCES b/firmware/SOURCES
index b155a9f..3327fbb 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -21,12 +21,13 @@ timer.c
panic.c
debug.c
-/* Common */
-#if !defined(SIMULATOR) || defined(__MINGW32__) || defined(__CYGWIN__)
+/* Standard library */
+#if !defined(SIMULATOR)
+#if defined(__MINGW32__) || defined(__CYGWIN__)
libc/errno.c
/* alsa on linux requires a more advanced sprintf, i.e. not ours */
libc/sprintf.c
-#endif /* !defined(SIMULATOR) || defined(__MINGW32__) || defined(__CYGWIN__) */
+#endif /* defined(__MINGW32__) || defined(__CYGWIN__) */
libc/atoi.c
libc/ctype.c
libc/memcmp.c
@@ -42,6 +43,9 @@ libc/strrchr.c
libc/strtok.c
libc/strstr.c
libc/mktime.c
+#endif /* !defined(SIMULATOR)*/
+
+/* Common */
common/config.c
common/crc32.c
#ifdef MI4_FORMAT
diff --git a/firmware/firmware.make b/firmware/firmware.make
index 115bfac..52b5a19 100644
--- a/firmware/firmware.make
+++ b/firmware/firmware.make
@@ -7,7 +7,10 @@
# $Id$
#
-INCLUDES += -I$(FIRMDIR)/libc/include -I$(FIRMDIR) -I$(FIRMDIR)/export -I$(FIRMDIR)/drivers -I$(FIRMDIR)/include
+INCLUDES += -I$(FIRMDIR) -I$(FIRMDIR)/export -I$(FIRMDIR)/drivers -I$(FIRMDIR)/include
+ifndef SIMVER
+INCLUDES += -I$(FIRMDIR)/libc/include
+endif
FIRMLIB_SRC += $(call preprocess, $(FIRMDIR)/SOURCES)
FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC))