diff options
Diffstat (limited to 'apps/plugins/rockboy')
-rw-r--r-- | apps/plugins/rockboy/Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
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 |