diff options
author | Dave Chapman <dave@dchapman.com> | 2007-04-13 23:05:42 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2007-04-13 23:05:42 +0000 |
commit | 266707f81856e4a8310f6d8dacfc7b9a7033106c (patch) | |
tree | df9b0663fdb6e0b58dbd9c032119b5fdd16f8797 /apps/plugins | |
parent | bd6cb34f48cea2241078ad5421f069d1bec17cdb (diff) | |
download | rockbox-266707f81856e4a8310f6d8dacfc7b9a7033106c.tar.gz rockbox-266707f81856e4a8310f6d8dacfc7b9a7033106c.zip |
Build libmad separately for mpegplayer. This provides flexibility to adjust things like IRAM usage independently - use #ifdef MPEGPLAYER in libmad to make any mpegplayer specific changes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13147 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/mpegplayer/Makefile | 22 |
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 | ||
33 | all: $(OUTPUT) | 33 | all: $(OUTPUT) |
34 | 34 | ||
35 | .PHONY: libmad-mpegplayer | ||
36 | |||
37 | $(BUILDDIR)/libmad-mpegplayer.a: libmad-mpegplayer | ||
38 | |||
39 | libmad-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 | |||
35 | ifndef SIMVER | 43 | ifndef 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 $@ |
50 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 58 | ifeq ($(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 $@ |
65 | ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) | 73 | ifeq ($(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 | |||
76 | DLLTOOLFLAGS = --export-all | 84 | DLLTOOLFLAGS = --export-all |
77 | DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin | 85 | DLLWRAPFLAGS = -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 $@ |