diff options
author | Thomas Martitz <kugel@rockbox.org> | 2012-03-26 22:24:57 +0200 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2012-03-26 22:27:40 +0200 |
commit | f269aa0060950f7b9c42216267c639a2fb556196 (patch) | |
tree | 218ad3a737f11cb18e48676f300bc22038cfa140 /lib | |
parent | 9445d4625a3d47b28d756a5763165eb73d6b4ada (diff) | |
download | rockbox-f269aa0060950f7b9c42216267c639a2fb556196.tar.gz rockbox-f269aa0060950f7b9c42216267c639a2fb556196.zip |
build system: unify/simplify library handling a bit.
libs in $ROOT/lib now add to $(CORE_LIBS) and $(EXTRA_LIBS) and are
automatically linked by the core and codecs/plugins respectively.
Change-Id: Iff482c792a8c8142718f6a16a450c6e2f1497c9a
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arm_support/arm_support.make | 16 | ||||
-rw-r--r-- | lib/libsetjmp/libsetjmp.make | 16 | ||||
-rw-r--r-- | lib/rbcodec/rbcodec.make | 18 | ||||
-rw-r--r-- | lib/skin_parser/skin_parser.make | 16 | ||||
-rw-r--r-- | lib/unwarminder/unwarminder.make | 15 |
5 files changed, 42 insertions, 39 deletions
diff --git a/lib/arm_support/arm_support.make b/lib/arm_support/arm_support.make index a3775ee3b0..054d723e62 100644 --- a/lib/arm_support/arm_support.make +++ b/lib/arm_support/arm_support.make | |||
@@ -6,14 +6,16 @@ | |||
6 | # \/ \/ \/ \/ \/ | 6 | # \/ \/ \/ \/ \/ |
7 | # | 7 | # |
8 | 8 | ||
9 | ARMSUPPORT_DIR = $(ROOTDIR)/lib/arm_support | 9 | ARMSUPPORTLIB_DIR := $(ROOTDIR)/lib/arm_support |
10 | ARMSUPPORT_SRC = $(ARMSUPPORT_DIR)/support-arm.S | 10 | ARMSUPPORTLIB_SRC := $(ARMSUPPORTLIB_DIR)/support-arm.S |
11 | ARMSUPPORT_OBJ := $(call c2obj, $(ARMSUPPORT_SRC)) | 11 | ARMSUPPORTLIB_OBJ := $(call c2obj, $(ARMSUPPORTLIB_SRC)) |
12 | ARMSUPPORTLIB := $(BUILDDIR)/lib/libarm_support.a | ||
12 | 13 | ||
13 | OTHER_SRC += $(ARMSUPPORT_SRC) | 14 | OTHER_SRC += $(ARMSUPPORTLIB_SRC) |
15 | # both core and plugins link this | ||
16 | CORE_LIBS += $(ARMSUPPORTLIB) | ||
17 | PLUGIN_LIBS += $(ARMSUPPORTLIB) | ||
14 | 18 | ||
15 | LIBARMSUPPORT := $(BUILDDIR)/lib/libarm_support.a | 19 | $(ARMSUPPORTLIB): $(ARMSUPPORTLIB_OBJ) |
16 | |||
17 | $(LIBARMSUPPORT): $(ARMSUPPORT_OBJ) | ||
18 | $(SILENT)$(shell rm -f $@) | 20 | $(SILENT)$(shell rm -f $@) |
19 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null | 21 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null |
diff --git a/lib/libsetjmp/libsetjmp.make b/lib/libsetjmp/libsetjmp.make index b7d4cad25f..f8df7513c9 100644 --- a/lib/libsetjmp/libsetjmp.make +++ b/lib/libsetjmp/libsetjmp.make | |||
@@ -6,16 +6,16 @@ | |||
6 | # \/ \/ \/ \/ \/ | 6 | # \/ \/ \/ \/ \/ |
7 | # | 7 | # |
8 | 8 | ||
9 | SETJMP_DIR = $(ROOTDIR)/lib/libsetjmp | 9 | SETJMPLIB_DIR = $(ROOTDIR)/lib/libsetjmp |
10 | SETJMP_SRC = $(call preprocess, $(SETJMP_DIR)/SOURCES) | 10 | SETJMPLIB_SRC = $(call preprocess, $(SETJMPLIB_DIR)/SOURCES) |
11 | SETJMP_OBJ := $(call c2obj, $(SETJMP_SRC)) | 11 | SETJMPLIB_OBJ := $(call c2obj, $(SETJMPLIB_SRC)) |
12 | 12 | ||
13 | OTHER_SRC += $(SETJMP_SRC) | 13 | SETJMPLIB = $(BUILDDIR)/lib/libsetjmp.a |
14 | 14 | ||
15 | LIBSETJMP = $(BUILDDIR)/lib/libsetjmp.a | 15 | INCLUDES += -I$(SETJMPLIB_DIR) |
16 | OTHER_SRC += $(SETJMPLIB_SRC) | ||
17 | EXTRA_LIBS += $(SETJMPLIB) | ||
16 | 18 | ||
17 | INCLUDES += -I$(SETJMP_DIR) | 19 | $(SETJMPLIB): $(SETJMPLIB_OBJ) |
18 | |||
19 | $(LIBSETJMP): $(SETJMP_OBJ) | ||
20 | $(SILENT)$(shell rm -f $@) | 20 | $(SILENT)$(shell rm -f $@) |
21 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null | 21 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null |
diff --git a/lib/rbcodec/rbcodec.make b/lib/rbcodec/rbcodec.make index afa289ba28..cd669d22c9 100644 --- a/lib/rbcodec/rbcodec.make +++ b/lib/rbcodec/rbcodec.make | |||
@@ -5,15 +5,15 @@ | |||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | 5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
6 | # \/ \/ \/ \/ \/ | 6 | # \/ \/ \/ \/ \/ |
7 | 7 | ||
8 | RBCODEC_LIB = $(RBCODEC_BLD)/librbcodec.a | 8 | # RBCODEC_BLD is defined in the calling Makefile |
9 | RBCODEC_SRC := $(call preprocess, $(RBCODEC_DIR)/SOURCES) | 9 | RBCODECLIB_DIR := $(ROOTDIR)/lib/rbcodec |
10 | RBCODEC_OBJ := $(call c2obj, $(RBCODEC_SRC)) | 10 | RBCODECLIB_SRC := $(call preprocess, $(RBCODECLIB_DIR)/SOURCES) |
11 | INCLUDES += -I$(RBCODEC_DIR) -I$(RBCODEC_DIR)/dsp -I$(RBCODEC_DIR)/metadata | 11 | RBCODECLIB_OBJ := $(call c2obj, $(RBCODECLIB_SRC)) |
12 | OTHER_SRC += $(RBCODEC_SRC) | 12 | RBCODECLIB := $(BUILDDIR)/lib/librbcodec.a |
13 | 13 | ||
14 | $(RBCODEC_BLD)/%.o: $(RBCODEC_DIR)/%.c | 14 | INCLUDES += -I$(RBCODECLIB_DIR) -I$(RBCODECLIB_DIR)/dsp -I$(RBCODECLIB_DIR)/metadata |
15 | $(SILENT)mkdir -p $(dir $@) | 15 | OTHER_SRC += $(RBCODECLIB_SRC) |
16 | $(call PRINTS,CC $<)$(CC) $(CFLAGS) $(RBCODEC_CFLAGS) -c $< -o $@ | 16 | CORE_LIBS += $(RBCODECLIB) |
17 | 17 | ||
18 | $(RBCODEC_LIB): $(RBCODEC_OBJ) | 18 | $(RBCODECLIB): $(RBCODECLIB_OBJ) |
19 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null | 19 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null |
diff --git a/lib/skin_parser/skin_parser.make b/lib/skin_parser/skin_parser.make index 0be85f3e58..42104a2822 100644 --- a/lib/skin_parser/skin_parser.make +++ b/lib/skin_parser/skin_parser.make | |||
@@ -5,16 +5,16 @@ | |||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | 5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
6 | # \/ \/ \/ \/ \/ | 6 | # \/ \/ \/ \/ \/ |
7 | # | 7 | # |
8 | SKINP_DIR = $(ROOTDIR)/lib/skin_parser | 8 | SKINPARSLIB_DIR = $(ROOTDIR)/lib/skin_parser |
9 | SKINP_SRC = $(call preprocess, $(SKINP_DIR)/SOURCES) | 9 | SKINPARSLIB_SRC = $(call preprocess, $(SKINPARSLIB_DIR)/SOURCES) |
10 | SKINP_OBJ := $(call c2obj, $(SKINP_SRC)) | 10 | SKINPARSLIB_OBJ := $(call c2obj, $(SKINPARSLIB_SRC)) |
11 | 11 | ||
12 | OTHER_SRC += $(SKINP_SRC) | 12 | SKINPARSLIB = $(BUILDDIR)/lib/libskin_parser.a |
13 | 13 | ||
14 | SKINLIB = $(BUILDDIR)/lib/libskin_parser.a | 14 | INCLUDES += -I$(SKINPARSLIB_DIR) |
15 | OTHER_SRC += $(SKINPARSLIB_SRC) | ||
16 | CORE_LIBS += $(SKINPARSLIB) | ||
15 | 17 | ||
16 | INCLUDES += -I$(SKINP_DIR) | 18 | $(SKINPARSLIB): $(SKINPARSLIB_OBJ) |
17 | |||
18 | $(SKINLIB): $(SKINP_OBJ) | ||
19 | $(SILENT)$(shell rm -f $@) | 19 | $(SILENT)$(shell rm -f $@) |
20 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null | 20 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null |
diff --git a/lib/unwarminder/unwarminder.make b/lib/unwarminder/unwarminder.make index f570d49640..5093156f54 100644 --- a/lib/unwarminder/unwarminder.make +++ b/lib/unwarminder/unwarminder.make | |||
@@ -6,16 +6,17 @@ | |||
6 | # \/ \/ \/ \/ \/ | 6 | # \/ \/ \/ \/ \/ |
7 | # | 7 | # |
8 | 8 | ||
9 | UNWARM_DIR = $(ROOTDIR)/lib/unwarminder | 9 | UNWARMLIB_DIR = $(ROOTDIR)/lib/unwarminder |
10 | UNWARM_SRC = $(call preprocess, $(UNWARM_DIR)/SOURCES) | 10 | UNWARMLIB_SRC = $(call preprocess, $(UNWARMLIB_DIR)/SOURCES) |
11 | UNWARM_OBJ := $(call c2obj, $(UNWARM_SRC)) | 11 | UNWARMLIB_OBJ := $(call c2obj, $(UNWARMLIB_SRC)) |
12 | 12 | ||
13 | OTHER_SRC += $(UNWARM_SRC) | 13 | OTHER_SRC += $(UNWARMLIB_SRC) |
14 | 14 | ||
15 | UNWARMINDER = $(BUILDDIR)/lib/libunwarminder.a | 15 | UNWARMLIB = $(BUILDDIR)/lib/libunwarminder.a |
16 | CORE_LIBS += $(UNWARMLIB) | ||
16 | 17 | ||
17 | INCLUDES += -I$(UNWARM_DIR) | 18 | INCLUDES += -I$(UNWARMLIB_DIR) |
18 | 19 | ||
19 | $(UNWARMINDER): $(UNWARM_OBJ) | 20 | $(UNWARMLIB): $(UNWARMLIB_OBJ) |
20 | $(SILENT)$(shell rm -f $@) | 21 | $(SILENT)$(shell rm -f $@) |
21 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null | 22 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null |