diff options
-rw-r--r-- | apps/Makefile | 9 | ||||
-rw-r--r-- | apps/bitmaps/mono/SOURCES | 3 | ||||
-rw-r--r-- | apps/bitmaps/mono/osx.dummy.bmp | bin | 0 -> 66 bytes | |||
-rw-r--r-- | apps/bitmaps/remote_mono/SOURCES | 3 | ||||
-rw-r--r-- | apps/bitmaps/remote_mono/osx.dummy.bmp | bin | 0 -> 66 bytes | |||
-rw-r--r-- | apps/codecs/Makefile | 10 | ||||
-rw-r--r-- | apps/plugins/Makefile | 10 | ||||
-rw-r--r-- | apps/plugins/chessbox/Makefile | 10 | ||||
-rw-r--r-- | apps/plugins/databox/Makefile | 10 | ||||
-rw-r--r-- | apps/plugins/doom/Makefile | 15 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/Makefile | 9 | ||||
-rw-r--r-- | apps/plugins/pacbox/Makefile | 9 | ||||
-rw-r--r-- | apps/plugins/rockboy/Makefile | 10 | ||||
-rw-r--r-- | apps/plugins/searchengine/Makefile | 10 | ||||
-rw-r--r-- | apps/plugins/sudoku/Makefile | 10 | ||||
-rw-r--r-- | apps/plugins/zxbox/Makefile | 7 | ||||
-rwxr-xr-x | tools/configure | 11 | ||||
-rw-r--r-- | uisimulator/common/io.c | 3 |
18 files changed, 114 insertions, 25 deletions
diff --git a/apps/Makefile b/apps/Makefile index 53a0d373bb..6214ce138b 100644 --- a/apps/Makefile +++ b/apps/Makefile | |||
@@ -164,12 +164,17 @@ EXTRAOBJ = $(BUILDDIR)/sim/uisw32-res.o | |||
164 | LDOPTS += -lwinmm | 164 | LDOPTS += -lwinmm |
165 | endif | 165 | endif |
166 | 166 | ||
167 | # OS X's ld does not support -Map | ||
168 | ifeq ($(UNAME), Darwin) | ||
169 | SIMULATOR_MAP= | ||
170 | else | ||
171 | SIMULATOR_MAP=-Wl,-Map,$(OBJDIR)/rockbox.map | ||
172 | endif | ||
167 | 173 | ||
168 | $(BUILDDIR)/$(BINARY) : $(OBJS) $(DEPFILE) $(BUILDDIR)/libsim.a \ | 174 | $(BUILDDIR)/$(BINARY) : $(OBJS) $(DEPFILE) $(BUILDDIR)/libsim.a \ |
169 | $(BUILDDIR)/libcomsim.a $(LIBROCKBOX) $(BITMAPLIBS) | 175 | $(BUILDDIR)/libcomsim.a $(LIBROCKBOX) $(BITMAPLIBS) |
170 | @echo "LD $(BINARY)" | 176 | @echo "LD $(BINARY)" |
171 | $(SILENT)$(CC) $(GCCOPTS) -o $@ $(OBJS) -L$(BUILDDIR) -lrockbox -lsim -lcomsim $(LINKBITMAPS) $(LDOPTS) $(EXTRAOBJ) -Wl,-Map,$(OBJDIR)/rockbox.map | 177 | $(SILENT)$(CC) $(GCCOPTS) -o $@ $(OBJS) -L$(BUILDDIR) -lrockbox -lsim -lcomsim $(LINKBITMAPS) $(LDOPTS) $(EXTRAOBJ) $(SIMULATOR_MAP) |
172 | |||
173 | endif | 178 | endif |
174 | 179 | ||
175 | $(BUILDDIR)/rockbox.ucl: $(OBJDIR)/rockbox.bin | 180 | $(BUILDDIR)/rockbox.ucl: $(OBJDIR)/rockbox.bin |
diff --git a/apps/bitmaps/mono/SOURCES b/apps/bitmaps/mono/SOURCES index e69de29bb2..c59aab6107 100644 --- a/apps/bitmaps/mono/SOURCES +++ b/apps/bitmaps/mono/SOURCES | |||
@@ -0,0 +1,3 @@ | |||
1 | #if defined(SIMULATOR) && defined(__APPLE__) | ||
2 | osx.dummy.bmp | ||
3 | #endif | ||
diff --git a/apps/bitmaps/mono/osx.dummy.bmp b/apps/bitmaps/mono/osx.dummy.bmp new file mode 100644 index 0000000000..f09bec7a4c --- /dev/null +++ b/apps/bitmaps/mono/osx.dummy.bmp | |||
Binary files differ | |||
diff --git a/apps/bitmaps/remote_mono/SOURCES b/apps/bitmaps/remote_mono/SOURCES index e69de29bb2..c59aab6107 100644 --- a/apps/bitmaps/remote_mono/SOURCES +++ b/apps/bitmaps/remote_mono/SOURCES | |||
@@ -0,0 +1,3 @@ | |||
1 | #if defined(SIMULATOR) && defined(__APPLE__) | ||
2 | osx.dummy.bmp | ||
3 | #endif | ||
diff --git a/apps/bitmaps/remote_mono/osx.dummy.bmp b/apps/bitmaps/remote_mono/osx.dummy.bmp new file mode 100644 index 0000000000..f09bec7a4c --- /dev/null +++ b/apps/bitmaps/remote_mono/osx.dummy.bmp | |||
Binary files differ | |||
diff --git a/apps/codecs/Makefile b/apps/codecs/Makefile index 62312e2288..28fc82ba79 100644 --- a/apps/codecs/Makefile +++ b/apps/codecs/Makefile | |||
@@ -12,6 +12,12 @@ INCLUDES = -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \ | |||
12 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(TARGET) $(EXTRA_DEFINES) \ | 12 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(TARGET) $(EXTRA_DEFINES) \ |
13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DCODEC | 13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DCODEC |
14 | 14 | ||
15 | ifeq ($(UNAME), Darwin) | ||
16 | SHARED_FLAG=-dynamiclib -Wl,-single_module | ||
17 | else | ||
18 | SHARED_FLAG=-shared | ||
19 | endif | ||
20 | |||
15 | ifdef APPEXTRA | 21 | ifdef APPEXTRA |
16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | 22 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) |
17 | endif | 23 | endif |
@@ -80,7 +86,7 @@ ifeq ($(SIMVER), x11) | |||
80 | 86 | ||
81 | $(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT) | 87 | $(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT) |
82 | @echo "LD $(notdir $@)" | 88 | @echo "LD $(notdir $@)" |
83 | $(SILENT)$(CC) $(CFLAGS) -shared $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@ | 89 | $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@ |
84 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 90 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
85 | # 'x' must be kept or you'll have "Win32 error 5" | 91 | # 'x' must be kept or you'll have "Win32 error 5" |
86 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 92 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -96,7 +102,7 @@ ifeq ($(SIMVER), sdl) | |||
96 | 102 | ||
97 | $(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT) | 103 | $(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT) |
98 | @echo "LD $(notdir $@) $^" | 104 | @echo "LD $(notdir $@) $^" |
99 | $(SILENT)$(CC) $(CFLAGS) -shared $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@ | 105 | $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@ |
100 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 106 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
101 | # 'x' must be kept or you'll have "Win32 error 5" | 107 | # 'x' must be kept or you'll have "Win32 error 5" |
102 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 108 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile index 0b2974f565..adc7895da0 100644 --- a/apps/plugins/Makefile +++ b/apps/plugins/Makefile | |||
@@ -13,6 +13,12 @@ INCLUDES = $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/c | |||
13 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ | 13 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ |
14 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN | 14 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN |
15 | 15 | ||
16 | ifeq ($(UNAME), Darwin) | ||
17 | SHARED_FLAG=-dynamiclib -Wl,-single_module | ||
18 | else | ||
19 | SHARED_FLAG=-shared | ||
20 | endif | ||
21 | |||
16 | ifdef APPEXTRA | 22 | ifdef APPEXTRA |
17 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | 23 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) |
18 | endif | 24 | endif |
@@ -96,7 +102,7 @@ ifeq ($(SIMVER), x11) | |||
96 | 102 | ||
97 | $(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) | 103 | $(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) |
98 | @echo "LD "`basename $@` | 104 | @echo "LD "`basename $@` |
99 | $(SILENT)$(CC) $(CFLAGS) -shared $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ | 105 | $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ |
100 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 106 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
101 | # 'x' must be kept or you'll have "Win32 error 5" | 107 | # 'x' must be kept or you'll have "Win32 error 5" |
102 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 108 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -112,7 +118,7 @@ ifeq ($(SIMVER), sdl) | |||
112 | 118 | ||
113 | $(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) | 119 | $(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) |
114 | @echo "LD "`basename $@` | 120 | @echo "LD "`basename $@` |
115 | $(SILENT)$(CC) $(CFLAGS) -shared $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ | 121 | $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ |
116 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 122 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
117 | # 'x' must be kept or you'll have "Win32 error 5" | 123 | # 'x' must be kept or you'll have "Win32 error 5" |
118 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 124 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
diff --git a/apps/plugins/chessbox/Makefile b/apps/plugins/chessbox/Makefile index 66381bea12..9d13a2e12d 100644 --- a/apps/plugins/chessbox/Makefile +++ b/apps/plugins/chessbox/Makefile | |||
@@ -12,6 +12,12 @@ INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR) | |||
12 | CFLAGS = $(GCCOPTS) -O2 $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ | 12 | CFLAGS = $(GCCOPTS) -O2 $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ |
13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN | 13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN |
14 | 14 | ||
15 | ifeq ($(UNAME), Darwin) | ||
16 | SHARED_FLAG=-dynamiclib -Wl,-single_module | ||
17 | else | ||
18 | SHARED_FLAG=-shared | ||
19 | endif | ||
20 | |||
15 | ifdef APPEXTRA | 21 | ifdef APPEXTRA |
16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | 22 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) |
17 | endif | 23 | endif |
@@ -55,7 +61,7 @@ ifeq ($(SIMVER), x11) | |||
55 | 61 | ||
56 | $(OUTPUT): $(OBJS) | 62 | $(OUTPUT): $(OBJS) |
57 | @echo "LD $<" | 63 | @echo "LD $<" |
58 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | 64 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ |
59 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 65 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
60 | # 'x' must be kept or you'll have "Win32 error 5" | 66 | # 'x' must be kept or you'll have "Win32 error 5" |
61 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 67 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -71,7 +77,7 @@ ifeq ($(SIMVER), sdl) | |||
71 | 77 | ||
72 | $(OUTPUT): $(OBJS) | 78 | $(OUTPUT): $(OBJS) |
73 | @echo "LD $<" | 79 | @echo "LD $<" |
74 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | 80 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ |
75 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 81 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
76 | # 'x' must be kept or you'll have "Win32 error 5" | 82 | # 'x' must be kept or you'll have "Win32 error 5" |
77 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 83 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
diff --git a/apps/plugins/databox/Makefile b/apps/plugins/databox/Makefile index 507a861f9b..dba5597c8d 100644 --- a/apps/plugins/databox/Makefile +++ b/apps/plugins/databox/Makefile | |||
@@ -12,6 +12,12 @@ INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR) | |||
12 | CFLAGS = $(INCLUDES) $(GCCOPTS) -O3 $(TARGET) $(EXTRA_DEFINES) \ | 12 | CFLAGS = $(INCLUDES) $(GCCOPTS) -O3 $(TARGET) $(EXTRA_DEFINES) \ |
13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN | 13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN |
14 | 14 | ||
15 | ifeq ($(UNAME), Darwin) | ||
16 | SHARED_FLAG=-dynamiclib -Wl,-single_module | ||
17 | else | ||
18 | SHARED_FLAG=-shared | ||
19 | endif | ||
20 | |||
15 | ifdef APPEXTRA | 21 | ifdef APPEXTRA |
16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | 22 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) |
17 | endif | 23 | endif |
@@ -46,7 +52,7 @@ ifeq ($(SIMVER), x11) | |||
46 | 52 | ||
47 | $(OUTPUT): $(OBJS) | 53 | $(OUTPUT): $(OBJS) |
48 | @echo "LD $<" | 54 | @echo "LD $<" |
49 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | 55 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ |
50 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 56 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
51 | # 'x' must be kept or you'll have "Win32 error 5" | 57 | # 'x' must be kept or you'll have "Win32 error 5" |
52 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 58 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -62,7 +68,7 @@ ifeq ($(SIMVER), sdl) | |||
62 | 68 | ||
63 | $(OUTPUT): $(OBJS) | 69 | $(OUTPUT): $(OBJS) |
64 | @echo "LD $<" | 70 | @echo "LD $<" |
65 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | 71 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ |
66 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 72 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
67 | # 'x' must be kept or you'll have "Win32 error 5" | 73 | # 'x' must be kept or you'll have "Win32 error 5" |
68 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 74 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
diff --git a/apps/plugins/doom/Makefile b/apps/plugins/doom/Makefile index b79f5be7b0..a94a26a544 100644 --- a/apps/plugins/doom/Makefile +++ b/apps/plugins/doom/Makefile | |||
@@ -3,7 +3,10 @@ | |||
3 | # $Id$ | 3 | # $Id$ |
4 | # | 4 | # |
5 | # $Log$ | 5 | # $Log$ |
6 | # Revision 1.4 2006/07/27 13:27:19 linus | 6 | # Revision 1.5 2006/09/29 16:15:08 barrywardell |
7 | # Allow UI simulator to be build on OS (Slightly updated version of FS5767) | ||
8 | # | ||
9 | # Revision 1.4 2006-07-27 13:27:19 linus | ||
7 | # Moved the X5 button driver to the target tree | 10 | # Moved the X5 button driver to the target tree |
8 | # | 11 | # |
9 | # Revision 1.3 2006-04-14 21:07:56 kkurbjun | 12 | # Revision 1.3 2006-04-14 21:07:56 kkurbjun |
@@ -23,6 +26,12 @@ CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ | |||
23 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN \ | 26 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN \ |
24 | -Wno-strict-prototypes -O2 $(PROFILE_OPTS) | 27 | -Wno-strict-prototypes -O2 $(PROFILE_OPTS) |
25 | 28 | ||
29 | ifeq ($(UNAME), Darwin) | ||
30 | SHARED_FLAG=-dynamiclib -Wl,-single_module | ||
31 | else | ||
32 | SHARED_FLAG=-shared | ||
33 | endif | ||
34 | |||
26 | ifdef APPEXTRA | 35 | ifdef APPEXTRA |
27 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | 36 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) |
28 | endif | 37 | endif |
@@ -85,7 +94,7 @@ ifeq ($(SIMVER), x11) | |||
85 | 94 | ||
86 | $(OUTPUT): $(OBJS) | 95 | $(OUTPUT): $(OBJS) |
87 | @echo "LD $@" | 96 | @echo "LD $@" |
88 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | 97 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ |
89 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 98 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
90 | # 'x' must be kept or you'll have "Win32 error 5" | 99 | # 'x' must be kept or you'll have "Win32 error 5" |
91 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 100 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -101,7 +110,7 @@ ifeq ($(SIMVER), sdl) | |||
101 | 110 | ||
102 | $(OUTPUT): $(OBJS) | 111 | $(OUTPUT): $(OBJS) |
103 | @echo "LD $@" | 112 | @echo "LD $@" |
104 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | 113 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ |
105 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 114 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
106 | # 'x' must be kept or you'll have "Win32 error 5" | 115 | # 'x' must be kept or you'll have "Win32 error 5" |
107 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 116 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
diff --git a/apps/plugins/mpegplayer/Makefile b/apps/plugins/mpegplayer/Makefile index 46ea76633b..5982884700 100644 --- a/apps/plugins/mpegplayer/Makefile +++ b/apps/plugins/mpegplayer/Makefile | |||
@@ -12,6 +12,11 @@ INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR) | |||
12 | CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \ | 12 | CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \ |
13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN | 13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN |
14 | 14 | ||
15 | ifeq ($(UNAME), Darwin) | ||
16 | SHARED_FLAG=-dynamiclib -Wl,-single_module | ||
17 | else | ||
18 | SHARED_FLAG=-shared | ||
19 | endif | ||
15 | 20 | ||
16 | ifdef APPEXTRA | 21 | ifdef APPEXTRA |
17 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | 22 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) |
@@ -50,7 +55,7 @@ ifeq ($(SIMVER), x11) | |||
50 | 55 | ||
51 | $(OUTPUT): $(OBJS) | 56 | $(OUTPUT): $(OBJS) |
52 | @echo "LD $<" | 57 | @echo "LD $<" |
53 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | 58 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ |
54 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 59 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
55 | # 'x' must be kept or you'll have "Win32 error 5" | 60 | # 'x' must be kept or you'll have "Win32 error 5" |
56 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 61 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -66,7 +71,7 @@ ifeq ($(SIMVER), sdl) | |||
66 | 71 | ||
67 | $(OUTPUT): $(OBJS) | 72 | $(OUTPUT): $(OBJS) |
68 | @echo "LD $<" | 73 | @echo "LD $<" |
69 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | 74 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ |
70 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 75 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
71 | # 'x' must be kept or you'll have "Win32 error 5" | 76 | # 'x' must be kept or you'll have "Win32 error 5" |
72 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 77 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
diff --git a/apps/plugins/pacbox/Makefile b/apps/plugins/pacbox/Makefile index 4a5442c25f..fbff8b5109 100644 --- a/apps/plugins/pacbox/Makefile +++ b/apps/plugins/pacbox/Makefile | |||
@@ -12,6 +12,11 @@ INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR) | |||
12 | CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \ | 12 | CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \ |
13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN | 13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN |
14 | 14 | ||
15 | ifeq ($(UNAME), Darwin) | ||
16 | SHARED_FLAG=-dynamiclib -Wl,-single_module | ||
17 | else | ||
18 | SHARED_FLAG=-shared | ||
19 | endif | ||
15 | 20 | ||
16 | ifdef APPEXTRA | 21 | ifdef APPEXTRA |
17 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | 22 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) |
@@ -50,7 +55,7 @@ ifeq ($(SIMVER), x11) | |||
50 | 55 | ||
51 | $(OUTPUT): $(OBJS) | 56 | $(OUTPUT): $(OBJS) |
52 | @echo "LD $<" | 57 | @echo "LD $<" |
53 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | 58 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ |
54 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 59 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
55 | # 'x' must be kept or you'll have "Win32 error 5" | 60 | # 'x' must be kept or you'll have "Win32 error 5" |
56 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 61 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -66,7 +71,7 @@ ifeq ($(SIMVER), sdl) | |||
66 | 71 | ||
67 | $(OUTPUT): $(OBJS) | 72 | $(OUTPUT): $(OBJS) |
68 | @echo "LD $<" | 73 | @echo "LD $<" |
69 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | 74 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ |
70 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 75 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
71 | # 'x' must be kept or you'll have "Win32 error 5" | 76 | # 'x' must be kept or you'll have "Win32 error 5" |
72 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 77 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
diff --git a/apps/plugins/rockboy/Makefile b/apps/plugins/rockboy/Makefile index 39e684e143..91fdf67c31 100644 --- a/apps/plugins/rockboy/Makefile +++ b/apps/plugins/rockboy/Makefile | |||
@@ -16,6 +16,12 @@ ifdef APPEXTRA | |||
16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | 16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) |
17 | endif | 17 | endif |
18 | 18 | ||
19 | ifeq ($(UNAME), Darwin) | ||
20 | SHARED_FLAG=-dynamiclib -Wl,-single_module | ||
21 | else | ||
22 | SHARED_FLAG=-shared | ||
23 | endif | ||
24 | |||
19 | LINKFILE := $(OBJDIR)/link.lds | 25 | LINKFILE := $(OBJDIR)/link.lds |
20 | DEPFILE = $(OBJDIR)/dep-rockboy | 26 | DEPFILE = $(OBJDIR)/dep-rockboy |
21 | SRC = cpu.c emu.c events.c exports.c fastmem.c hw.c lcd.c lcdc.c loader.c \ | 27 | SRC = cpu.c emu.c events.c exports.c fastmem.c hw.c lcd.c lcdc.c loader.c \ |
@@ -62,7 +68,7 @@ ifeq ($(SIMVER), x11) | |||
62 | 68 | ||
63 | $(OUTPUT): $(OBJS) | 69 | $(OUTPUT): $(OBJS) |
64 | @echo "LD $@" | 70 | @echo "LD $@" |
65 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | 71 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ |
66 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 72 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
67 | # 'x' must be kept or you'll have "Win32 error 5" | 73 | # 'x' must be kept or you'll have "Win32 error 5" |
68 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 74 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -78,7 +84,7 @@ ifeq ($(SIMVER), sdl) | |||
78 | 84 | ||
79 | $(OUTPUT): $(OBJS) | 85 | $(OUTPUT): $(OBJS) |
80 | @echo "LD $@" | 86 | @echo "LD $@" |
81 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | 87 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ |
82 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 88 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
83 | # 'x' must be kept or you'll have "Win32 error 5" | 89 | # 'x' must be kept or you'll have "Win32 error 5" |
84 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 90 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
diff --git a/apps/plugins/searchengine/Makefile b/apps/plugins/searchengine/Makefile index 92e9f03991..d397f315f4 100644 --- a/apps/plugins/searchengine/Makefile +++ b/apps/plugins/searchengine/Makefile | |||
@@ -16,6 +16,12 @@ ifdef APPEXTRA | |||
16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | 16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) |
17 | endif | 17 | endif |
18 | 18 | ||
19 | ifeq ($(UNAME), Darwin) | ||
20 | SHARED_FLAG=-dynamiclib -Wl,-single_module | ||
21 | else | ||
22 | SHARED_FLAG=-shared | ||
23 | endif | ||
24 | |||
19 | LINKFILE := $(OBJDIR)/link.lds | 25 | LINKFILE := $(OBJDIR)/link.lds |
20 | DEPFILE = $(OBJDIR)/dep-searchengine | 26 | DEPFILE = $(OBJDIR)/dep-searchengine |
21 | SRC = searchengine.c parser.c token.c dbinterface.c | 27 | SRC = searchengine.c parser.c token.c dbinterface.c |
@@ -46,7 +52,7 @@ ifeq ($(SIMVER), x11) | |||
46 | 52 | ||
47 | $(OUTPUT): $(OBJS) | 53 | $(OUTPUT): $(OBJS) |
48 | @echo "LD $<" | 54 | @echo "LD $<" |
49 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | 55 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ |
50 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 56 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
51 | # 'x' must be kept or you'll have "Win32 error 5" | 57 | # 'x' must be kept or you'll have "Win32 error 5" |
52 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 58 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -62,7 +68,7 @@ ifeq ($(SIMVER), sdl) | |||
62 | 68 | ||
63 | $(OUTPUT): $(OBJS) | 69 | $(OUTPUT): $(OBJS) |
64 | @echo "LD $<" | 70 | @echo "LD $<" |
65 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | 71 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ |
66 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 72 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
67 | # 'x' must be kept or you'll have "Win32 error 5" | 73 | # 'x' must be kept or you'll have "Win32 error 5" |
68 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 74 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
diff --git a/apps/plugins/sudoku/Makefile b/apps/plugins/sudoku/Makefile index 8a1d8b189d..713d31bcb2 100644 --- a/apps/plugins/sudoku/Makefile +++ b/apps/plugins/sudoku/Makefile | |||
@@ -17,6 +17,12 @@ ifdef APPEXTRA | |||
17 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | 17 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) |
18 | endif | 18 | endif |
19 | 19 | ||
20 | ifeq ($(UNAME), Darwin) | ||
21 | SHARED_FLAG=-dynamiclib -Wl,-single_module | ||
22 | else | ||
23 | SHARED_FLAG=-shared | ||
24 | endif | ||
25 | |||
20 | LINKFILE := $(OBJDIR)/link.lds | 26 | LINKFILE := $(OBJDIR)/link.lds |
21 | DEPFILE = $(OBJDIR)/dep-sudoku | 27 | DEPFILE = $(OBJDIR)/dep-sudoku |
22 | 28 | ||
@@ -53,7 +59,7 @@ ifeq ($(SIMVER), x11) | |||
53 | 59 | ||
54 | $(OUTPUT): $(OBJS) | 60 | $(OUTPUT): $(OBJS) |
55 | @echo "LD $<" | 61 | @echo "LD $<" |
56 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | 62 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ |
57 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 63 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
58 | # 'x' must be kept or you'll have "Win32 error 5" | 64 | # 'x' must be kept or you'll have "Win32 error 5" |
59 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 65 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -69,7 +75,7 @@ ifeq ($(SIMVER), sdl) | |||
69 | 75 | ||
70 | $(OUTPUT): $(OBJS) | 76 | $(OUTPUT): $(OBJS) |
71 | @echo "LD $<" | 77 | @echo "LD $<" |
72 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | 78 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ |
73 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 79 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
74 | # 'x' must be kept or you'll have "Win32 error 5" | 80 | # 'x' must be kept or you'll have "Win32 error 5" |
75 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 81 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
diff --git a/apps/plugins/zxbox/Makefile b/apps/plugins/zxbox/Makefile index cb78ce961b..8668c3f4e7 100644 --- a/apps/plugins/zxbox/Makefile +++ b/apps/plugins/zxbox/Makefile | |||
@@ -12,6 +12,11 @@ INCLUDES = -I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | |||
12 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ | 12 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ |
13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN $(OPT_FLAGS) $(PROFILE_OPTS) | 13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN $(OPT_FLAGS) $(PROFILE_OPTS) |
14 | 14 | ||
15 | ifeq ($(UNAME), Darwin) | ||
16 | SHARED_FLAG=-dynamiclib -Wl,-single_module | ||
17 | else | ||
18 | SHARED_FLAG=-shared | ||
19 | endif | ||
15 | 20 | ||
16 | ifdef APPEXTRA | 21 | ifdef APPEXTRA |
17 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | 22 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) |
@@ -59,7 +64,7 @@ ifeq ($(SIMVER), sdl) | |||
59 | 64 | ||
60 | $(OUTPUT): $(OBJS) | 65 | $(OUTPUT): $(OBJS) |
61 | @echo "LD $<" | 66 | @echo "LD $<" |
62 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin -o $@ | 67 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ |
63 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 68 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
64 | # 'x' must be kept or you'll have "Win32 error 5" | 69 | # 'x' must be kept or you'll have "Win32 error 5" |
65 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 70 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
diff --git a/tools/configure b/tools/configure index 837a107aac..b83b8c7c3c 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -149,13 +149,22 @@ simcc () { | |||
149 | fi | 149 | fi |
150 | ;; | 150 | ;; |
151 | 151 | ||
152 | Darwin) | ||
153 | echo "Darwin host detected" | ||
154 | # sdl version | ||
155 | GCCOPTS="$GCCOPTS `sdl-config --cflags`" | ||
156 | LDOPTS="`sdl-config --libs`" | ||
157 | use_simsound="#define ROCKBOX_HAS_SIMSOUND 1" | ||
158 | echo "Enabled PCM sound playback in simulator" | ||
159 | ;; | ||
160 | |||
152 | *) | 161 | *) |
153 | echo "Unsupported system: $uname, fix configure and retry" | 162 | echo "Unsupported system: $uname, fix configure and retry" |
154 | exit | 163 | exit |
155 | ;; | 164 | ;; |
156 | esac | 165 | esac |
157 | 166 | ||
158 | if [ `uname -m` = "x86_64" ]; then | 167 | if [ "`uname -m`" = "x86_64" ]; then |
159 | GCCOPTS="$GCCOPTS -fPIC" # needed to make shared objects link | 168 | GCCOPTS="$GCCOPTS -fPIC" # needed to make shared objects link |
160 | fi | 169 | fi |
161 | 170 | ||
diff --git a/uisimulator/common/io.c b/uisimulator/common/io.c index 34bcef483c..c4f8840cc5 100644 --- a/uisimulator/common/io.c +++ b/uisimulator/common/io.c | |||
@@ -25,6 +25,9 @@ | |||
25 | #ifdef __FreeBSD__ | 25 | #ifdef __FreeBSD__ |
26 | #include <sys/param.h> | 26 | #include <sys/param.h> |
27 | #include <sys/mount.h> | 27 | #include <sys/mount.h> |
28 | #elif defined(__APPLE__) | ||
29 | #include <sys/param.h> | ||
30 | #include <sys/mount.h> | ||
28 | #elif !defined(WIN32) | 31 | #elif !defined(WIN32) |
29 | #include <sys/vfs.h> | 32 | #include <sys/vfs.h> |
30 | #endif | 33 | #endif |