diff options
Diffstat (limited to 'apps/plugins/chessbox/Makefile')
-rw-r--r-- | apps/plugins/chessbox/Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/plugins/chessbox/Makefile b/apps/plugins/chessbox/Makefile index 66381bea12..9d13a2e12d 100644 --- a/apps/plugins/chessbox/Makefile +++ b/apps/plugins/chessbox/Makefile | |||
@@ -12,6 +12,12 @@ INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR) | |||
12 | CFLAGS = $(GCCOPTS) -O2 $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ | 12 | CFLAGS = $(GCCOPTS) -O2 $(INCLUDES) $(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 |
@@ -55,7 +61,7 @@ ifeq ($(SIMVER), x11) | |||
55 | 61 | ||
56 | $(OUTPUT): $(OBJS) | 62 | $(OUTPUT): $(OBJS) |
57 | @echo "LD $<" | 63 | @echo "LD $<" |
58 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | 64 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ |
59 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 65 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
60 | # 'x' must be kept or you'll have "Win32 error 5" | 66 | # 'x' must be kept or you'll have "Win32 error 5" |
61 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 67 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -71,7 +77,7 @@ ifeq ($(SIMVER), sdl) | |||
71 | 77 | ||
72 | $(OUTPUT): $(OBJS) | 78 | $(OUTPUT): $(OBJS) |
73 | @echo "LD $<" | 79 | @echo "LD $<" |
74 | @$(CC) $(CFLAGS) -shared $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ | 80 | @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ |
75 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 81 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
76 | # 'x' must be kept or you'll have "Win32 error 5" | 82 | # 'x' must be kept or you'll have "Win32 error 5" |
77 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 83 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |