diff options
Diffstat (limited to 'apps/codecs/libspc')
-rw-r--r-- | apps/codecs/libspc/Makefile | 44 | ||||
-rw-r--r-- | apps/codecs/libspc/libspc.make | 24 | ||||
-rw-r--r-- | apps/codecs/libspc/spc_codec.h | 2 | ||||
-rw-r--r-- | apps/codecs/libspc/spc_cpu.c | 3 | ||||
-rw-r--r-- | apps/codecs/libspc/spc_dsp.c | 3 | ||||
-rw-r--r-- | apps/codecs/libspc/spc_emu.c | 3 | ||||
-rw-r--r-- | apps/codecs/libspc/spc_profiler.c | 2 |
7 files changed, 30 insertions, 51 deletions
diff --git a/apps/codecs/libspc/Makefile b/apps/codecs/libspc/Makefile deleted file mode 100644 index 8929149ce2..0000000000 --- a/apps/codecs/libspc/Makefile +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
11 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) | ||
12 | |||
13 | ifdef APPEXTRA | ||
14 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | ||
15 | endif | ||
16 | |||
17 | SPCOPTS = -O -DROCKBOX | ||
18 | |||
19 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(SPCOPTS) $(TARGET) \ | ||
20 | $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) -DCODEC=1 | ||
21 | |||
22 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
23 | include $(TOOLSDIR)/makesrc.inc | ||
24 | |||
25 | SOURCES = $(SRC) | ||
26 | OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) | ||
27 | OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) | ||
28 | DEPFILE = $(OBJDIR)/dep-spc | ||
29 | DIRS = | ||
30 | |||
31 | all: $(OUTPUT) | ||
32 | |||
33 | $(OUTPUT): $(OBJS) | ||
34 | $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 | ||
35 | $(SILENT)$(RANLIB) $@ | ||
36 | |||
37 | include $(TOOLSDIR)/make.inc | ||
38 | |||
39 | clean: | ||
40 | $(call PRINTS,cleaning spc)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) | ||
41 | |||
42 | ifneq ($(MAKECMDGOALS),clean) | ||
43 | -include $(DEPFILE) | ||
44 | endif | ||
diff --git a/apps/codecs/libspc/libspc.make b/apps/codecs/libspc/libspc.make new file mode 100644 index 0000000000..62f788be02 --- /dev/null +++ b/apps/codecs/libspc/libspc.make | |||
@@ -0,0 +1,24 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | # libspc | ||
11 | SPCLIB := $(CODECDIR)/libspc.a | ||
12 | SPCLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libspc/SOURCES) | ||
13 | SPCLIB_OBJ := $(call c2obj, $(SPCLIB_SRC)) | ||
14 | OTHER_SRC += $(SPCLIB_SRC) | ||
15 | |||
16 | $(SPCLIB): $(SPCLIB_OBJ) | ||
17 | $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 | ||
18 | |||
19 | SPCFLAGS = $(filter-out -O%,$(CODECFLAGS)) | ||
20 | SPCFLAGS += -O1 | ||
21 | |||
22 | $(CODECDIR)/libspc/%.o: $(ROOTDIR)/apps/codecs/libspc/%.c | ||
23 | $(SILENT)mkdir -p $(dir $@) | ||
24 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPCFLAGS) -c $< -o $@ | ||
diff --git a/apps/codecs/libspc/spc_codec.h b/apps/codecs/libspc/spc_codec.h index 33e566aea2..a6dcd0a8bc 100644 --- a/apps/codecs/libspc/spc_codec.h +++ b/apps/codecs/libspc/spc_codec.h | |||
@@ -30,7 +30,9 @@ | |||
30 | #define _SPC_CODEC_H_ | 30 | #define _SPC_CODEC_H_ |
31 | 31 | ||
32 | /* rather than comment out asserts, just define NDEBUG */ | 32 | /* rather than comment out asserts, just define NDEBUG */ |
33 | #ifndef NDEBUG | ||
33 | #define NDEBUG | 34 | #define NDEBUG |
35 | #endif | ||
34 | #include <assert.h> | 36 | #include <assert.h> |
35 | 37 | ||
36 | /** Basic configuration options **/ | 38 | /** Basic configuration options **/ |
diff --git a/apps/codecs/libspc/spc_cpu.c b/apps/codecs/libspc/spc_cpu.c index 6aa9499d1e..d308e6e27c 100644 --- a/apps/codecs/libspc/spc_cpu.c +++ b/apps/codecs/libspc/spc_cpu.c | |||
@@ -22,8 +22,7 @@ | |||
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | 23 | ||
24 | /* The CPU portion (shock!) */ | 24 | /* The CPU portion (shock!) */ |
25 | #include "codec.h" | 25 | #include "codeclib.h" |
26 | #include "codecs.h" | ||
27 | #include "spc_codec.h" | 26 | #include "spc_codec.h" |
28 | #include "spc_profiler.h" | 27 | #include "spc_profiler.h" |
29 | 28 | ||
diff --git a/apps/codecs/libspc/spc_dsp.c b/apps/codecs/libspc/spc_dsp.c index 153950ca75..d1facf89a2 100644 --- a/apps/codecs/libspc/spc_dsp.c +++ b/apps/codecs/libspc/spc_dsp.c | |||
@@ -23,8 +23,7 @@ | |||
23 | ****************************************************************************/ | 23 | ****************************************************************************/ |
24 | 24 | ||
25 | /* The DSP portion (awe!) */ | 25 | /* The DSP portion (awe!) */ |
26 | #include "codec.h" | 26 | #include "codeclib.h" |
27 | #include "codecs.h" | ||
28 | #include "spc_codec.h" | 27 | #include "spc_codec.h" |
29 | #include "spc_profiler.h" | 28 | #include "spc_profiler.h" |
30 | 29 | ||
diff --git a/apps/codecs/libspc/spc_emu.c b/apps/codecs/libspc/spc_emu.c index e646e08ae6..1bebc86d9a 100644 --- a/apps/codecs/libspc/spc_emu.c +++ b/apps/codecs/libspc/spc_emu.c | |||
@@ -20,8 +20,7 @@ | |||
20 | * KIND, either express or implied. | 20 | * KIND, either express or implied. |
21 | * | 21 | * |
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | #include "codec.h" | 23 | #include "codeclib.h" |
24 | #include "codecs.h" | ||
25 | #include "spc_codec.h" | 24 | #include "spc_codec.h" |
26 | #include "spc_profiler.h" | 25 | #include "spc_profiler.h" |
27 | 26 | ||
diff --git a/apps/codecs/libspc/spc_profiler.c b/apps/codecs/libspc/spc_profiler.c index 5dc516258f..3184ad7b52 100644 --- a/apps/codecs/libspc/spc_profiler.c +++ b/apps/codecs/libspc/spc_profiler.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #if defined(SPC_PROFILE) && defined(USEC_TIMER) | 26 | #if defined(SPC_PROFILE) && defined(USEC_TIMER) |
27 | 27 | ||
28 | #include "codec.h" | 28 | #include "codeclib.h" |
29 | #include "spc_codec.h" | 29 | #include "spc_codec.h" |
30 | #define SPC_DEFINE_PROFILER_TIMERS | 30 | #define SPC_DEFINE_PROFILER_TIMERS |
31 | #include "spc_profiler.h" | 31 | #include "spc_profiler.h" |