summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/mpegplayer/Makefile')
-rw-r--r--apps/plugins/mpegplayer/Makefile22
1 files changed, 15 insertions, 7 deletions
diff --git a/apps/plugins/mpegplayer/Makefile b/apps/plugins/mpegplayer/Makefile
index 28691f4b17..7f4e2e31aa 100644
--- a/apps/plugins/mpegplayer/Makefile
+++ b/apps/plugins/mpegplayer/Makefile
@@ -32,9 +32,17 @@ OUTPUT = $(OUTDIR)/mpegplayer.rock
32 32
33all: $(OUTPUT) 33all: $(OUTPUT)
34 34
35.PHONY: libmad-mpegplayer
36
37$(BUILDDIR)/libmad-mpegplayer.a: libmad-mpegplayer
38
39libmad-mpegplayer:
40 $(SILENT)mkdir -p $(OBJDIR)/libmad-mpegplayer
41 $(call PRINTS,MAKE in libmad for mpegplayer)$(MAKE) -C $(APPSDIR)/codecs/libmad MPEGPLAYER=1 OBJDIR=$(OBJDIR)/libmad-mpegplayer OUTPUT=$(BUILDDIR)/libmad-mpegplayer.a
42
35ifndef SIMVER 43ifndef SIMVER
36$(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE) 44$(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE) $(BUILDDIR)/libmad-mpegplayer.a
37 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lmad -lgcc\ 45 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lmad-mpegplayer -lgcc\
38 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/mpegplayer.map 46 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/mpegplayer.map
39 47
40$(OUTPUT): $(OBJDIR)/mpegplayer.elf 48$(OUTPUT): $(OBJDIR)/mpegplayer.elf
@@ -45,8 +53,8 @@ ifeq ($(SIMVER), x11)
45################################################### 53###################################################
46# This is the X11 simulator version 54# This is the X11 simulator version
47 55
48$(OUTPUT): $(OBJS) 56$(OUTPUT): $(OBJS) $(BUILDDIR)/libmad-mpegplayer.a
49 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -lmad -o $@ 57 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -lmad-mpegplayer -o $@
50ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 58ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
51# 'x' must be kept or you'll have "Win32 error 5" 59# 'x' must be kept or you'll have "Win32 error 5"
52# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 60# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -60,8 +68,8 @@ ifeq ($(SIMVER), sdl)
60################################################### 68###################################################
61# This is the SDL simulator version 69# This is the SDL simulator version
62 70
63$(OUTPUT): $(OBJS) 71$(OUTPUT): $(OBJS) $(BUILDDIR)/libmad-mpegplayer.a
64 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -lmad -o $@ 72 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -lmad-mpegplayer -o $@
65ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 73ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
66# 'x' must be kept or you'll have "Win32 error 5" 74# 'x' must be kept or you'll have "Win32 error 5"
67# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 75# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -76,7 +84,7 @@ else # end of sdl-simulator
76DLLTOOLFLAGS = --export-all 84DLLTOOLFLAGS = --export-all
77DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 85DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
78 86
79$(OUTPUT): $(OBJS) 87$(OUTPUT): $(OBJS) $(BUILDDIR)/libmad-mpegplayer.a
80 $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 88 $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
81 $(SILENT)@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ 89 $(SILENT)@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
82 $(BUILDDIR)/libplugin.a -o $@ 90 $(BUILDDIR)/libplugin.a -o $@