summaryrefslogtreecommitdiff
path: root/apps/plugins/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/Makefile')
-rw-r--r--apps/plugins/Makefile10
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
13CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ 13CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
14 -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN 14 -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
15 15
16ifeq ($(UNAME), Darwin)
17SHARED_FLAG=-dynamiclib -Wl,-single_module
18else
19SHARED_FLAG=-shared
20endif
21
16ifdef APPEXTRA 22ifdef APPEXTRA
17 INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) 23 INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
18endif 24endif
@@ -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 $@
100ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 106ifeq ($(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 $@
116ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 122ifeq ($(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