diff options
author | Björn Stenberg <bjorn@haxx.se> | 2008-11-20 11:27:31 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2008-11-20 11:27:31 +0000 |
commit | c6b3d38a156dd624760a8eb1bb374affd43b4f2a (patch) | |
tree | 493eba929e2396d86cf4f077709aa09fe172cd35 /apps/codecs/libspc | |
parent | f66c30346783a400a029bedcd60ab67c81c34a07 (diff) |
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/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 @@ -# __________ __ ___. -# 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 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 @@ +# __________ __ ___. +# 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 $@ 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 @@ #define _SPC_CODEC_H_ /* rather than comment out asserts, just define NDEBUG */ +#ifndef NDEBUG #define NDEBUG +#endif #include <assert.h> /** 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 @@ ****************************************************************************/ /* The CPU portion (shock!) */ -#include "codec.h" -#include "codecs.h" +#include "codeclib.h" #include "spc_codec.h" #include "spc_profiler.h" 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 @@ ****************************************************************************/ /* The DSP portion (awe!) */ -#include "codec.h" -#include "codecs.h" +#include "codeclib.h" #include "spc_codec.h" #include "spc_profiler.h" 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 @@ * KIND, either express or implied. * ****************************************************************************/ -#include "codec.h" -#include "codecs.h" +#include "codeclib.h" #include "spc_codec.h" #include "spc_profiler.h" 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 @@ #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" |