forked from len0rd/rockbox
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
This commit is contained in:
parent
bd6cb34f48
commit
266707f818
2 changed files with 20 additions and 7 deletions
|
@ -24,6 +24,11 @@ else
|
||||||
MADOPTS += -O2
|
MADOPTS += -O2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# We build libmad separately for mpegplayer
|
||||||
|
ifdef MPEGPLAYER
|
||||||
|
EXTRA_DEFINES += -DMPEGPLAYER
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(MADOPTS) $(TARGET) \
|
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(MADOPTS) $(TARGET) \
|
||||||
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
|
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,17 @@ OUTPUT = $(OUTDIR)/mpegplayer.rock
|
||||||
|
|
||||||
all: $(OUTPUT)
|
all: $(OUTPUT)
|
||||||
|
|
||||||
|
.PHONY: libmad-mpegplayer
|
||||||
|
|
||||||
|
$(BUILDDIR)/libmad-mpegplayer.a: libmad-mpegplayer
|
||||||
|
|
||||||
|
libmad-mpegplayer:
|
||||||
|
$(SILENT)mkdir -p $(OBJDIR)/libmad-mpegplayer
|
||||||
|
$(call PRINTS,MAKE in libmad for mpegplayer)$(MAKE) -C $(APPSDIR)/codecs/libmad MPEGPLAYER=1 OBJDIR=$(OBJDIR)/libmad-mpegplayer OUTPUT=$(BUILDDIR)/libmad-mpegplayer.a
|
||||||
|
|
||||||
ifndef SIMVER
|
ifndef SIMVER
|
||||||
$(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE)
|
$(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE) $(BUILDDIR)/libmad-mpegplayer.a
|
||||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lmad -lgcc\
|
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lmad-mpegplayer -lgcc\
|
||||||
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/mpegplayer.map
|
-T$(LINKFILE) -Wl,-Map,$(OBJDIR)/mpegplayer.map
|
||||||
|
|
||||||
$(OUTPUT): $(OBJDIR)/mpegplayer.elf
|
$(OUTPUT): $(OBJDIR)/mpegplayer.elf
|
||||||
|
@ -45,8 +53,8 @@ ifeq ($(SIMVER), x11)
|
||||||
###################################################
|
###################################################
|
||||||
# This is the X11 simulator version
|
# This is the X11 simulator version
|
||||||
|
|
||||||
$(OUTPUT): $(OBJS)
|
$(OUTPUT): $(OBJS) $(BUILDDIR)/libmad-mpegplayer.a
|
||||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -lmad -o $@
|
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -lmad-mpegplayer -o $@
|
||||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||||
# 'x' must be kept or you'll have "Win32 error 5"
|
# 'x' must be kept or you'll have "Win32 error 5"
|
||||||
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
|
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
|
||||||
|
@ -60,8 +68,8 @@ ifeq ($(SIMVER), sdl)
|
||||||
###################################################
|
###################################################
|
||||||
# This is the SDL simulator version
|
# This is the SDL simulator version
|
||||||
|
|
||||||
$(OUTPUT): $(OBJS)
|
$(OUTPUT): $(OBJS) $(BUILDDIR)/libmad-mpegplayer.a
|
||||||
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -lmad -o $@
|
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -lmad-mpegplayer -o $@
|
||||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
||||||
# 'x' must be kept or you'll have "Win32 error 5"
|
# 'x' must be kept or you'll have "Win32 error 5"
|
||||||
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
|
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
|
||||||
|
@ -76,7 +84,7 @@ else # end of sdl-simulator
|
||||||
DLLTOOLFLAGS = --export-all
|
DLLTOOLFLAGS = --export-all
|
||||||
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
|
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
|
||||||
|
|
||||||
$(OUTPUT): $(OBJS)
|
$(OUTPUT): $(OBJS) $(BUILDDIR)/libmad-mpegplayer.a
|
||||||
$(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
|
$(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
|
||||||
$(SILENT)@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
|
$(SILENT)@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
|
||||||
$(BUILDDIR)/libplugin.a -o $@
|
$(BUILDDIR)/libplugin.a -o $@
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue