From e1b1183f401974700a67db76f39e2bba9a5984e1 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Thu, 23 Dec 2010 18:59:58 +0000 Subject: Tweak Makefiles a bit to allow cross compiling Rockbox Utility. - pass AR to the lib Makefiles to make sure the correct one gets used. - create an archive index for archives. - simplify ucl Makefile a bit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28883 a1c6a512-1295-4272-9138-f99709370657 --- tools/rbspeex/Makefile | 2 +- tools/ucl/src/Makefile | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'tools') diff --git a/tools/rbspeex/Makefile b/tools/rbspeex/Makefile index 2fb1c4d..e52543c 100644 --- a/tools/rbspeex/Makefile +++ b/tools/rbspeex/Makefile @@ -72,7 +72,7 @@ $(DEPFILE): $(SOURCES) $(OUT)/librbspeex.a: $(OBJS) $(DEPFILE) $(OUT)/rbspeex.o @echo AR $(OUT)/librbspeex$(RBARCH).a - $(SILENT)$(AR) ruv $@ $+ > /dev/null 2>&1 + $(SILENT)$(AR) rucs $@ $+ > /dev/null 2>&1 librbspeex$(RBARCH).a: $(OUT)/librbspeex.a $(SILENT)cp $(OUT)/librbspeex.a $(TARGET_DIR)librbspeex$(RBARCH).a diff --git a/tools/ucl/src/Makefile b/tools/ucl/src/Makefile index c519844..3a13acc 100644 --- a/tools/ucl/src/Makefile +++ b/tools/ucl/src/Makefile @@ -21,17 +21,16 @@ OUT = $(TARGET_DIR)build$(RBARCH) SOURCES = alloc.c io.c n2b_99.c n2b_d.c n2b_ds.c n2b_to.c n2d_99.c \ n2d_d.c n2d_ds.c n2d_to.c n2e_99.c n2e_d.c n2e_ds.c n2e_to.c ucl_crc.c \ - ucl_dll.c ucl_init.c ucl_ptr.c ucl_str.c ucl_util.c + ucl_init.c ucl_ptr.c ucl_str.c ucl_util.c #ucl_dll.c -OBJS = $(OUT)/alloc.o $(OUT)/io.o $(OUT)/n2b_99.o $(OUT)/n2b_d.o $(OUT)/n2b_ds.o $(OUT)/n2b_to.o $(OUT)/n2d_99.o \ - $(OUT)/n2d_d.o $(OUT)/n2d_ds.o $(OUT)/n2d_to.o $(OUT)/n2e_99.o $(OUT)/n2e_d.o $(OUT)/n2e_ds.o $(OUT)/n2e_to.o $(OUT)/ucl_crc.o \ - $(OUT)/ucl_dll.o $(OUT)/ucl_init.o $(OUT)/ucl_ptr.o $(OUT)/ucl_str.o $(OUT)/ucl_util.o +OBJS = $(addprefix $(OUT)/,$(SOURCES:%.c=%.o)) + +# This Makefile is _not_ used to build uclpack for Rockbox builds anymore (they +# use tools.make), so we can use $(CC) and $(AR) here. -# we don't use $(AR) and $(RANLIB) below since we want the _native_ tools -# not the cross-compiler tools libucl$(RBARCH).a: $(OUT) $(OBJS) - $(SILENT)ar ruv $(TARGET_DIR)$@ $(OBJS) >/dev/null 2>&1 - $(SILENT)ranlib $(TARGET_DIR)$@ + @echo AR $@ + $(SILENT)$(AR) rucs $(TARGET_DIR)$@ $(OBJS) >/dev/null 2>&1 $(OUT)/%.o: %.c @echo CC $< -- cgit v1.1