diff options
Diffstat (limited to 'apps/codecs/Makefile')
-rw-r--r-- | apps/codecs/Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/codecs/Makefile b/apps/codecs/Makefile index 62312e2288..28fc82ba79 100644 --- a/apps/codecs/Makefile +++ b/apps/codecs/Makefile | |||
@@ -12,6 +12,12 @@ INCLUDES = -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \ | |||
12 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(TARGET) $(EXTRA_DEFINES) \ | 12 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(TARGET) $(EXTRA_DEFINES) \ |
13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DCODEC | 13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DCODEC |
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 |
@@ -80,7 +86,7 @@ ifeq ($(SIMVER), x11) | |||
80 | 86 | ||
81 | $(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT) | 87 | $(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT) |
82 | @echo "LD $(notdir $@)" | 88 | @echo "LD $(notdir $@)" |
83 | $(SILENT)$(CC) $(CFLAGS) -shared $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@ | 89 | $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@ |
84 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 90 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) |
85 | # 'x' must be kept or you'll have "Win32 error 5" | 91 | # 'x' must be kept or you'll have "Win32 error 5" |
86 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 | 92 | # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 |
@@ -96,7 +102,7 @@ ifeq ($(SIMVER), sdl) | |||
96 | 102 | ||
97 | $(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT) | 103 | $(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT) |
98 | @echo "LD $(notdir $@) $^" | 104 | @echo "LD $(notdir $@) $^" |
99 | $(SILENT)$(CC) $(CFLAGS) -shared $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@ | 105 | $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@ |
100 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 106 | ifeq ($(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 |