From 64f949f2954db85968850f6e157e5c3b10df6b7d Mon Sep 17 00:00:00 2001 From: Barry Wardell Date: Fri, 29 Sep 2006 16:15:11 +0000 Subject: Allow UI simulator to be build on OS (Slightly updated version of FS5767) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11094 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'apps/plugins/Makefile') 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 CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN +ifeq ($(UNAME), Darwin) +SHARED_FLAG=-dynamiclib -Wl,-single_module +else +SHARED_FLAG=-shared +endif + ifdef APPEXTRA INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) endif @@ -96,7 +102,7 @@ ifeq ($(SIMVER), x11) $(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) @echo "LD "`basename $@` - $(SILENT)$(CC) $(CFLAGS) -shared $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ + $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -112,7 +118,7 @@ ifeq ($(SIMVER), sdl) $(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) @echo "LD "`basename $@` - $(SILENT)$(CC) $(CFLAGS) -shared $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ + $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 -- cgit v1.2.3