summaryrefslogtreecommitdiff
path: root/apps/plugins/chessbox/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/chessbox/Makefile')
-rw-r--r--apps/plugins/chessbox/Makefile10
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)
12CFLAGS = $(GCCOPTS) -O2 $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ 12CFLAGS = $(GCCOPTS) -O2 $(INCLUDES) $(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
@@ -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 $@
59ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 65ifeq ($(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 $@
75ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 81ifeq ($(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