New makefile solution: A single invocation of 'make' to build the entire tree. Fully controlled dependencies give faster and more correct recompiles.

Many #include lines adjusted to conform to the new standards.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2008-11-20 11:27:31 +00:00
parent f66c303467
commit c6b3d38a15
221 changed files with 2081 additions and 3657 deletions

View file

@ -1,268 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. \
-I$(BUILDDIR) -I$(BUILDDIR)/bitmaps -I$(OBJDIR)
DEPFILE = $(OBJDIR)/dep-apps
LDS := $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/app.lds
ROMLDS := $(FIRMDIR)/rom.lds
ifdef SOFTWARECODECS
CODECS=build-codecs
# This sets up the parameters for building and linking libspeex for core voice
VOICE=libspeex-rockbox
LINKVOICE= -lspeex-rockbox
endif
# Set up the bitmap libraries
BITMAPLIBS =
LINKBITMAPS =
ifneq ($(strip $(BMP2RB_MONO)),)
BITMAPLIBS += bitmapsmono
LINKBITMAPS += -lbitmapsmono
endif
ifneq ($(strip $(BMP2RB_NATIVE)),)
BITMAPLIBS += bitmapsnative
LINKBITMAPS += -lbitmapsnative
endif
ifneq ($(strip $(BMP2RB_REMOTEMONO)),)
BITMAPLIBS += bitmapsremotemono
LINKBITMAPS += -lbitmapsremotemono
endif
ifneq ($(strip $(BMP2RB_REMOTENATIVE)),)
BITMAPLIBS += bitmapsremotenative
LINKBITMAPS += -lbitmapsremotenative
endif
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
DEFINES = $(DEBUG)
DIRS = .
ifdef APPEXTRA
DIRS += $(subst :, ,$(APPEXTRA))
INCLUDES += $(patsubst %,-I%,$(subst :, ,$(APPEXTRA)))
endif
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(BUILDDATE) $(DEFINES) \
-DTARGET_ID=$(TARGET_ID) \
-DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} \
-DTARGET_NAME=\"$(MODELNAME)\"
OBJS2 := $(OBJDIR)/lang.o $(patsubst %.c, $(OBJDIR)/%.o, $(SRC))
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
SOURCES = $(SRC)
LINKFILE = $(OBJDIR)/linkage.lds
LINKROM = $(OBJDIR)/linkrom.lds
MAXINFILE = $(OBJDIR)/romstart.temp
MAXOUTFILE = $(OBJDIR)/romstart
LIBROCKBOX = $(BUILDDIR)/librockbox.a
ifdef SIMVER
# this is a sim build
all: simbuild
else
# regular target build
ifdef DEBUG
REALBIN = $(OBJDIR)/rockbox.elf
else
# this is not needed to get built when doing debug builds
REALBIN = $(BUILDDIR)/$(BINARY)
endif
all: build
endif
build: $(DEPFILE) $(BITMAPLIBS) build-codecs build-pluginlib
ifdef ENABLEDPLUGINS
$(call PRINTS,MAKE in plugins)$(MAKE) -C plugins OBJDIR=$(OBJDIR)/plugins
endif
$(call PRINTS,MAKE in apps)$(MAKE) $(REALBIN) $(FLASHFILE) $(ARCHOSROM)
simbuild: $(DEPFILE) $(BITMAPLIBS) build-codecs build-pluginlib
ifdef ENABLEDPLUGINS
$(call PRINTS,MAKE in plugins)$(MAKE) -C plugins OBJDIR=$(OBJDIR)/plugins
endif
$(call PRINTS,MAKE in apps)$(MAKE) $(BUILDDIR)/$(BINARY)
build-codecs:
ifdef SOFTWARECODECS
$(SILENT)$(MAKE) -C codecs/lib OBJDIR=$(OBJDIR)/codecs/lib
$(SILENT)$(MAKE) -C codecs OBJDIR=$(OBJDIR)/codecs
endif
build-pluginlib:
ifdef ENABLEDPLUGINS
$(SILENT)$(MAKE) -C plugins/lib OBJDIR=$(OBJDIR)/plugins/lib
endif
bitmapsmono:
$(call PRINTS,MAKE in bitmaps/mono)$(MAKE) -C bitmaps/mono OBJDIR=$(OBJDIR)/bitmaps/mono
bitmapsnative:
$(call PRINTS,MAKE in bitmaps/native)$(MAKE) -C bitmaps/native OBJDIR=$(OBJDIR)/bitmaps/native
bitmapsremotemono:
$(call PRINTS,MAKE in bitmaps/remote_mono)$(MAKE) -C bitmaps/remote_mono OBJDIR=$(OBJDIR)/bitmaps/remote_mono
bitmapsremotenative:
$(call PRINTS,MAKE in bitmaps/remote_native)$(MAKE) -C bitmaps/remote_native OBJDIR=$(OBJDIR)/bitmaps/remote_native
rocks: build-codecs build-pluginlib
$(SILENT)$(MAKE) -C plugins OBJDIR=$(OBJDIR)/plugins
libspeex-rockbox:
$(SILENT)mkdir -p $(OBJDIR)/libspeex-rockbox
$(call PRINTS,MAKE in libspeex for rockbox core)$(MAKE) -C $(APPSDIR)/codecs/libspeex ROCKBOX_VOICE_CODEC=1 OBJDIR=$(OBJDIR)/libspeex-rockbox OUTPUT=$(BUILDDIR)/libspeex-rockbox.a
$(LINKFILE): $(LDS)
$(call PRINTS,Build $(@F))cat $< | $(CC) -DLOADADDRESS=$(LOADADDRESS) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
$(LINKROM): $(ROMLDS)
$(call PRINTS,Build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
$(MAXOUTFILE):
$(SILENT)echo '#include "config.h"' > $(MAXINFILE)
$(SILENT)echo "ROM_START" >> $(MAXINFILE)
$(SILENT)cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE)
$(SILENT)rm $(MAXINFILE)
$(OBJDIR)/rombox.elf : $(LINKROM) $(LIBROCKBOX) $(VOICE)
$(call PRINTS,MAKE objs)$(MAKE) objs
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lrockbox -lgcc $(LINKVOICE) $(LINKBITMAPS) -L$(BUILDDIR)/firmware -T$(LINKROM) -Wl,-Map,$(OBJDIR)/rombox.map
objs: $(OBJS)
ifndef SIMVER
$(OBJDIR)/rockbox.elf : $(LINKFILE) $(LIBROCKBOX) $(VOICE) $(BITMAPLIBS)
$(call PRINTS,MAKE objs)$(MAKE) objs
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR)/firmware -L$(BUILDDIR) -lrockbox $(LINKVOICE) $(LINKBITMAPS) -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockbox.map
$(OBJDIR)/rockbox.bin : $(OBJDIR)/rockbox.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@
$(OBJDIR)/rombox.bin : $(OBJDIR)/rombox.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
$(OBJDIR)/rockbox.asm: $(OBJDIR)/rockbox.bin
$(TOOLSDIR)/sh2d -sh1 $< > $@
#
# If there's a flashfile defined for this target (rockbox.ucl for Archos
# models) Then check if the mkfirmware script fails, as then it is (likely)
# because the image is too big and we need to create a compressed image
# instead.
#
$(BUILDDIR)/$(BINARY) : $(OBJDIR)/rockbox.bin $(FLASHFILE) $(BITMAPLIBS)
$(call PRINTS,Build firmware file)($(MKFIRMWARE) $< $@; \
stat=$$?; \
if test -n "$(FLASHFILE)"; then \
if test "$$stat" -ne 0; then \
echo "Image too big, making a compressed version!"; \
$(MAKE) -C $(FIRMDIR)/decompressor OBJDIR=$(BUILDDIR)/firmware/decompressor; \
$(MKFIRMWARE) $(BUILDDIR)/firmware/decompressor/compressed.bin $@; \
fi \
fi )
else
# this is a simulator build
ifeq ($(SIMVER), win32)
# OK, this is ugly but we need it on the link line to make it do right
EXTRAOBJ = $(BUILDDIR)/sim/uisw32-res.o
LDOPTS += -lwinmm
endif
# OS X's ld does not support -Map
ifeq ($(UNAME), Darwin)
SIMULATOR_MAP=
else
#SIMULATOR_MAP=-Wl,-Map,$(OBJDIR)/rockbox.map
endif
$(BUILDDIR)/$(BINARY) : $(BUILDDIR)/libsim.a \
$(BUILDDIR)/libcomsim.a $(LIBROCKBOX) $(VOICE) $(BITMAPLIBS)
$(call PRINTS,MAKE objs)$(MAKE) objs
$(call PRINTS,LD $(BINARY))$(CC) $(GCCOPTS) -o $@ $(OBJS) -L$(BUILDDIR) -lrockbox -lsim -lcomsim $(LINKVOICE) $(LINKBITMAPS) $(LDOPTS) $(EXTRAOBJ) $(SIMULATOR_MAP)
endif
$(BUILDDIR)/rockbox.ucl: $(OBJDIR)/rockbox.bin
$(call PRINTS,UCLPACK rockbox)$(TOOLSDIR)/uclpack --best --2e -b1048576 $< $@ >/dev/null 2>&1
$(BUILDDIR)/rombox.ucl: $(OBJDIR)/rombox.bin $(MAXOUTFILE)
$(call PRINTS,UCLPACK rombox)$(TOOLSDIR)/uclpack --none $< $@ >/dev/null 2>&1; \
perl $(TOOLSDIR)/romsizetest.pl `cat $(MAXOUTFILE)` $<; \
if test $$? -ne 0; then \
echo "removing UCL file again, making it a fake one"; \
echo "fake" > $@; \
fi
$(BUILDDIR)/rombox.iriver: $(OBJDIR)/rombox.bin
$(call PRINTS,Build ROM file)$(MKFIRMWARE) $< $@
# make.inc contains the $(DEPFILE) generation
include $(TOOLSDIR)/make.inc
# apps/features.txt is a file that (is preprocessed and) lists named features
# based on defines in the config-*.h files. The named features will be passed
# to genlang and thus (translated) phrases can be used based on those names.
# button.h is included for the HAS_BUTTON_HOLD define.
#
features: $(OBJDIR)/features
$(OBJDIR)/features: features.txt
$(SILENT)mkdir -p $(OBJDIR)
$(SILENT)cat $< | $(HOSTCC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" -imacros "button.h" - | \
grep -v "^\#" | grep -v "^$$" > $@; \
for f in `cat $(OBJDIR)/features`; do feat="$$feat:$$f" ; done ; \
echo "$$feat" >$(OBJDIR)/genlang-features
$(OBJDIR)/lang.o: lang/$(LANGUAGE).lang $(OBJDIR)/features
$(SILENT)for f in `cat $(OBJDIR)/features`; do feat="$$feat:$$f" ; done; \
perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(MODELNAME)$$feat $<
$(call PRINTS,CC lang.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@
clean:
$(call PRINTS,cleaning apps)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/rockbox.asm \
$(OBJDIR)/rockbox.bin $(OBJDIR)/rockbox.elf $(OBJDIR)/*.map \
$(OBJDIR)/lang.o $(OBJDIR)/build.lang $(BUILDDIR)/lang.[ch] \
$(LINKFILE) $(BUILDDIR)/rockbox.ucl $(LINKROM) \
$(BUILDDIR)/rombox.ucl $(OBJDIR)/rombox.bin $(OBJDIR)/rombox.elf \
$(MAXOUTFILE) $(DEPFILE)
$(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono
$(SILENT)$(MAKE) -C bitmaps/native clean OBJDIR=$(OBJDIR)/bitmaps/native
$(SILENT)$(MAKE) -C bitmaps/remote_mono clean OBJDIR=$(OBJDIR)/bitmaps/remote_mono
$(SILENT)$(MAKE) -C bitmaps/remote_native clean OBJDIR=$(OBJDIR)/bitmaps/remote_native
$(SILENT)$(MAKE) -C plugins clean OBJDIR=$(OBJDIR)/plugins
$(SILENT)$(MAKE) -C codecs clean OBJDIR=$(OBJDIR)/codecs
$(SILENT)rm -rf $(OBJDIR)/recorder $(OBJDIR)/player
$(SILENT)rm -rf $(BUILDDIR)/bitmaps
$(SILENT)rm -rf $(BUILDDIR)/pluginbitmaps
ifdef SIMVER
$(SILENT)$(MAKE) -C $(SIMDIR) clean
endif
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

25
apps/apps.make Normal file
View file

@ -0,0 +1,25 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
INCLUDES += -I$(APPSDIR) $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
SRC += $(call preprocess, $(APPSDIR)/SOURCES)
# apps/features.txt is a file that (is preprocessed and) lists named features
# based on defines in the config-*.h files. The named features will be passed
# to genlang and thus (translated) phrases can be used based on those names.
# button.h is included for the HAS_BUTTON_HOLD define.
#
features $(BUILDDIR)/apps/features $(BUILDDIR)/apps/genlang-features: $(APPSDIR)/features.txt
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,PP $(<F))
$(SILENT)$(CC) $(PPCFLAGS) \
-E -P -imacros "config.h" -imacros "button.h" -x c $< | \
grep -v "^\#" | grep -v "^$$" > $@; \
for f in `cat $@`; do feat="$$feat:$$f" ; done ; \
echo "$$feat" >$(BUILDDIR)/apps/genlang-features

51
apps/bitmaps/bitmaps.make Normal file
View file

@ -0,0 +1,51 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
BITMAPDIR = $(ROOTDIR)/apps/bitmaps
BMPINCDIR = $(BUILDDIR)/bitmaps
INCLUDES += -I$(BMPINCDIR)
ifneq ($(strip $(BMP2RB_MONO)),)
BMP = $(call preprocess, $(BITMAPDIR)/mono/SOURCES)
endif
ifneq ($(strip $(BMP2RB_NATIVE)),)
BMP += $(call preprocess, $(BITMAPDIR)/native/SOURCES)
endif
ifneq ($(strip $(BMP2RB_REMOTEMONO)),)
BMP += $(call preprocess, $(BITMAPDIR)/remote_mono/SOURCES)
endif
ifneq ($(strip $(BMP2RB_REMOTENATIVE)),)
BMP += $(call preprocess, $(BITMAPDIR)/remote_native/SOURCES)
endif
BMPOBJ = $(BMP:$(ROOTDIR)/%.bmp=$(BUILDDIR)/%.o)
BMPHFILES = $(BMPINCDIR)/usblogo.h $(BMPINCDIR)/remote_usblogo.h \
$(BMPINCDIR)/default_icons.h $(BMPINCDIR)/remote_default_icons.h \
$(BMPINCDIR)/rockboxlogo.h $(BMPINCDIR)/remote_rockboxlogo.h
$(BMPHFILES): $(BMPOBJ)
# pattern rules to create .c files from .bmp, one for each subdir:
$(BUILDDIR)/apps/bitmaps/mono/%.c: $(ROOTDIR)/apps/bitmaps/mono/%.bmp $(TOOLSDIR)/bmp2rb
$(SILENT)mkdir -p $(dir $@) $(BMPINCDIR)
$(call PRINTS,BMP2RB $(<F))$(BMP2RB_MONO) -h $(BMPINCDIR) $< > $@
$(BUILDDIR)/apps/bitmaps/native/%.c: $(ROOTDIR)/apps/bitmaps/native/%.bmp $(TOOLSDIR)/bmp2rb
$(SILENT)mkdir -p $(dir $@) $(BMPINCDIR)
$(call PRINTS,BMP2RB $(<F))$(BMP2RB_NATIVE) -h $(BMPINCDIR) $< > $@
$(BUILDDIR)/apps/bitmaps/remote_mono/%.c: $(ROOTDIR)/apps/bitmaps/remote_mono/%.bmp $(TOOLSDIR)/bmp2rb
$(SILENT)mkdir -p $(dir $@) $(BMPINCDIR)
$(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTEMONO) -h $(BMPINCDIR) $< > $@
$(BUILDDIR)/apps/bitmaps/remote_native/%.c: $(ROOTDIR)/apps/bitmaps/remote_native/%.bmp $(TOOLSDIR)/bmp2rb
$(SILENT)mkdir -p $(dir $@) $(BMPINCDIR)
$(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTENATIVE) -h $(BMPINCDIR) $< > $@

View file

@ -1,32 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
-I$(OBJDIR)
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c)
OBJS := $(CSRC:%.c=%.o)
DEPFILE = $(OBJDIR)/dep-bitmaps-mono
BMP2RB = $(BMP2RB_MONO)
OUTPUT = $(BUILDDIR)/libbitmapsmono.a
BMPINCDIR = $(BUILDDIR)/bitmaps
include $(TOOLSDIR)/makebmp.inc
clean:
$(call PRINTS,cleaning bitmaps/mono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
$(SILENT)rmdir $(OBJDIR)
-include $(DEPFILE)

View file

@ -1,32 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
-I$(OBJDIR)
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c)
OBJS := $(CSRC:%.c=%.o)
DEPFILE = $(OBJDIR)/dep-bitmaps-native
BMP2RB = $(BMP2RB_NATIVE)
OUTPUT = $(BUILDDIR)/libbitmapsnative.a
BMPINCDIR = $(BUILDDIR)/bitmaps
include $(TOOLSDIR)/makebmp.inc
clean:
$(call PRINTS,cleaning bitmaps/native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
$(SILENT)rmdir $(OBJDIR)
-include $(DEPFILE)

View file

@ -1,32 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
-I$(OBJDIR)
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c)
OBJS := $(CSRC:%.c=%.o)
DEPFILE = $(OBJDIR)/dep-bitmaps-remotemono
BMP2RB = $(BMP2RB_REMOTEMONO)
OUTPUT = $(BUILDDIR)/libbitmapsremotemono.a
BMPINCDIR = $(BUILDDIR)/bitmaps
include $(TOOLSDIR)/makebmp.inc
clean:
$(call PRINTS,cleaning bitmaps/remotemono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
$(SILENT)rmdir $(OBJDIR)
-include $(DEPFILE)

View file

@ -1,32 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
-I$(OBJDIR)
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c)
OBJS := $(CSRC:%.c=%.o)
DEPFILE = $(OBJDIR)/dep-bitmaps-remotenative
BMP2RB = $(BMP2RB_REMOTENATIVE)
OUTPUT = $(BUILDDIR)/libbitmapsremotenative.a
BMPINCDIR = $(BUILDDIR)/bitmaps
include $(TOOLSDIR)/makebmp.inc
clean:
$(call PRINTS,cleaning bitmaps/remote_native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
$(SILENT)rmdir $(OBJDIR)
-include $(DEPFILE)

View file

@ -1,256 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES = -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \
-I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib -I$(BUILDDIR)
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DCODEC
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
ifdef SOFTWARECODECS
CODECLIBS = -lspc -lmad -la52 -lffmpegFLAC -ltremor -lwavpack -lmusepack -lalac -lfaad -lm4a -lspeex -ldemac -lwma -lasap
OUTPUT = libspc libmad liba52 libffmpegFLAC libwma libtremor libwavpack libmusepack libalac libfaad libm4a libspeex libdemac libasap
endif
# we "borrow" the plugin LDS file
LDS := $(APPSDIR)/plugins/plugin.lds
LINKCODEC := $(OBJDIR)/codeclink.lds
DEPFILE = $(OBJDIR)/dep-codecs
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
ROCKS := $(SRC:%.c=$(OBJDIR)/%.codec)
SOURCES = $(SRC)
ELFS := $(SRC:%.c=$(OBJDIR)/%.elf)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
# as created by the cross-compiler for win32:
DEFS := $(SRC:%.c=$(OBJDIR)/%.def)
DIRS = .
CODECLIB := $(BUILDDIR)/libcodec.a
CODECDEPS = $(LINKCODEC) $(CODECLIB)
.PHONY: libspc libmad liba52 libffmpegFLAC libtremor libspeex libwavpack libmusepack libalac libfaad libm4a libdemac libwma libasap
all: $(LINKCODEC) $(ROCKS)
ifndef SIMVER
$(BUILDDIR)/%.a : % $(CODECDEPS)
# special dependencies
$(OBJDIR)/spc.elf : $(BUILDDIR)/libspc.a
$(OBJDIR)/mpa.elf : $(BUILDDIR)/libmad.a
$(OBJDIR)/a52.elf : $(BUILDDIR)/liba52.a
$(OBJDIR)/flac.elf : $(BUILDDIR)/libffmpegFLAC.a
$(OBJDIR)/vorbis.elf : $(BUILDDIR)/libtremor.a
$(OBJDIR)/speex.elf : $(BUILDDIR)/libspeex.a
$(OBJDIR)/mpc.elf : $(BUILDDIR)/libmusepack.a
$(OBJDIR)/wavpack.elf : $(BUILDDIR)/libwavpack.a
$(OBJDIR)/alac.elf : $(BUILDDIR)/libalac.a $(BUILDDIR)/libm4a.a
$(OBJDIR)/aac.elf : $(BUILDDIR)/libfaad.a $(BUILDDIR)/libm4a.a
$(OBJDIR)/shorten.elf : $(BUILDDIR)/libffmpegFLAC.a
$(OBJDIR)/ape.elf : $(BUILDDIR)/libdemac.a
$(OBJDIR)/wma.elf : $(BUILDDIR)/libwma.a
$(OBJDIR)/wavpack_enc.elf: $(BUILDDIR)/libwavpack.a
$(OBJDIR)/asap.elf : $(BUILDDIR)/libasap.a
# standard dependencies
$(OBJDIR)/%.elf: $(OBJDIR)/%.o $(OBJDIR)/codec_crt0.o $(CODECLIB)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $^ \
-L$(BUILDDIR) -lcodec -lgcc -T$(LINKCODEC) \
-Wl,--gc-sections,-Map,$(OBJDIR)/$*.map
$(OBJDIR)/%.codec : $(OBJDIR)/%.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
ifeq ($(SIMVER), x11)
###################################################
# This is the X11 simulator version
$(OBJDIR)/%.codec : $(OBJDIR)/%.o $(OBJDIR)/codec_crt0.o $(BUILDDIR)/libcodec.a $(OUTPUT)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< $(OBJDIR)/codec_crt0.o -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
$(SILENT)chmod -x $@
endif
else # end of x11-simulator
ifeq ($(SIMVER), sdl)
###################################################
# This is the SDL simulator version
$(OBJDIR)/%.codec : $(OBJDIR)/%.o $(OBJDIR)/codec_crt0.o $(BUILDDIR)/libcodec.a $(OUTPUT)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< $(OBJDIR)/codec_crt0.o -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
$(SILENT)chmod -x $@
endif
else # end of sdl-simulator
###################################################
# This is the win32 simulator version
DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OBJDIR)/%.codec : $(OBJDIR)/%.o $(OBJDIR)/codec_crt0.o $(BUILDDIR)/libcodec.a $(OUTPUT)
$(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $< $(OBJDIR)/codec_crt0.o
$(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(OBJDIR)/codec_crt0.o\
$(BUILDDIR)/libcodec.a $(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) \
-o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
$(SILENT)chmod -x $@
endif
endif # end of win32-simulator
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
$(BUILDDIR)/libcodec.a:
$(SILENT)mkdir -p $(OBJDIR)/lib
$(call PRINTS,MAKE in codecs/lib)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib
$(LINKCODEC): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) -DCODEC $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@
$(BUILDDIR)/libspc.a: libspc
libspc:
$(SILENT)mkdir -p $(OBJDIR)/libspc
$(call PRINTS,MAKE in libspc)$(MAKE) -C libspc OBJDIR=$(OBJDIR)/libspc OUTPUT=$(BUILDDIR)/libspc.a
$(BUILDDIR)/libmad.a: libmad
libmad:
$(SILENT)mkdir -p $(OBJDIR)/libmad
$(call PRINTS,MAKE in libmad)$(MAKE) -C libmad OBJDIR=$(OBJDIR)/libmad OUTPUT=$(BUILDDIR)/libmad.a
$(BUILDDIR)/liba52.a: liba52
liba52:
$(SILENT)mkdir -p $(OBJDIR)/liba52
$(call PRINTS,MAKE in liba52)$(MAKE) -C liba52 OBJDIR=$(OBJDIR)/liba52 OUTPUT=$(BUILDDIR)/liba52.a
$(BUILDDIR)/libwma.a: libwma
libwma:
$(SILENT)mkdir -p $(OBJDIR)/libwma
$(call PRINTS,MAKE in libwma)$(MAKE) -C libwma OBJDIR=$(OBJDIR)/libwma OUTPUT=$(BUILDDIR)/libwma.a
$(BUILDDIR)/libffmpegFLAC.a: libffmpegFLAC
libffmpegFLAC:
$(SILENT)mkdir -p $(OBJDIR)/libffmpegFLAC
$(call PRINTS,MAKE in libffmpegFLAC)$(MAKE) -C libffmpegFLAC OBJDIR=$(OBJDIR)/libffmpegFLAC OUTPUT=$(BUILDDIR)/libffmpegFLAC.a
$(BUILDDIR)/libtremor.a: libtremor
libtremor:
$(SILENT)mkdir -p $(OBJDIR)/libtremor
$(call PRINTS,MAKE in libtremor)$(MAKE) -C libtremor OBJDIR=$(OBJDIR)/libtremor OUTPUT=$(BUILDDIR)/libtremor.a
$(BUILDDIR)/libspeex.a: libspeex
libspeex:
$(SILENT)mkdir -p $(OBJDIR)/libspeex
$(call PRINTS,MAKE in libspeex)$(MAKE) -C libspeex OBJDIR=$(OBJDIR)/libspeex OUTPUT=$(BUILDDIR)/libspeex.a
$(BUILDDIR)/libwavpack.a: libwavpack
libwavpack:
$(SILENT)mkdir -p $(OBJDIR)/libwavpack
$(call PRINTS,MAKE in libwavpack)$(MAKE) -C libwavpack OBJDIR=$(OBJDIR)/libwavpack OUTPUT=$(BUILDDIR)/libwavpack.a
$(BUILDDIR)/libmusepack.a: libmusepack
libmusepack:
$(SILENT)mkdir -p $(OBJDIR)/libmusepack
$(call PRINTS,MAKE in libmusepack)$(MAKE) -C libmusepack OBJDIR=$(OBJDIR)/libmusepack OUTPUT=$(BUILDDIR)/libmusepack.a
$(BUILDDIR)/libalac.a: libalac
libalac:
$(SILENT)mkdir -p $(OBJDIR)/libalac
$(call PRINTS,MAKE in libalac)$(MAKE) -C libalac OBJDIR=$(OBJDIR)/libalac OUTPUT=$(BUILDDIR)/libalac.a
$(BUILDDIR)/libm4a.a: libm4a
libm4a:
$(SILENT)mkdir -p $(OBJDIR)/libm4a
$(call PRINTS,MAKE in libm4a)$(MAKE) -C libm4a OBJDIR=$(OBJDIR)/libm4a OUTPUT=$(BUILDDIR)/libm4a.a
$(BUILDDIR)/libfaad.a: libfaad
libfaad:
$(SILENT)mkdir -p $(OBJDIR)/libfaad
$(call PRINTS,MAKE in libfaad)$(MAKE) -C libfaad OBJDIR=$(OBJDIR)/libfaad OUTPUT=$(BUILDDIR)/libfaad.a
$(BUILDDIR)/libdemac.a: libdemac
libdemac:
$(SILENT)mkdir -p $(OBJDIR)/libdemac
$(call PRINTS,MAKE in libdemac)$(MAKE) -C demac/libdemac OBJDIR=$(OBJDIR)/libdemac OUTPUT=$(BUILDDIR)/libdemac.a
$(BUILDDIR)/libasap.a: libasap
libasap:
$(SILENT)mkdir -p $(OBJDIR)/libasap
$(call PRINTS,MAKE in libasap)$(MAKE) -C libasap OBJDIR=$(OBJDIR)/libasap OUTPUT=$(BUILDDIR)/libasap.a
clean:
$(call PRINTS,cleaning codecs)rm -fr \
$(OBJDIR)/libspc $(BUILDDIR)/libspc.a \
$(OBJDIR)/libmad $(BUILDDIR)/libmad.a \
$(OBJDIR)/liba52 $(BUILDDIR)/liba52.a \
$(OBJDIR)/libffmpegFLAC $(BUILDDIR)/libffmpegFLAC.a \
$(OBJDIR)/libtremor $(BUILDDIR)/libtremor.a \
$(OBJDIR)/libspeex $(BUILDDIR)/libSpeex.a \
$(OBJDIR)/libwavpack $(BUILDDIR)/libwavpack.a \
$(OBJDIR)/libmusepack $(BUILDDIR)/libmusepack.a \
$(OBJDIR)/libalac $(BUILDDIR)/libalac.a \
$(OBJDIR)/libfaad $(BUILDDIR)/libfaad.a \
$(OBJDIR)/libm4a $(BUILDDIR)/libm4a.a \
$(OBJDIR)/libdemac $(BUILDDIR)/libdemac.a \
$(OBJDIR)/libwma $(BUILDDIR)/libwma.a
$(OBJDIR)/libasap $(BUILDDIR)/libasap.a
$(SILENT)$(MAKE) -C libspc clean OBJDIR=$(OBJDIR)/libspc
$(SILENT)$(MAKE) -C libmad clean OBJDIR=$(OBJDIR)/libmad
$(SILENT)$(MAKE) -C liba52 clean OBJDIR=$(OBJDIR)/liba52
$(SILENT)$(MAKE) -C libffmpegFLAC clean OBJDIR=$(OBJDIR)/libffmpegFLAC
$(SILENT)$(MAKE) -C libtremor clean OBJDIR=$(OBJDIR)/libtremor
$(SILENT)$(MAKE) -C libspeex clean OBJDIR=$(OBJDIR)/libspeex
$(SILENT)$(MAKE) -C libwavpack clean OBJDIR=$(OBJDIR)/libwavpack
$(SILENT)$(MAKE) -C libmusepack clean OBJDIR=$(OBJDIR)/libmusepack
$(SILENT)$(MAKE) -C libalac clean OBJDIR=$(OBJDIR)/libalac
$(SILENT)$(MAKE) -C libfaad clean OBJDIR=$(OBJDIR)/libfaad
$(SILENT)$(MAKE) -C libm4a clean OBJDIR=$(OBJDIR)/libm4a
$(SILENT)$(MAKE) -C demac/libdemac clean OBJDIR=$(OBJDIR)/libdemac
$(SILENT)$(MAKE) -C libwma clean OBJDIR=$(OBJDIR)/libwma
$(SILENT)$(MAKE) -C libasap clean OBJDIR=$(OBJDIR)/libasap
$(SILENT)$(MAKE) -C lib clean OBJDIR=$(OBJDIR)/lib
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

View file

@ -20,7 +20,6 @@
****************************************************************************/
#include "codeclib.h"
#define ROCKBOX
#include <codecs/demac/libdemac/demac.h>
CODEC_HEADER

View file

@ -1,49 +0,0 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2005 Jens Arnold
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
/* Global declarations to be used in rockbox software codecs */
#include "config.h"
#include "system.h"
#include <sys/types.h>
extern struct codec_api *ci;
/* Get these functions 'out of the way' of the standard functions. Not doing
* so confuses the cygwin linker, and maybe others. These functions need to
* be implemented elsewhere */
#define malloc(x) codec_malloc(x)
#define calloc(x,y) codec_calloc(x,y)
#define realloc(x,y) codec_realloc(x,y)
#define free(x) codec_free(x)
#define alloca(x) __builtin_alloca(x)
void* codec_malloc(size_t size);
void* codec_calloc(size_t nmemb, size_t size);
void* codec_realloc(void* ptr, size_t size);
void codec_free(void* ptr);
#define abs(x) ((x)>0?(x):-(x))
#define labs(x) abs(x)
void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *));

103
apps/codecs/codecs.make Normal file
View file

@ -0,0 +1,103 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
CODECDIR = $(BUILDDIR)/apps/codecs
CODECS_SRC := $(call preprocess, $(APPSDIR)/codecs/SOURCES)
OTHER_SRC += $(CODECS_SRC)
CODECS := $(CODECS_SRC:.c=.codec)
CODECS := $(subst $(ROOTDIR),$(BUILDDIR),$(CODECS))
# the codec helper library
include $(APPSDIR)/codecs/lib/libcodec.make
# the codec libraries
include $(APPSDIR)/codecs/demac/libdemac.make
include $(APPSDIR)/codecs/liba52/liba52.make
include $(APPSDIR)/codecs/libalac/libalac.make
include $(APPSDIR)/codecs/libasap/libasap.make
include $(APPSDIR)/codecs/libfaad/libfaad.make
include $(APPSDIR)/codecs/libffmpegFLAC/libffmpegFLAC.make
include $(APPSDIR)/codecs/libm4a/libm4a.make
include $(APPSDIR)/codecs/libmad/libmad.make
include $(APPSDIR)/codecs/libmusepack/libmusepack.make
include $(APPSDIR)/codecs/libspc/libspc.make
include $(APPSDIR)/codecs/libspeex/libspeex.make
include $(APPSDIR)/codecs/libtremor/libtremor.make
include $(APPSDIR)/codecs/libwavpack/libwavpack.make
include $(APPSDIR)/codecs/libwma/libwma.make
# compile flags for codecs
CODECFLAGS = $(CFLAGS) -I$(APPSDIR)/codecs -I$(APPSDIR)/codecs/lib \
-DCODEC
CODEC_LDS := $(APPSDIR)/plugins/plugin.lds # codecs and plugins use same file
CODECLINK_LDS := $(CODECDIR)/codec.link
CODEC_CRT0 := $(CODECDIR)/codec_crt0.o
CODECLIBS := $(DEMACLIB) $(A52LIB) $(ALACLIB) $(ASAPLIB) \
$(FAADLIB) $(FFMPEGFLACLIB) $(M4ALIB) $(MADLIB) $(MUSEPACKLIB) \
$(SPCLIB) $(SPEEXLIB) $(TREMORLIB) $(WAVPACKLIB) $(WMALIB) \
$(CODECLIB)
$(CODECS): $(CODEC_CRT0) $(CODECLINK_LDS)
$(CODECLINK_LDS): $(CODEC_LDS)
$(call PRINTS,PP $(@F))
$(call preprocess2file, $<, $@)
# codec/library dependencies
$(CODECDIR)/spc.codec : $(CODECDIR)/libspc.a
$(CODECDIR)/mpa.codec : $(CODECDIR)/libmad.a
$(CODECDIR)/a52.codec : $(CODECDIR)/liba52.a
$(CODECDIR)/flac.codec : $(CODECDIR)/libffmpegFLAC.a
$(CODECDIR)/vorbis.codec : $(CODECDIR)/libtremor.a
$(CODECDIR)/speex.codec : $(CODECDIR)/libspeex.a
$(CODECDIR)/mpc.codec : $(CODECDIR)/libmusepack.a
$(CODECDIR)/wavpack.codec : $(CODECDIR)/libwavpack.a
$(CODECDIR)/alac.codec : $(CODECDIR)/libalac.a $(CODECDIR)/libm4a.a
$(CODECDIR)/aac.codec : $(CODECDIR)/libfaad.a $(CODECDIR)/libm4a.a
$(CODECDIR)/shorten.codec : $(CODECDIR)/libffmpegFLAC.a
$(CODECDIR)/ape.codec : $(CODECDIR)/libdemac.a
$(CODECDIR)/wma.codec : $(CODECDIR)/libwma.a
$(CODECDIR)/wavpack_enc.codec: $(CODECDIR)/libwavpack.a
$(CODECDIR)/asap.codec : $(CODECDIR)/libasap.a
$(CODECS): $(CODECLIB) # this must be last in codec dependency list
# libfaad and libmusepack both contain a huffman.h file, with different
# content. So we compile them with special command lines:
# pattern rule for compiling codecs
$(CODECDIR)/%.o: $(ROOTDIR)/apps/codecs/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \
-I$(dir $<) $(CODECFLAGS) -c $< -o $@
# pattern rule for compiling codecs
$(CODECDIR)/%.o: $(ROOTDIR)/apps/codecs/%.S
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \
-I$(dir $<) $(CODECFLAGS) -c $< -o $@
ifdef SIMVER
CODECLDFLAGS = $(SHARED_FLAG) # <-- from Makefile
else
CODECLDFLAGS = -T$(CODECLINK_LDS) -Wl,--gc-sections -Wl,-Map,$(CODECDIR)/$*.map
CODECFLAGS += -UDEBUG -DNDEBUG
endif
$(CODECDIR)/%.codec: $(CODECDIR)/%.o
$(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*.elf \
$(filter %.o, $^) \
$(filter %.a, $^) \
-lgcc $(CODECLDFLAGS)
$(call PRINTS,OC $(@F))$(OC) -O binary $(CODECDIR)/$*.elf $@

View file

@ -0,0 +1,24 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# libdemac
DEMACLIB := $(CODECDIR)/libdemac.a
DEMACLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/demac/libdemac/SOURCES)
DEMACLIB_OBJ := $(call c2obj, $(DEMACLIB_SRC))
OTHER_SRC += $(DEMACLIB_SRC)
$(DEMACLIB): $(DEMACLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
DEMACFLAGS = $(filter-out -O%,$(CODECFLAGS))
DEMACFLAGS += -O3
$(CODECDIR)/demac/%.o: $(ROOTDIR)/apps/codecs/demac/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(DEMACFLAGS) -c $< -o $@

View file

@ -33,7 +33,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
#include "config.h"
#ifndef __ASSEMBLER__
#include "../lib/codeclib.h"
#include "codeclib.h"
#include <codecs.h>
#endif

View file

@ -1,50 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
# ../.. for the codec.h in the apps dir
# .. for stuff in the codecs dir
# . for stuff in the codeclib dir
INCLUDES=-I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
CFLAGS = $(INCLUDES) $(GCCOPTS) \
$(TARGET) $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} -DCODEC
# Sectioned compilation for target
ifndef SIMVER
CFLAGS += -ffunction-sections -fdata-sections
endif
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-codeclib
DIRS = .
OUTPUT = $(BUILDDIR)/libcodec.a
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
$(call PRINTS,cleaning codecs/lib)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
-include $(DEPFILE)

View file

@ -27,8 +27,8 @@
#include "codeclib.h"
#include "metadata.h"
long mem_ptr;
long bufsize;
size_t mem_ptr;
size_t bufsize;
unsigned char* mp3buf; // The actual MP3 buffer from Rockbox
unsigned char* mallocbuf; // 512K from the start of MP3 buffer
unsigned char* filebuf; // The rest of the MP3 buffer

View file

@ -25,14 +25,23 @@
#include <sys/types.h>
extern struct codec_api *ci;
extern long mem_ptr;
extern long bufsize;
extern size_t mem_ptr;
extern size_t bufsize;
extern unsigned char* mp3buf; /* The actual MP3 buffer from Rockbox */
extern unsigned char* mallocbuf; /* The free space after the codec in the codec buffer */
extern unsigned char* filebuf; /* The rest of the MP3 buffer */
/* Standard library functions that are used by the codecs follow here */
/* Get these functions 'out of the way' of the standard functions. Not doing
* so confuses the cygwin linker, and maybe others. These functions need to
* be implemented elsewhere */
#define malloc(x) codec_malloc(x)
#define calloc(x,y) codec_calloc(x,y)
#define realloc(x,y) codec_realloc(x,y)
#define free(x) codec_free(x)
#define alloca(x) __builtin_alloca(x)
void* codec_malloc(size_t size);
void* codec_calloc(size_t nmemb, size_t size);
void* codec_realloc(void* ptr, size_t size);

View file

@ -0,0 +1,23 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
CODECLIB := $(CODECDIR)/libcodec.a
CODECLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/lib/SOURCES)
CODECLIB_OBJ := $(call c2obj, $(CODECLIB_SRC))
OTHER_SRC += $(CODECLIB_SRC)
$(CODECLIB): $(CODECLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
CODECLIBFLAGS = $(CODECFLAGS) -ffunction-sections
$(CODECDIR)/lib/%.o: $(ROOTDIR)/apps/codecs/lib/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \
-I$(dir $<) $(CODECLIBFLAGS) -c $< -o $@

View file

@ -1,43 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
A52OPTS = -O2
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(A52OPTS) $(TARGET) \
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-liba52
DIRS =
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
$(call PRINTS,cleaning liba52)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

View file

@ -1,4 +1,4 @@
#include "../codec.h"
#include "codeclib.h"
/* a52dec profiling */
/* #undef A52DEC_GPROF */

View file

@ -0,0 +1,17 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# liba52
A52LIB := $(CODECDIR)/liba52.a
A52LIB_SRC := $(call preprocess, $(APPSDIR)/codecs/liba52/SOURCES)
A52LIB_OBJ := $(call c2obj, $(A52LIB_SRC))
OTHER_SRC += $(A52LIB_SRC)
$(A52LIB): $(A52LIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1

View file

@ -1,43 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
ALACOPTS = -O3
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(ALACOPTS) $(TARGET) \
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-libalac
DIRS =
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
$(call PRINTS,cleaning libalac)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

View file

@ -35,7 +35,7 @@
#include <string.h>
#include <inttypes.h>
#include "../codec.h"
#include "codeclib.h"
#include "decomp.h"
int16_t predictor_coef_table[32] IBSS_ATTR;

View file

@ -0,0 +1,24 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# libalac
ALACLIB := $(CODECDIR)/libalac.a
ALACLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libalac/SOURCES)
ALACLIB_OBJ := $(call c2obj, $(ALACLIB_SRC))
OTHER_SRC += $(ALACLIB_SRC)
$(ALACLIB): $(ALACLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
ALACFLAGS = $(filter-out -O%,$(CODECFLAGS))
ALACFLAGS += -O3
$(CODECDIR)/libalac/%.o: $(ROOTDIR)/apps/codecs/libalac/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(ALACFLAGS) -c $< -o $@

View file

@ -1,44 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 13920 2007-07-16 21:16:52Z jethead71 $
#
INCLUDES=-I$(APPSDIR) -I.. -I../lib -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
SPCOPTS = -O -DROCKBOX
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(SPCOPTS) $(TARGET) \
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) -DCODEC=1
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-spc
DIRS =
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
$(call PRINTS,cleaning spc)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

View file

@ -0,0 +1,24 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# libasap
ASAPLIB := $(CODECDIR)/libasap.a
ASAPLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libasap/SOURCES)
ASAPLIB_OBJ := $(call c2obj, $(ASAPLIB_SRC))
OTHER_SRC += $(ASAPLIB_SRC)
$(ASAPLIB): $(ASAPLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
ASAPFLAGS = $(filter-out -O%,$(CODECFLAGS))
ASAPFLAGS += -O1
$(CODECDIR)/libasap/%.o: $(ROOTDIR)/apps/codecs/libasap/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(ASAPFLAGS) -c $< -o $@

View file

@ -1,43 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
FAADOPTS = -O2 -Wno-char-subscripts
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(FAADOPTS) $(TARGET) \
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-libfaad
DIRS =
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
$(call PRINTS,cleaning libfaad)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

View file

@ -33,8 +33,7 @@ extern "C" {
#endif
#include "faad_config.h"
#include "../codec.h"
#include "../lib/codeclib.h"
#include "codeclib.h"
extern struct codec_api* ci;

View file

@ -0,0 +1,18 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# libfaad
FAADLIB := $(CODECDIR)/libfaad.a
FAADLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libfaad/SOURCES)
FAADLIB_OBJ := $(call c2obj, $(FAADLIB_SRC))
OTHER_SRC += $(FAADLIB_SRC)
OTHER_INC += -I$(APPSDIR)/codecs/libfaad
$(FAADLIB): $(FAADLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1

View file

@ -1,43 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
FLACOPTS = -O2
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(FLACOPTS) $(TARGET) \
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-libffmpegFLAC
DIRS =
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
$(call PRINTS,cleaning libffmpegFLAC)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

View file

@ -34,7 +34,7 @@
#include <inttypes.h>
#include <stdbool.h>
#ifndef BUILD_STANDALONE
#include "../codec.h"
#include "codeclib.h"
#endif
#include "bitstream.h"

View file

@ -0,0 +1,17 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# libffmpegFLAC
FFMPEGFLACLIB := $(CODECDIR)/libffmpegFLAC.a
FFMPEGFLACLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libffmpegFLAC/SOURCES)
FFMPEGFLACLIB_OBJ := $(call c2obj, $(FFMPEGFLACLIB_SRC))
OTHER_SRC += $(FFMPEGFLACLIB_SRC)
$(FFMPEGFLACLIB): $(FFMPEGFLACLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1

View file

@ -1,7 +1,7 @@
#ifdef BUILD_STANDALONE
#define ICONST_ATTR
#else
#include "../codec.h"
#include "codeclib.h"
#endif
#include <inttypes.h>

View file

@ -1,43 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
M4AOPTS = -O3
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(M4AOPTS) $(TARGET) \
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-libm4a
DIRS =
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
$(call PRINTS,cleaning libm4a)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

View file

@ -33,11 +33,14 @@
#include <inttypes.h>
#include <stdlib.h>
#include "../codec.h"
#include "codeclib.h"
#include "m4a.h"
#if defined(DEBUG) || defined(SIMULATOR)
#ifdef DEBUGF
#undef DEBUGF
#endif
#define DEBUGF qtmovie->stream->ci->debugf
#else
#define DEBUGF(...)

View file

@ -0,0 +1,24 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# libm4a
M4ALIB := $(CODECDIR)/libm4a.a
M4ALIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libm4a/SOURCES)
M4ALIB_OBJ := $(call c2obj, $(M4ALIB_SRC))
OTHER_SRC += $(M4ALIB_SRC)
$(M4ALIB): $(M4ALIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
M4AFLAGS = $(filter-out -O%,$(CODECFLAGS))
M4AFLAGS += -O3
$(CODECDIR)/libm4a/%.o: $(ROOTDIR)/apps/codecs/libm4a/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(M4AFLAGS) -c $< -o $@

View file

@ -23,13 +23,6 @@
#include <inttypes.h>
#include "m4a.h"
#if defined(DEBUG) || defined(SIMULATOR)
extern struct codec_api* rb;
#define DEBUGF rb->debugf
#else
#define DEBUGF(...)
#endif
/* Implementation of the stream.h functions used by libalac */
#define _Swap32(v) do { \

View file

@ -1,50 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
# NOTE: FPM_ define has been moved to global.h
MADOPTS = -UDEBUG -DNDEBUG -O2
# We build libmad separately for mpegplayer
ifdef MPEGPLAYER
EXTRA_DEFINES += -DMPEGPLAYER
endif
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(MADOPTS) $(TARGET) \
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-libmad
DIRS =
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
$(call PRINTS,cleaning libmad)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

View file

@ -31,7 +31,7 @@
# include "timer.h"
# include "layer12.h"
# include "layer3.h"
# include "../lib/codeclib.h"
# include "codeclib.h"
static
unsigned long const bitrate_table[5][15] = {

View file

@ -19,7 +19,7 @@
* $Id$
*/
#include "../codec.h"
#include "codeclib.h"
# ifndef LIBMAD_GLOBAL_H
# define LIBMAD_GLOBAL_H

View file

@ -0,0 +1,54 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# we need to build two different mad libraries
# (one for codec, one for mpegplayer)
# so a little trickery is necessary
MADFLAGS = $(CODECFLAGS) -UDEBUG -DNDEBUG -I$(APPSDIR)/codecs/libmad
MPEGMADFLAGS = $(MADFLAGS) -DMPEGPLAYER
# libmad
MADLIB := $(CODECDIR)/libmad.a
MADLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libmad/SOURCES)
MADLIB_OBJ := $(call c2obj, $(MADLIB_SRC))
OTHER_SRC += $(MADLIB_SRC)
$(MADLIB): $(MADLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
# libmad-mpeg
MPEGMADLIB := $(CODECDIR)/libmad-mpeg.a
MPEGMADLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libmad/SOURCES)
MPEGMADLIB_OBJ := $(subst .c,.o,$(subst .S,.o,$(subst $(ROOTDIR)/apps/codecs/libmad,$(BUILDDIR)/apps/codecs/libmad-mpeg,$(MPEGMADLIB_SRC))))
$(MPEGMADLIB): $(MPEGMADLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
# pattern rules
$(CODECDIR)/libmad-mpeg/%.o : $(ROOTDIR)/apps/codecs/libmad/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \
$(CC) $(MPEGMADFLAGS) -c $< -o $@
$(CODECDIR)/libmad-mpeg/%.o : $(ROOTDIR)/apps/codecs/libmad/%.S
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \
$(CC) $(MPEGMADFLAGS) -c $< -o $@
$(CODECDIR)/libmad/%.o: $(ROOTDIR)/apps/codecs/libmad/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \
$(CC) $(MADFLAGS) -c $< -o $@
$(CODECDIR)/libmad/%.o: $(ROOTDIR)/apps/codecs/libmad/%.S
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \
$(CC) $(MADFLAGS) -c $< -o $@

View file

@ -1,49 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
# libmusepack is faster on ARM-targets with -O1 instead of -O2
ifeq ($(CPU),arm)
MUSEPACKOPTS += -O1
else
MUSEPACKOPTS += -O2
endif
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(MUSEPACKOPTS) $(TARGET) \
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-libmusepack
DIRS =
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
$(call PRINTS,cleaning libmusepack)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

View file

@ -35,9 +35,9 @@
/// \file huffsv46.c
/// Implementations of huffman decoding for streamversions < 7.
#include <musepack.h>
#include <requant.h>
#include <huffman.h>
#include "musepack.h"
#include "requant.h"
#include "huffman.h"
#ifdef MPC_SUPPORT_SV456

View file

@ -35,9 +35,9 @@
/// \file huffsv7.c
/// Implementations of sv7 huffman decoding functions.
#include <musepack.h>
#include <huffman.h>
#include <requant.h>
#include "musepack.h"
#include "huffman.h"
#include "requant.h"
const HuffmanTyp mpc_table_HuffHdr [10] ICONST_ATTR =
{{2147483648u,1,0},{1610612736u,3,1},{1577058304u,7,-4},{1568669696u,9,3},{1560281088u,9,4},{1543503872u,8,-5},{1476395008u,6,2},{1342177280u,5,-3},{1073741824u,4,-2},{0u,2,-1},};

View file

@ -0,0 +1,29 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# libmusepack
MUSEPACKLIB := $(CODECDIR)/libmusepack.a
MUSEPACKLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libmusepack/SOURCES)
MUSEPACKLIB_OBJ := $(call c2obj, $(MUSEPACKLIB_SRC))
OTHER_SRC += $(MUSEPACKLIB_SRC)
$(MUSEPACKLIB): $(MUSEPACKLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
# libmusepack is faster on ARM-targets with -O1 than -O2
MUSEPACKFLAGS = $(filter-out -O%,$(CODECFLAGS)) -I$(APPSDIR)/codecs/libmusepack
ifeq ($(CPU),arm)
MUSEPACKFLAGS += -O1
else
MUSEPACKFLAGS += -O2
endif
$(CODECDIR)/libmusepack/%.o: $(ROOTDIR)/apps/codecs/libmusepack/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(MUSEPACKFLAGS) -c $< -o $@

View file

@ -45,7 +45,9 @@ extern "C" {
//#include <stdlib.h>
#include <string.h>
#include "../codec.h"
#ifndef SIMULATOR
#include "codecs.h"
#endif
#include "config_types.h"
#include "decoder.h"
#include "math.h"

View file

@ -1,44 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
SPCOPTS = -O -DROCKBOX
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(SPCOPTS) $(TARGET) \
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) -DCODEC=1
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-spc
DIRS =
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
$(call PRINTS,cleaning spc)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

View file

@ -0,0 +1,24 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# libspc
SPCLIB := $(CODECDIR)/libspc.a
SPCLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libspc/SOURCES)
SPCLIB_OBJ := $(call c2obj, $(SPCLIB_SRC))
OTHER_SRC += $(SPCLIB_SRC)
$(SPCLIB): $(SPCLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
SPCFLAGS = $(filter-out -O%,$(CODECFLAGS))
SPCFLAGS += -O1
$(CODECDIR)/libspc/%.o: $(ROOTDIR)/apps/codecs/libspc/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPCFLAGS) -c $< -o $@

View file

@ -30,7 +30,9 @@
#define _SPC_CODEC_H_
/* rather than comment out asserts, just define NDEBUG */
#ifndef NDEBUG
#define NDEBUG
#endif
#include <assert.h>
/** Basic configuration options **/

View file

@ -22,8 +22,7 @@
****************************************************************************/
/* The CPU portion (shock!) */
#include "codec.h"
#include "codecs.h"
#include "codeclib.h"
#include "spc_codec.h"
#include "spc_profiler.h"

View file

@ -23,8 +23,7 @@
****************************************************************************/
/* The DSP portion (awe!) */
#include "codec.h"
#include "codecs.h"
#include "codeclib.h"
#include "spc_codec.h"
#include "spc_profiler.h"

View file

@ -20,8 +20,7 @@
* KIND, either express or implied.
*
****************************************************************************/
#include "codec.h"
#include "codecs.h"
#include "codeclib.h"
#include "spc_codec.h"
#include "spc_profiler.h"

View file

@ -25,7 +25,7 @@
#if defined(SPC_PROFILE) && defined(USEC_TIMER)
#include "codec.h"
#include "codeclib.h"
#include "spc_codec.h"
#define SPC_DEFINE_PROFILER_TIMERS
#include "spc_profiler.h"

View file

@ -1,57 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile,v 1.16 2006-09-02 22:34:13 bagder Exp $
#
INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
SPEEXOPTS = -DHAVE_CONFIG_H -DSPEEX_DISABLE_ENCODER -DROCKBOX
# We're faster on ARM-targets with -O1 instead of -O2
ifeq ($(CPU),arm)
SPEEXOPTS += -O
else
SPEEXOPTS += -O2
endif
# We build Speex separately for use as a voice codec
ifdef ROCKBOX_VOICE_CODEC
EXTRA_DEFINES += -DROCKBOX_VOICE_CODEC
endif
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(SPEEXOPTS) $(TARGET) \
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} ${PROFILE_OPTS} -Wno-unused-parameter
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-Speex
DIRS =
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
@echo "AR+RANLIB $(notdir $@)"
@$(AR) ruv $@ $+ >/dev/null 2>&1
include $(TOOLSDIR)/make.inc
clean:
@echo "cleaning Speex"
@rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

View file

@ -36,7 +36,7 @@
#include "config-speex.h"
#endif
#include <speex/speex_bits.h>
#include "speex/speex_bits.h"
#include "arch.h"
#include "os_support.h"

View file

@ -522,6 +522,9 @@ char *stack,
spx_int32_t *seed
)
{
(void)nsf;
(void)stack;
(void)seed;
int i,j;
VARDECL(int *ind);
VARDECL(int *signs);
@ -609,6 +612,9 @@ char *stack,
spx_int32_t *seed
)
{
(void)par;
(void)bits;
(void)stack;
int i;
/* FIXME: This is bad, but I don't think the function ever gets called anyway */
for (i=0;i<nsf;i++)

View file

@ -35,7 +35,7 @@
#ifndef CB_SEARCH_H
#define CB_SEARCH_H
#include <speex/speex_bits.h>
#include "speex/speex_bits.h"
#include "arch.h"
/** Split codebook parameters. */

View file

@ -1,5 +1,5 @@
#ifndef ROCKBOX_VOICE_ENCODER
#include "../codec.h"
#include "codeclib.h"
#include "autoconf.h"
#else
#define ICODE_ATTR

View file

@ -353,6 +353,7 @@ void filter_mem16(const spx_word16_t *x, const spx_coef_t *num, const spx_coef_t
#ifndef OVERRIDE_IIR_MEM16
void iir_mem16(const spx_word16_t *x, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
{
(void)stack;
int i,j;
spx_word16_t yi,nyi;
@ -497,6 +498,7 @@ void qmf_synth(const spx_word16_t *x1, const spx_word16_t *x2, const spx_word16_
all odd x[i] are zero -- well, actually they are left out of the array now
N and M are multiples of 4 */
{
(void)stack;
int i, j;
int M2, N2;
VARDECL(spx_word16_t *xx1);
@ -681,6 +683,9 @@ spx_word16_t comb_gain, /*gain of comb filter*/
char *stack
)
{
(void)ak;
(void)p;
(void)stack;
int i;
VARDECL(spx_word16_t *iexc);
spx_word16_t old_ener, new_ener;

View file

@ -55,9 +55,9 @@ TODO:
#include "arch.h"
#include <speex/speex.h>
#include <speex/speex_bits.h>
#include <speex/speex_jitter.h>
#include "speex/speex.h"
#include "speex/speex_bits.h"
#include "speex/speex_jitter.h"
#include "os_support.h"
#ifndef NULL

View file

@ -0,0 +1,60 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# we need to build two different speex libraries
# (one for codec, one for core voice)
# so a little trickery is necessary
SPEEXFLAGS = $(filter-out -O%,$(CODECFLAGS)) \
-DHAVE_CONFIG_H -DSPEEX_DISABLE_ENCODER \
-I$(APPSDIR)/codecs/libspeex
# libspeex is faster on ARM-targets with -O1 instead of -O2
ifeq ($(CPU),arm)
SPEEXFLAGS += -O1
else
SPEEXFLAGS += -O2
endif
VOICESPEEXFLAGS = $(filter-out -ffunction-sections, $(filter-out -DCODEC,$(SPEEXFLAGS))) -DROCKBOX_VOICE_CODEC
# libspeex
SPEEXLIB := $(CODECDIR)/libspeex.a
SPEEXLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libspeex/SOURCES)
SPEEXLIB_OBJ := $(call c2obj, $(SPEEXLIB_SRC))
OTHER_SRC += $(SPEEXLIB_SRC)
$(SPEEXLIB): $(SPEEXLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
# libspeex-voice
VOICESPEEXLIB := $(CODECDIR)/libspeex-voice.a
VOICESPEEXLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libspeex/SOURCES)
VOICESPEEXLIB_OBJ := $(subst .c,.o,$(subst .S,.o,$(subst $(ROOTDIR)/apps/codecs/libspeex,$(BUILDDIR)/apps/codecs/libspeex-voice,$(VOICESPEEXLIB_SRC))))
$(VOICESPEEXLIB): $(VOICESPEEXLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
# pattern rules
$(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(VOICESPEEXFLAGS) -c $< -o $@
$(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.S
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(VOICESPEEXFLAGS) -c $< -o $@
$(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPEEXFLAGS) -c $< -o $@
$(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.S
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPEEXFLAGS) -c $< -o $@

View file

@ -409,6 +409,7 @@ void lsp_to_lpc(spx_lsp_t *freq,spx_coef_t *ak,int lpcrdr, char *stack)
/* float *ak array of LPC coefficients */
/* int lpcrdr order of LPC coefficients */
{
(void)stack;
int i,j;
spx_word32_t xout1,xout2,xin;
spx_word32_t mult, a;

View file

@ -38,7 +38,7 @@
#include "ltp.h"
#include "stack_alloc.h"
#include "filters.h"
#include <speex/speex_bits.h>
#include "speex/speex_bits.h"
#include "math_approx.h"
#include "os_support.h"
@ -674,6 +674,9 @@ spx_word16_t last_pitch_gain,
int cdbk_offset
)
{
(void)end;
(void)pitch_coef;
(void)stack;
int i;
int pitch;
int gain_index;
@ -826,6 +829,14 @@ spx_word16_t last_pitch_gain,
int cdbk_offset
)
{
(void)end;
(void)par;
(void)bits;
(void)stack;
(void)count_lost;
(void)subframe_offset;
(void)last_pitch_gain;
(void)cdbk_offset;
int i;
#ifdef FIXED_POINT
if (pitch_coef>63)

View file

@ -32,7 +32,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <speex/speex_bits.h>
#include "speex/speex_bits.h"
#include "arch.h"
/** LTP parameters. */

View file

@ -87,6 +87,7 @@ spx_word32_t inner_prod(const spx_word16_t *x, const spx_word16_t *y, int len)
#define OVERRIDE_PITCH_XCORR
void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int nb_pitch, char *stack)
{
(void)stack;
int i,j;
for (i=0;i<nb_pitch;i+=4)
{

View file

@ -36,8 +36,8 @@
#ifndef MODES_H
#define MODES_H
#include <speex/speex.h>
#include <speex/speex_bits.h>
#include "speex/speex.h"
#include "speex/speex_bits.h"
#include "arch.h"
#define NB_SUBMODES 16

View file

@ -43,12 +43,12 @@
#include "filters.h"
#include "stack_alloc.h"
#include "vq.h"
#include <speex/speex_bits.h>
#include "speex/speex_bits.h"
#include "vbr.h"
#include "arch.h"
#include "math_approx.h"
#include "os_support.h"
#include <speex/speex_callbacks.h>
#include "speex/speex_callbacks.h"
#ifdef VORBIS_PSYCHO
#include "vorbis_psy.h"

View file

@ -37,8 +37,8 @@
#define NB_CELP_H
#include "modes.h"
#include <speex/speex_bits.h>
#include <speex/speex_callbacks.h>
#include "speex/speex_bits.h"
#include "speex/speex_callbacks.h"
#include "vbr.h"
#include "filters.h"

View file

@ -35,7 +35,7 @@
#ifndef QUANT_LSP_H
#define QUANT_LSP_H
#include <speex/speex_bits.h>
#include "speex/speex_bits.h"
#include "arch.h"
#define MAX_LSP_SIZE 20

View file

@ -24,8 +24,7 @@
/* We don't want all this stuff if we're building encoder */
#ifndef ROCKBOX_VOICE_ENCODER
#include "../codec.h"
#include "../lib/codeclib.h"
#include "codeclib.h"
#include "debug.h"
#if !defined(ROCKBOX_VOICE_CODEC)
@ -35,6 +34,7 @@
#define DEBUGF ci->debugf
#endif
#ifdef ROCKBOX_HAS_LOGF
#undef LOGF
#define LOGF ci->logf
@ -75,6 +75,9 @@ static inline void speex_free_scratch (void *ptr)
#define OVERRIDE_SPEEX_FATAL 1
static inline void _speex_fatal(const char *str, const char *file, int line)
{
(void)str;
(void)file;
(void)line;
DEBUGF("Fatal error: %s\n", str);
//exit(1);
}
@ -82,24 +85,30 @@ static inline void _speex_fatal(const char *str, const char *file, int line)
#define OVERRIDE_SPEEX_WARNING 1
static inline void speex_warning(const char *str)
{
(void)str;
DEBUGF("warning: %s\n", str);
}
#define OVERRIDE_SPEEX_WARNING_INT 1
static inline void speex_warning_int(const char *str, int val)
{
(void)str;
(void)val;
DEBUGF("warning: %s %d\n", str, val);
}
#define OVERRIDE_SPEEX_NOTIFY 1
static inline void speex_notify(const char *str)
{
(void)str;
DEBUGF("notice: %s\n", str);
}
#define OVERRIDE_SPEEX_PUTC 1
static inline void _speex_putc(int ch, void *file)
{
(void)ch;
(void)file;
//FILE *f = (FILE *)file;
//printf("%c", ch);
}

View file

@ -37,7 +37,7 @@
#define SB_CELP_H
#include "modes.h"
#include <speex/speex_bits.h>
#include "speex/speex_bits.h"
#include "nb_celp.h"
/**Structure representing the full state of the sub-band encoder*/

View file

@ -21,7 +21,7 @@
extern "C" {
#endif
#include "../../codec.h"
#include "codeclib.h"
typedef short spx_ogg_int16_t;
typedef unsigned short spx_ogg_uint16_t;

View file

@ -36,7 +36,7 @@
#include "config-speex.h"
#endif
#include <speex/speex_callbacks.h>
#include "speex/speex_callbacks.h"
#include "arch.h"
#include "os_support.h"
@ -74,6 +74,7 @@ int speex_inband_handler(SpeexBits *bits, SpeexCallback *callback_list, void *st
int speex_std_mode_request_handler(SpeexBits *bits, void *state, void *data)
{
(void)state;
spx_int32_t m;
m = speex_bits_unpack_unsigned(bits, 4);
speex_encoder_ctl(data, SPEEX_SET_MODE, &m);
@ -82,6 +83,7 @@ int speex_std_mode_request_handler(SpeexBits *bits, void *state, void *data)
int speex_std_low_mode_request_handler(SpeexBits *bits, void *state, void *data)
{
(void)state;
spx_int32_t m;
m = speex_bits_unpack_unsigned(bits, 4);
speex_encoder_ctl(data, SPEEX_SET_LOW_MODE, &m);
@ -90,6 +92,7 @@ int speex_std_low_mode_request_handler(SpeexBits *bits, void *state, void *data)
int speex_std_high_mode_request_handler(SpeexBits *bits, void *state, void *data)
{
(void)state;
spx_int32_t m;
m = speex_bits_unpack_unsigned(bits, 4);
speex_encoder_ctl(data, SPEEX_SET_HIGH_MODE, &m);
@ -99,6 +102,7 @@ int speex_std_high_mode_request_handler(SpeexBits *bits, void *state, void *data
#ifndef DISABLE_VBR
int speex_std_vbr_request_handler(SpeexBits *bits, void *state, void *data)
{
(void)state;
spx_int32_t vbr;
vbr = speex_bits_unpack_unsigned(bits, 1);
speex_encoder_ctl(data, SPEEX_SET_VBR, &vbr);
@ -108,6 +112,7 @@ int speex_std_vbr_request_handler(SpeexBits *bits, void *state, void *data)
int speex_std_enh_request_handler(SpeexBits *bits, void *state, void *data)
{
(void)state;
spx_int32_t enh;
enh = speex_bits_unpack_unsigned(bits, 1);
speex_decoder_ctl(data, SPEEX_SET_ENH, &enh);
@ -117,6 +122,7 @@ int speex_std_enh_request_handler(SpeexBits *bits, void *state, void *data)
#ifndef DISABLE_VBR
int speex_std_vbr_quality_request_handler(SpeexBits *bits, void *state, void *data)
{
(void)state;
float qual;
qual = speex_bits_unpack_unsigned(bits, 4);
speex_encoder_ctl(data, SPEEX_SET_VBR_QUALITY, &qual);
@ -126,6 +132,7 @@ int speex_std_vbr_quality_request_handler(SpeexBits *bits, void *state, void *da
int speex_std_char_handler(SpeexBits *bits, void *state, void *data)
{
(void)state;
unsigned char ch;
ch = speex_bits_unpack_unsigned(bits, 8);
_speex_putc(ch, data);
@ -133,11 +140,11 @@ int speex_std_char_handler(SpeexBits *bits, void *state, void *data)
return 0;
}
/* Default handler for user callbacks: skip it */
int speex_default_user_handler(SpeexBits *bits, void *state, void *data)
{
(void)state;
(void)data;
int req_size = speex_bits_unpack_unsigned(bits, 4);
speex_bits_advance(bits, 5+8*req_size);
return 0;

View file

@ -36,8 +36,8 @@
#endif
#include "arch.h"
#include <speex/speex_header.h>
#include <speex/speex.h>
#include "speex/speex_header.h"
#include "speex/speex.h"
#include "os_support.h"
#ifndef NULL

View file

@ -33,8 +33,8 @@
#include "config-speex.h"
#endif
#include <speex/speex_stereo.h>
#include <speex/speex_callbacks.h>
#include "speex/speex_stereo.h"
#include "speex/speex_callbacks.h"
#include "math_approx.h"
#include "vq.h"
#include <math.h>
@ -278,6 +278,7 @@ void speex_decode_stereo_int(spx_int16_t *data, int frame_size, SpeexStereoState
int speex_std_stereo_request_handler(SpeexBits *bits, void *state, void *data)
{
(void)state;
RealSpeexStereoState *stereo;
spx_word16_t sign=1, dexp;
int tmp;

View file

@ -1,49 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
# Tremor is slightly faster on coldfire with -O3
ifeq ($(CPU),coldfire)
TREMOROPTS = -O3
else
TREMOROPTS = -O2
endif
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(TREMOROPTS) $(TARGET) \
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} ${PROFILE_OPTS}
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-libtremor
DIRS =
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
$(call PRINTS,cleaning libtremor)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

View file

@ -1,4 +1,4 @@
#include "../codec.h"
#include "codeclib.h"
#ifdef CPU_ARM
#define _ARM_ASSEM_
#endif

View file

@ -1 +1 @@
#include "../../../firmware/common/ctype.c"
#include "common/ctype.c"

View file

@ -0,0 +1,36 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# libtremor
TREMORLIB := $(CODECDIR)/libtremor.a
TREMORLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libtremor/SOURCES)
TREMORLIB_OBJ := $(call c2obj, $(TREMORLIB_SRC))
OTHER_SRC += $(TREMORLIB_SRC)
$(TREMORLIB): $(TREMORLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
$(CODECDIR)/libtremor/%.o: $(ROOTDIR)/apps/codecs/libtremor/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \
-I$(APPSDIR)/codecs/libtremor \
$(CODECFLAGS) $(CFLAGS) -c $< -o $@
TREMORFLAGS = -I$(APPSDIR)/codecs/libtremor $(filter-out -O%,$(CODECFLAGS))
# Tremor is slightly faster on coldfire with -O3
ifeq ($(CPU),coldfire)
TREMORFLAGS += -O3
else
TREMORFLAGS += -O2
endif
$(CODECDIR)/libtremor/%.o: $(ROOTDIR)/apps/codecs/libtremor/%.c
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(TREMORFLAGS) -c $< -o $@

View file

@ -21,7 +21,7 @@
#include <math.h>
#include "ogg.h"
#include "ivorbiscodec.h"
#include <codecs/lib/codeclib.h>
#include "codeclib.h"
#include "codec_internal.h"
#include "codebook.h"
#include "window.h"

View file

@ -1,7 +1,6 @@
#include <os_types.h>
#include "os_types.h"
static unsigned char *mallocbuf;
static size_t bufsize, tmp_ptr, mem_ptr;
static size_t tmp_ptr;
void ogg_malloc_init(void)
{

View file

@ -1,43 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
WAVPACKOPTS = -O2
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(WAVPACKOPTS) $(TARGET) \
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-libwavpack
DIRS =
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
$(call PRINTS,cleaning libwavpack)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

View file

@ -0,0 +1,17 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# libwavpack
WAVPACKLIB := $(CODECDIR)/libwavpack.a
WAVPACKLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libwavpack/SOURCES)
WAVPACKLIB_OBJ := $(call c2obj, $(WAVPACKLIB_SRC))
OTHER_SRC += $(WAVPACKLIB_SRC)
$(WAVPACKLIB): $(WAVPACKLIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1

View file

@ -7,9 +7,9 @@
////////////////////////////////////////////////////////////////////////////
// wavpack.h
#include "../codec.h"
#ifdef CODEC
#include "codeclib.h"
#endif
#include <inttypes.h>
// This header file contains all the definitions required by WavPack.

View file

@ -1,43 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
WMAOPTS = -O2 -DROCKBOX
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(WMAOPTS) $(TARGET) \
$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) -DCODEC=1
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-libwma
DIRS =
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
$(call PRINTS,cleaning libwma)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)
endif

View file

@ -0,0 +1,17 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
# libwma
WMALIB := $(CODECDIR)/libwma.a
WMALIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libwma/SOURCES)
WMALIB_OBJ := $(call c2obj, $(WMALIB_SRC))
OTHER_SRC += $(WMALIB_SRC)
$(WMALIB): $(WMALIB_OBJ)
$(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1

View file

@ -464,7 +464,7 @@ enum codec_status codec_main(void)
int wmares, res;
uint8_t* audiobuf;
int audiobufsize;
int packetlength;
int packetlength = 0;
int errcount = 0;
/* Generic codec initialisation */

View file

@ -114,7 +114,7 @@
#include "usb_core.h"
#endif
#ifdef USB_STORAGE
#include "../firmware/usbstack/usb_storage.h"
#include "usbstack/usb_storage.h"
#endif
/*---------------------------------------------------*/

View file

@ -1,40 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I. -I$(BUILDDIR) -I$(OBJDIR)
# the header we generate
HEADER = $(BUILDDIR)/max_language_size.h
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES=$(SRC)
# OUTP is the list of files to depend upon
OUTP = $(patsubst %.lang,$(OBJDIR)/%.lng, $(SOURCES))
# the generated file with features specified genlang-style
FEATS=$(BUILDDIR)/apps/genlang-features
ifndef V
SILENT=@
endif
PRINTS=$(SILENT)$(call info,$(1))
all: $(HEADER)
# generic rule for creating .lng from .lang
$(OBJDIR)/%.lng : %.lang $(FEATS)
$(call PRINTS,GENLANG $<)
$(SILENT)$(TOOLSDIR)/genlang -e=$(APPSDIR)/lang/english.lang -t=$(MODELNAME)`cat $(FEATS)` -i=$(TARGET_ID) -b=$@ $<
$(HEADER): $(OUTP)
$(call PRINTS,Make $(HEADER))
$(SILENT)echo "#define MAX_LANGUAGE_SIZE `ls -ln $(OBJDIR)/* | awk '{print $$5}' | sort -n | tail -1`" > $(HEADER)

34
apps/lang/lang.make Normal file
View file

@ -0,0 +1,34 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
LANGS := $(call preprocess, $(APPSDIR)/lang/SOURCES)
LANGOBJ := $(LANGS:$(ROOTDIR)/%.lang=$(BUILDDIR)/%.lng)
SRC += $(ROOTDIR)/lang.o # yes ROOTDIR. root.make will subst it to BUILDDIR.
CLEANOBJS += $(BUILDDIR)/max_language_size.h $(BUILDDIR)/lang.*
# $(BUILDDIR)/apps/lang must exist before we create dependencies on it,
# otherwise make will simply ignore those dependencies.
# Therefore we create it here.
#DUMMY := $(shell mkdir -p $(BUILDDIR)/apps/lang)
$(BUILDDIR)/max_language_size.h: $(LANGOBJ)
$(call PRINTS,Create $(notdir $@))
$(SILENT)echo "#define MAX_LANGUAGE_SIZE `ls -ln $(BUILDDIR)/apps/lang/* | awk '{print $$5}' | sort -n | tail -1`" > $@
$(BUILDDIR)/lang.o: $(APPSDIR)/lang/$(LANGUAGE).lang $(BUILDDIR)/apps/features
$(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \
perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(MODELNAME)$$feat $<
$(call PRINTS,CC lang.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@
$(BUILDDIR)/%.lng : $(ROOTDIR)/%.lang $(BUILDDIR)/apps/genlang-features
$(call PRINTS,GENLANG $(subst $(ROOTDIR)/,,$<))
$(SILENT)mkdir -p $(dir $@)
$(SILENT)$(TOOLSDIR)/genlang -e=$(APPSDIR)/lang/english.lang -t=$(MODELNAME)`cat $(BUILDDIR)/apps/genlang-features` -i=$(TARGET_ID) -b=$@ $<

View file

@ -1,180 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES = $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \
-I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib -I$(BUILDDIR)
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
ifdef SOFTWARECODECS
CODECLIBS = -lmad -la52 -lffmpegFLAC -ltremor -lwavpack -lmusepack
endif
# Set up the bitmap libraries
BITMAPLIBS =
LINKBITMAPS =
ifneq ($(strip $(BMP2RB_MONO)),)
BITMAPLIBS += pluginbitmapsmono
LINKBITMAPS += -lpluginbitmapsmono
endif
ifneq ($(strip $(BMP2RB_NATIVE)),)
BITMAPLIBS += pluginbitmapsnative
LINKBITMAPS += -lpluginbitmapsnative
endif
ifneq ($(strip $(BMP2RB_REMOTEMONO)),)
BITMAPLIBS += pluginbitmapsremotemono
LINKBITMAPS += -lpluginbitmapsremotemono
endif
ifneq ($(strip $(BMP2RB_REMOTENATIVE)),)
BITMAPLIBS += pluginbitmapsremotenative
LINKBITMAPS += -lpluginbitmapsremotenative
endif
LDS := plugin.lds
LINKFILE := $(OBJDIR)/pluginlink.lds
DEPFILE = $(OBJDIR)/dep-plugins
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
# This sets up 'SUBDIRS' based on the directories mentioned in SUBDIRS
include $(TOOLSDIR)/makesubdirs.inc
ROCKS := $(SRC:%.c=$(OBJDIR)/%.rock)
SOURCES = $(SRC)
ELFS := $(SRC:%.c=$(OBJDIR)/%.elf)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
# as created by the cross-compiler for win32:
DEFS := $(SRC:%.c=$(OBJDIR)/%.def)
DIRS = .
.PHONY: $(SUBDIRS)
all: build
dep: $(DEPFILE)
build: $(DEPFILE) $(BITMAPLIBS)
$(call PRINTS,MAKE rocks)$(MAKE) rocks
$(call PRINTS,MAKE subdirs)$(MAKE) subdirs
rocks: $(ROCKS)
subdirs: $(SUBDIRS)
$(BUILDDIR)/credits.raw: $(DOCSDIR)/CREDITS
$(call PRINTS,create credits.raw)perl credits.pl < $< > $@
$(OBJDIR)/credits.o: credits.c $(BUILDDIR)/credits.raw
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(<F))$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@
pluginbitmapsmono:
$(call PRINTS,MAKE in plugins/bitmaps/mono)$(MAKE) -C bitmaps/mono OBJDIR=$(OBJDIR)/bitmaps/mono
pluginbitmapsnative:
$(call PRINTS,MAKE in plugins/bitmaps/native)$(MAKE) -C bitmaps/native OBJDIR=$(OBJDIR)/bitmaps/native
pluginbitmapsremotemono:
$(call PRINTS,MAKE in plugins/bitmaps/remote_mono)$(MAKE) -C bitmaps/remote_mono OBJDIR=$(OBJDIR)/bitmaps/remote_mono
pluginbitmapsremotenative:
$(call PRINTS,MAKE in plugins/bitmaps/remote_native)$(MAKE) -C bitmaps/remote_native OBJDIR=$(OBJDIR)/bitmaps/remote_native
ifndef SIMVER
$(OBJDIR)/%.rock: $(OBJDIR)/%.o $(LINKFILE)
$(SILENT)$(CC) $(CFLAGS) -o $(OBJDIR)/$*.elf $< -L$(BUILDDIR) \
$(CODECLIBS) -lplugin $(LINKBITMAPS) -lgcc \
-T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/$*.map
$(call PRINTS,LINK $(@F))$(OC) -O binary $(OBJDIR)/$*.elf $(OBJDIR)/$*.rock
else
ifeq ($(SIMVER), x11)
###################################################
# This is the X11 simulator version
$(OBJDIR)/%.rock : $(OBJDIR)/%.o
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
$(SILENT)chmod -x $@
endif
else # end of x11-simulator
ifeq ($(SIMVER), sdl)
###################################################
# This is the SDL simulator version
$(OBJDIR)/%.rock : $(OBJDIR)/%.o
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
$(SILENT)chmod -x $@
endif
else # end of sdl-simulator
###################################################
# This is the win32 simulator version
DLLTOOLFLAGS = --export-all
DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
$(OBJDIR)/%.rock : $(OBJDIR)/%.o
$(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $<
$(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(BUILDDIR)/libplugin.a $(BITMAPLIBS) \
$(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
$(SILENT)chmod -x $@
endif
endif # end of win32-simulator
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
pluginlib:
$(SILENT)mkdir -p $(OBJDIR)/lib
$(call PRINTS,MAKE in plugin/lib)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@
$(SUBDIRS):
$(SILENT)mkdir -p $(OBJDIR)/$@
$(call PRINTS,MAKE in $@)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \
LINKBITMAPS="$(LINKBITMAPS)"
clean:
$(call PRINTS,cleaning plugins)rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \
$(BUILDDIR)/credits.raw $(OBJS) $(DEFS)
$(SILENT)$(MAKE) -C lib clean OBJDIR=$(OBJDIR)/lib
$(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono
$(SILENT)$(MAKE) -C bitmaps/native clean OBJDIR=$(OBJDIR)/bitmaps/native
$(SILENT)$(MAKE) -C bitmaps/remote_mono clean OBJDIR=$(OBJDIR)/bitmaps/remote_mono
$(SILENT)$(MAKE) -C bitmaps/remote_native clean OBJDIR=$(OBJDIR)/bitmaps/remote_native
$(SILENT)$(MAKE) -C rockboy clean OBJDIR=$(OBJDIR)/rockboy
$(SILENT)$(MAKE) -C searchengine clean OBJDIR=$(OBJDIR)/searchengine
@rm -rf $(BUILDDIR)/pluginbitmaps
-include $(DEPFILE)

View file

@ -1,74 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id $
#
INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR)
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN -O3
ifdef APPEXTRA
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
endif
LINKFILE := $(OBJDIR)/link.lds
DEPFILE = $(OBJDIR)/dep-beatbox
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
DIRS = .
ifndef SIMVER
LDS := ../plugin.lds
OUTPUT = $(OUTDIR)/beatbox.rock
else ## simulators
OUTPUT = $(OUTDIR)/beatbox.rock
endif
all: $(OUTPUT)
ifndef SIMVER
$(OBJDIR)/beatbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
$(LINKBITMAPS) -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/beatbox.map
$(OUTPUT): $(OBJDIR)/beatbox.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
else
###################################################
# This is the SDL simulator version
$(OUTPUT): $(OBJS)
$(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
# 'x' must be kept or you'll have "Win32 error 5"
# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
# #define ERROR_ACCESS_DENIED 5L
else
@chmod -x $@
endif
endif # end of simulator section
include $(TOOLSDIR)/make.inc
# MEMORYSIZE should be passed on to this makefile with the chosen memory size
# given in number of MB
$(LINKFILE): $(LDS)
$(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
$(DEFINES) -E -P - >$@
clean:
$(call PRINTS,cleaning beatbox)rm -rf $(OBJDIR)/beatbox
$(SILENT)rm -f $(OBJDIR)/beatbox.* $(DEPFILE)
-include $(DEPFILE)

View file

@ -1,32 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
-I$(OBJDIR)
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c)
OBJS := $(CSRC:%.c=%.o)
DEPFILE = $(OBJDIR)/dep-bitmaps-mono
BMP2RB = $(BMP2RB_MONO)
OUTPUT = $(BUILDDIR)/libpluginbitmapsmono.a
BMPINCDIR = $(BUILDDIR)/pluginbitmaps
include $(TOOLSDIR)/makebmp.inc
clean:
$(call PRINTS,cleaning plugins/bitmaps/mono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
@rmdir $(OBJDIR)
-include $(DEPFILE)

View file

@ -1,32 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
-I$(OBJDIR)
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c)
OBJS := $(CSRC:%.c=%.o)
DEPFILE = $(OBJDIR)/dep-bitmaps-native
BMP2RB = $(BMP2RB_NATIVE)
OUTPUT = $(BUILDDIR)/libpluginbitmapsnative.a
BMPINCDIR = $(BUILDDIR)/pluginbitmaps
include $(TOOLSDIR)/makebmp.inc
clean:
$(call PRINTS,cleaning plugins/bitmaps/native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
@rmdir $(OBJDIR)
-include $(DEPFILE)

View file

@ -574,13 +574,13 @@ star_tiles.8x8.bmp
#endif
#elif LCD_DEPTH > 1 /* grey */
#if LCD_WIDTH >= 160 && LCD_HEIGHT >= 98
star_tiles.10x10.grey.bmp
star_tiles.10x10x2.bmp
#elif LCD_WIDTH >= 128 && LCD_HEIGHT >= 80
star_tiles.8x8.grey.bmp
star_tiles.8x8x2.bmp
#endif
#else /* monochrome */
#if LCD_WIDTH >= 112 && LCD_HEIGHT >= 62
star_tiles.6x7.mono.bmp
star_tiles.6x7x1.bmp
#endif
#endif
@ -669,14 +669,14 @@ matrix_normal.bmp
/* pictureflow */
#if defined(HAVE_LCD_COLOR) && defined(HAVE_ALBUMART) && defined(HAVE_TAGCACHE)
#if (LCD_WIDTH < 200)
pictureflow_logo.100x18x16.bmp
pictureflow_logo.100x18x16.bmp
#else
pictureflow_logo.193x34x16.bmp
pictureflow_logo.193x34x16.bmp
#endif
#if (LCD_HEIGHT < 100 )
pictureflow_emptyslide.50x50x16.bmp
pictureflow_emptyslide.50x50x16.bmp
#else
pictureflow_emptyslide.100x100x16.bmp
pictureflow_emptyslide.100x100x16.bmp
#endif
#endif
@ -689,53 +689,53 @@ matrix_normal.bmp
#if defined HAVE_LCD_COLOR
#if SMALLER_DIMENSION <= 80
sliding_puzzle.80x80x16.bmp
sliding_puzzle.80x80x16.bmp
#elif SMALLER_DIMENSION <= 108
sliding_puzzle.108x108x16.bmp
sliding_puzzle.108x108x16.bmp
#elif SMALLER_DIMENSION <= 128
sliding_puzzle.128x128x16.bmp
sliding_puzzle.128x128x16.bmp
#elif SMALLER_DIMENSION <= 132
sliding_puzzle.132x132x16.bmp
sliding_puzzle.132x132x16.bmp
#elif SMALLER_DIMENSION <= 176
sliding_puzzle.176x176x16.bmp
sliding_puzzle.176x176x16.bmp
#elif SMALLER_DIMENSION <= 240
sliding_puzzle.240x240x16.bmp
sliding_puzzle.240x240x16.bmp
#endif
#elif (LCD_DEPTH > 1)
#if SMALLER_DIMENSION <= 96
sliding_puzzle.96x96x2.bmp
sliding_puzzle.96x96x2.bmp
#elif SMALLER_DIMENSION <= 110
sliding_puzzle.108x108x2.bmp
sliding_puzzle.108x108x2.bmp
#elif SMALLER_DIMENSION <= 128
sliding_puzzle.128x128x2.bmp
sliding_puzzle.128x128x2.bmp
#endif
#else /* mono targets, one size currently */
sliding_puzzle.80x64x1.bmp
sliding_puzzle.80x64x1.bmp
#endif
/* Logo */
#if LCD_DEPTH == 16
#if (LCD_WIDTH >= 320)
rockboxlogo.220x68x16.bmp
rockboxlogo.220x68x16.bmp
#elif (LCD_WIDTH > 160)
rockboxlogo.128x40x16.bmp
rockboxlogo.128x40x16.bmp
#else
rockboxlogo.90x28x16.bmp
rockboxlogo.90x28x16.bmp
#endif
#elif LCD_DEPTH == 2
#if (LCD_WIDTH > 138)
rockboxlogo.138x46x2.bmp
rockboxlogo.138x46x2.bmp
#else
rockboxlogo.91x32x2.bmp
rockboxlogo.91x32x2.bmp
#endif
#elif LCD_DEPTH == 1
#if (LCD_WIDTH > 112)
/* Such a screen isn't currently in any target */
rockboxlogo.112x30x1.bmp
rockboxlogo.112x30x1.bmp
#else
rockboxlogo.91x32x1.bmp
rockboxlogo.91x32x1.bmp
#endif
#endif

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

View file

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 390 B

View file

@ -0,0 +1,59 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
#
PBMPINCDIR = $(BUILDDIR)/pluginbitmaps
PFLAGS += -I$(PBMPINCDIR)
ifneq ($(strip $(BMP2RB_MONO)),)
PBMP = $(call preprocess, $(APPSDIR)/plugins/bitmaps/mono/SOURCES)
endif
ifneq ($(strip $(BMP2RB_NATIVE)),)
PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/native/SOURCES)
endif
ifneq ($(strip $(BMP2RB_REMOTEMONO)),)
PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_mono/SOURCES)
endif
ifneq ($(strip $(BMP2RB_REMOTENATIVE)),)
PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_native/SOURCES)
endif
ifdef PBMP # does player use bitmaps?
PLUGIN_BITMAPS := $(PBMP:$(ROOTDIR)/%.bmp=$(BUILDDIR)/%.o)
PLUGINBITMAPLIB := $(BUILDDIR)/apps/plugins/bitmaps/libpluginbitmaps.a
PLUGINBITMAPDIR := $(dir $(PLUGINBITMAPLIB))
PBMPHFILES := $(subst $(ROOTDIR),$(BUILDDIR),$(PBMP))
PBMPHFILES := $(shell echo $(PBMPHFILES) | sed -e 's/\.[0-9x]\+\.bmp/.h/g' -e 's/\.bmp/.h/g' -e 's/apps\/plugins\/bitmaps\/\(mono\|native\|remote_mono\|remote_native\)/pluginbitmaps/g')
$(PBMPHFILES): $(PLUGIN_BITMAPS)
$(PLUGINBITMAPLIB): $(PLUGIN_BITMAPS)
$(call PRINTS,AR $(@F))$(AR) rs $@ $+ >/dev/null 2>&1
# pattern rules to create .c files from .bmp, one for each subdir:
$(BUILDDIR)/apps/plugins/bitmaps/mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/mono/%.bmp $(TOOLSDIR)/bmp2rb
$(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
$(call PRINTS,BMP2RB $(<F))$(BMP2RB_MONO) -h $(PBMPINCDIR) $< > $@
$(BUILDDIR)/apps/plugins/bitmaps/native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/native/%.bmp $(TOOLSDIR)/bmp2rb
$(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
$(call PRINTS,BMP2RB $(<F))$(BMP2RB_NATIVE) -h $(PBMPINCDIR) $< > $@
$(BUILDDIR)/apps/plugins/bitmaps/remote_mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_mono/%.bmp $(TOOLSDIR)/bmp2rb
$(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
$(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTEMONO) -h $(PBMPINCDIR) $< > $@
$(BUILDDIR)/apps/plugins/bitmaps/remote_native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_native/%.bmp $(TOOLSDIR)/bmp2rb
$(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
$(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTENATIVE) -h $(PBMPINCDIR) $< > $@
endif

View file

@ -1,32 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
-I$(OBJDIR)
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c)
OBJS := $(CSRC:%.c=%.o)
DEPFILE = $(OBJDIR)/dep-bitmaps-remotemono
BMP2RB = $(BMP2RB_REMOTEMONO)
OUTPUT = $(BUILDDIR)/libpluginbitmapsremotemono.a
BMPINCDIR = $(BUILDDIR)/pluginbitmaps
include $(TOOLSDIR)/makebmp.inc
clean:
$(call PRINTS,cleaning plugins/bitmaps/remotemono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
@rmdir $(OBJDIR)
-include $(DEPFILE)

View file

@ -1,32 +0,0 @@
# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
-I$(OBJDIR)
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c)
OBJS := $(CSRC:%.c=%.o)
DEPFILE = $(OBJDIR)/dep-bitmaps-remotenative
BMP2RB = $(BMP2RB_REMOTENATIVE)
OUTPUT = $(BUILDDIR)/libpluginbitmapsremotenative.a
BMPINCDIR = $(BUILDDIR)/pluginbitmaps
include $(TOOLSDIR)/makebmp.inc
clean:
$(call PRINTS,cleaning plugins/bitmaps/remote_native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
@rmdir $(OBJDIR)
-include $(DEPFILE)

Some files were not shown because too many files have changed in this diff Show more