summaryrefslogtreecommitdiffstats
path: root/rbutil/mkamsboot
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-09-26 20:51:23 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-09-26 20:51:23 +0000
commitc7c657ca9264b1bc7dc313a92e285128fc9ffea3 (patch)
treef88968ce38fb14c7f458d5f1d1cfff23e93d4a22 /rbutil/mkamsboot
parentccc5f4c4e1687cd7cf515f26da0f5ab918090736 (diff)
downloadrockbox-c7c657ca9264b1bc7dc313a92e285128fc9ffea3.tar.gz
rockbox-c7c657ca9264b1bc7dc313a92e285128fc9ffea3.tar.bz2
rockbox-c7c657ca9264b1bc7dc313a92e285128fc9ffea3.zip
Prevent unnecessary rebuilding of libs.
- When building for Rockbox Utility the called Makefiles would rebuild the libs every time. Change dependencies a bit to allow make to properly detect if the lib is already up to date. - Remove dependency on output folder in some cases to avoid unnecessary rebuilds. - Add standard Rockbox header to files lacking it. - Make make calls from qmake silent. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30608 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/mkamsboot')
-rw-r--r--rbutil/mkamsboot/Makefile24
1 files changed, 16 insertions, 8 deletions
diff --git a/rbutil/mkamsboot/Makefile b/rbutil/mkamsboot/Makefile
index a76259794e..052904211b 100644
--- a/rbutil/mkamsboot/Makefile
+++ b/rbutil/mkamsboot/Makefile
@@ -1,9 +1,15 @@
+# __________ __ ___.
+# Open \______ \ ____ ____ | | _\_ |__ _______ ___
+# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+# \/ \/ \/ \/ \/
#change for releases
ifndef APPVERSION
-APPVERSION=`../../tools/version.sh ../../`
+APPVERSION=$(shell ../../tools/version.sh ../../)
endif
-
+TARGET_DIR ?= $(shell pwd)/
# We use the UCL code available in the Rockbox tools/ directory
CFLAGS=-I../../tools/ucl/include -Wall -DVERSION=\"$(APPVERSION)\"
@@ -37,10 +43,10 @@ endif
all: $(OUTPUT)
# additional link dependencies for the standalone executable
-LIBUCL=../../tools/ucl/src/libucl$(RBARCH).a
+LIBUCL=$(OBJDIR)libucl$(RBARCH).a
$(LIBUCL):
- $(MAKE) -C ../../tools/ucl/src $(TARGET_DIR)libucl$(RBARCH).a
+ $(SILENT)$(MAKE) -C ../../tools/ucl/src TARGET_DIR=$(OBJDIR) libucl$(RBARCH).a
# inputs
LIBSOURCES := dualboot.c md5.c mkamsboot.c
@@ -58,9 +64,11 @@ $(OBJDIR)%.o: %.c
$(SILENT)mkdir -p $(dir $@)
$(SILENT)$(CC) $(CFLAGS) -c -o $@ $<
-libmkamsboot$(RBARCH).a: $(LIBOBJS)
- @echo AR $@
- $(SILENT)$(AR) rucs $(TARGET_DIR)$@ $^
+libmkamsboot$(RBARCH).a: $(TARGET_DIR)libmkamsboot$(RBARCH).a
+
+$(TARGET_DIR)libmkamsboot$(RBARCH).a: $(LIBOBJS)
+ @echo AR $(notdir $@)
+ $(SILENT)$(AR) rucs $@ $^
# building the standalone executable
$(OUTPUT): $(OBJS) $(EXTRADEPS)
@@ -74,7 +82,7 @@ $(TARGET_DIR)libmkamsbooti386.a:
$(TARGET_DIR)libmkamsbootppc.a:
make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) libmkamsbootppc.a
-endif
+endif
libmkamsboot-universal: $(TARGET_DIR)libmkamsbooti386.a $(TARGET_DIR)libmkamsbootppc.a
@echo lipo $(TARGET_DIR)libmkamsboot.a