diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2011-09-26 20:51:23 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2011-09-26 20:51:23 +0000 |
commit | c7c657ca9264b1bc7dc313a92e285128fc9ffea3 (patch) | |
tree | f88968ce38fb14c7f458d5f1d1cfff23e93d4a22 /rbutil/mkamsboot/Makefile | |
parent | ccc5f4c4e1687cd7cf515f26da0f5ab918090736 (diff) | |
download | rockbox-c7c657ca9264b1bc7dc313a92e285128fc9ffea3.tar.gz 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/Makefile')
-rw-r--r-- | rbutil/mkamsboot/Makefile | 24 |
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 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
1 | 7 | ||
2 | #change for releases | 8 | #change for releases |
3 | ifndef APPVERSION | 9 | ifndef APPVERSION |
4 | APPVERSION=`../../tools/version.sh ../../` | 10 | APPVERSION=$(shell ../../tools/version.sh ../../) |
5 | endif | 11 | endif |
6 | 12 | TARGET_DIR ?= $(shell pwd)/ | |
7 | # We use the UCL code available in the Rockbox tools/ directory | 13 | # We use the UCL code available in the Rockbox tools/ directory |
8 | CFLAGS=-I../../tools/ucl/include -Wall -DVERSION=\"$(APPVERSION)\" | 14 | CFLAGS=-I../../tools/ucl/include -Wall -DVERSION=\"$(APPVERSION)\" |
9 | 15 | ||
@@ -37,10 +43,10 @@ endif | |||
37 | all: $(OUTPUT) | 43 | all: $(OUTPUT) |
38 | 44 | ||
39 | # additional link dependencies for the standalone executable | 45 | # additional link dependencies for the standalone executable |
40 | LIBUCL=../../tools/ucl/src/libucl$(RBARCH).a | 46 | LIBUCL=$(OBJDIR)libucl$(RBARCH).a |
41 | 47 | ||
42 | $(LIBUCL): | 48 | $(LIBUCL): |
43 | $(MAKE) -C ../../tools/ucl/src $(TARGET_DIR)libucl$(RBARCH).a | 49 | $(SILENT)$(MAKE) -C ../../tools/ucl/src TARGET_DIR=$(OBJDIR) libucl$(RBARCH).a |
44 | 50 | ||
45 | # inputs | 51 | # inputs |
46 | LIBSOURCES := dualboot.c md5.c mkamsboot.c | 52 | LIBSOURCES := dualboot.c md5.c mkamsboot.c |
@@ -58,9 +64,11 @@ $(OBJDIR)%.o: %.c | |||
58 | $(SILENT)mkdir -p $(dir $@) | 64 | $(SILENT)mkdir -p $(dir $@) |
59 | $(SILENT)$(CC) $(CFLAGS) -c -o $@ $< | 65 | $(SILENT)$(CC) $(CFLAGS) -c -o $@ $< |
60 | 66 | ||
61 | libmkamsboot$(RBARCH).a: $(LIBOBJS) | 67 | libmkamsboot$(RBARCH).a: $(TARGET_DIR)libmkamsboot$(RBARCH).a |
62 | @echo AR $@ | 68 | |
63 | $(SILENT)$(AR) rucs $(TARGET_DIR)$@ $^ | 69 | $(TARGET_DIR)libmkamsboot$(RBARCH).a: $(LIBOBJS) |
70 | @echo AR $(notdir $@) | ||
71 | $(SILENT)$(AR) rucs $@ $^ | ||
64 | 72 | ||
65 | # building the standalone executable | 73 | # building the standalone executable |
66 | $(OUTPUT): $(OBJS) $(EXTRADEPS) | 74 | $(OUTPUT): $(OBJS) $(EXTRADEPS) |
@@ -74,7 +82,7 @@ $(TARGET_DIR)libmkamsbooti386.a: | |||
74 | 82 | ||
75 | $(TARGET_DIR)libmkamsbootppc.a: | 83 | $(TARGET_DIR)libmkamsbootppc.a: |
76 | make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) libmkamsbootppc.a | 84 | make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) libmkamsbootppc.a |
77 | endif | 85 | endif |
78 | 86 | ||
79 | libmkamsboot-universal: $(TARGET_DIR)libmkamsbooti386.a $(TARGET_DIR)libmkamsbootppc.a | 87 | libmkamsboot-universal: $(TARGET_DIR)libmkamsbooti386.a $(TARGET_DIR)libmkamsbootppc.a |
80 | @echo lipo $(TARGET_DIR)libmkamsboot.a | 88 | @echo lipo $(TARGET_DIR)libmkamsboot.a |