diff options
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 |