summaryrefslogtreecommitdiff
path: root/apps/codecs/libspc
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2008-11-20 11:27:31 +0000
committerBjörn Stenberg <bjorn@haxx.se>2008-11-20 11:27:31 +0000
commitc6b3d38a156dd624760a8eb1bb374affd43b4f2a (patch)
tree493eba929e2396d86cf4f077709aa09fe172cd35 /apps/codecs/libspc
parentf66c30346783a400a029bedcd60ab67c81c34a07 (diff)
downloadrockbox-c6b3d38a156dd624760a8eb1bb374affd43b4f2a.tar.gz
rockbox-c6b3d38a156dd624760a8eb1bb374affd43b4f2a.zip
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
Diffstat (limited to 'apps/codecs/libspc')
-rw-r--r--apps/codecs/libspc/Makefile44
-rw-r--r--apps/codecs/libspc/libspc.make24
-rw-r--r--apps/codecs/libspc/spc_codec.h2
-rw-r--r--apps/codecs/libspc/spc_cpu.c3
-rw-r--r--apps/codecs/libspc/spc_dsp.c3
-rw-r--r--apps/codecs/libspc/spc_emu.c3
-rw-r--r--apps/codecs/libspc/spc_profiler.c2
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
10INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
11 -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
12
13ifdef APPEXTRA
14 INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
15endif
16
17SPCOPTS = -O -DROCKBOX
18
19CFLAGS = $(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
23include $(TOOLSDIR)/makesrc.inc
24
25SOURCES = $(SRC)
26OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
27OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
28DEPFILE = $(OBJDIR)/dep-spc
29DIRS =
30
31all: $(OUTPUT)
32
33$(OUTPUT): $(OBJS)
34 $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
35 $(SILENT)$(RANLIB) $@
36
37include $(TOOLSDIR)/make.inc
38
39clean:
40 $(call PRINTS,cleaning spc)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
41
42ifneq ($(MAKECMDGOALS),clean)
43-include $(DEPFILE)
44endif
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
11SPCLIB := $(CODECDIR)/libspc.a
12SPCLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libspc/SOURCES)
13SPCLIB_OBJ := $(call c2obj, $(SPCLIB_SRC))
14OTHER_SRC += $(SPCLIB_SRC)
15
16$(SPCLIB): $(SPCLIB_OBJ)
17 $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
18
19SPCFLAGS = $(filter-out -O%,$(CODECFLAGS))
20SPCFLAGS += -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"