diff options
Diffstat (limited to 'apps/plugins')
-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 |
10 files changed, 80 insertions, 20 deletions
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 |