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