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