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