diff options
-rw-r--r-- | rbutil/mkamsboot/Makefile | 24 | ||||
-rw-r--r-- | rbutil/mkmpioboot/Makefile | 17 | ||||
-rw-r--r-- | rbutil/mktccboot/Makefile | 34 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.pro | 10 | ||||
-rw-r--r-- | tools/ucl/src/Makefile | 28 |
5 files changed, 66 insertions, 47 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 |
diff --git a/rbutil/mkmpioboot/Makefile b/rbutil/mkmpioboot/Makefile index 5e138b6f12..8077bdceb6 100644 --- a/rbutil/mkmpioboot/Makefile +++ b/rbutil/mkmpioboot/Makefile | |||
@@ -1,3 +1,9 @@ | |||
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 |
@@ -33,6 +39,7 @@ else | |||
33 | OBJDIR = $(TARGET_DIR)build/ | 39 | OBJDIR = $(TARGET_DIR)build/ |
34 | endif | 40 | endif |
35 | 41 | ||
42 | TARGET_DIR ?= $(shell pwd) | ||
36 | 43 | ||
37 | all: $(OUTPUT) | 44 | all: $(OUTPUT) |
38 | 45 | ||
@@ -52,9 +59,11 @@ $(OBJDIR)%.o: %.c | |||
52 | $(SILENT)mkdir -p $(dir $@) | 59 | $(SILENT)mkdir -p $(dir $@) |
53 | $(SILENT)$(CC) $(CFLAGS) -c -o $@ $< | 60 | $(SILENT)$(CC) $(CFLAGS) -c -o $@ $< |
54 | 61 | ||
55 | libmkmpioboot$(RBARCH).a: $(LIBOBJS) | 62 | libmkmpioboot$(RBARCH).a: $(TARGET_DIR)libmkmpioboot$(RBARCH).a |
56 | @echo AR $@ | 63 | |
57 | $(SILENT)$(AR) rucs $(TARGET_DIR)$@ $^ | 64 | $(TARGET_DIR)libmkmpioboot$(RBARCH).a: $(LIBOBJS) |
65 | @echo AR $(notdir $@) | ||
66 | $(SILENT)$(AR) rucs $@ $^ | ||
58 | 67 | ||
59 | # building the standalone executable | 68 | # building the standalone executable |
60 | $(OUTPUT): $(OBJS) $(EXTRADEPS) | 69 | $(OUTPUT): $(OBJS) $(EXTRADEPS) |
@@ -68,7 +77,7 @@ $(TARGET_DIR)libmkmpiobooti386.a: | |||
68 | 77 | ||
69 | $(TARGET_DIR)libmkmpiobootppc.a: | 78 | $(TARGET_DIR)libmkmpiobootppc.a: |
70 | make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) libmkmpiobootppc.a | 79 | make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) libmkmpiobootppc.a |
71 | endif | 80 | endif |
72 | 81 | ||
73 | libmkmpioboot-universal: $(TARGET_DIR)libmkmpiobooti386.a $(TARGET_DIR)libmkmpiobootppc.a | 82 | libmkmpioboot-universal: $(TARGET_DIR)libmkmpiobooti386.a $(TARGET_DIR)libmkmpiobootppc.a |
74 | @echo lipo $(TARGET_DIR)libmkmpioboot.a | 83 | @echo lipo $(TARGET_DIR)libmkmpioboot.a |
diff --git a/rbutil/mktccboot/Makefile b/rbutil/mktccboot/Makefile index 7a7acf87b7..b01f25dc3d 100644 --- a/rbutil/mktccboot/Makefile +++ b/rbutil/mktccboot/Makefile | |||
@@ -34,29 +34,34 @@ ifdef RBARCH | |||
34 | CFLAGS += -arch $(RBARCH) | 34 | CFLAGS += -arch $(RBARCH) |
35 | endif | 35 | endif |
36 | 36 | ||
37 | OUT = $(TARGET_DIR)build$(RBARCH) | 37 | TARGET_DIR ?= $(shell pwd)/ |
38 | OBJDIR = $(TARGET_DIR)build$(RBARCH) | ||
38 | 39 | ||
39 | all: $(OUTPUT) | 40 | all: $(OUTPUT) |
40 | 41 | ||
41 | # inputs | 42 | # inputs |
42 | LIBSOURCES := mktccboot.c $(TOOLSDIR)/telechips.o | 43 | LIBSOURCES := mktccboot.c $(TOOLSDIR)/telechips.o |
43 | SOURCES := $(LIBSOURCES) main.c | 44 | SOURCES := $(LIBSOURCES) main.c |
44 | OBJS := $(patsubst %.c,%.o,$(addprefix $(OUT)/,$(notdir $(SOURCES)))) | 45 | OBJS := $(patsubst %.c,%.o,$(addprefix $(OBJDIR)/,$(notdir $(SOURCES)))) |
45 | LIBOBJS := $(patsubst %.c,%.o,$(addprefix $(OUT)/,$(notdir $(LIBSOURCES)))) | 46 | LIBOBJS := $(patsubst %.c,%.o,$(addprefix $(OBJDIR)/,$(notdir $(LIBSOURCES)))) |
46 | EXTRADEPS := | 47 | EXTRADEPS := |
47 | 48 | ||
48 | # rule for sources from tools dir | 49 | # rule for sources from tools dir |
49 | $(OUT)/%.o: $(TOOLSDIR)/%.c $(OUT) | 50 | $(OBJDIR)/%.o: $(TOOLSDIR)/%.c |
50 | @echo CC $< | 51 | @echo CC $< |
52 | $(SILENT)mkdir -p $(dir $@) | ||
51 | $(SILENT)$(CC) $(CFLAGS) -c -o $@ $< | 53 | $(SILENT)$(CC) $(CFLAGS) -c -o $@ $< |
52 | 54 | ||
53 | $(OUT)/%.o: %.c $(OUT) | 55 | $(OBJDIR)/%.o: %.c |
54 | @echo CC $< | 56 | @echo CC $< |
57 | $(SILENT)mkdir -p $(dir $@) | ||
55 | $(SILENT)$(CC) $(CFLAGS) -c -o $@ $< | 58 | $(SILENT)$(CC) $(CFLAGS) -c -o $@ $< |
56 | 59 | ||
57 | libmktccboot$(RBARCH).a: $(LIBOBJS) | 60 | libmktccboot$(RBARCH).a: $(TARGET_DIR)libmktccboot$(RBARCH).a |
58 | @echo AR $@ | 61 | |
59 | $(SILENT)$(AR) rucs $(TARGET_DIR)$@ $^ | 62 | $(TARGET_DIR)libmktccboot$(RBARCH).a: $(LIBOBJS) |
63 | @echo AR $(notdir $@) | ||
64 | $(SILENT)$(AR) rucs $@ $^ | ||
60 | 65 | ||
61 | # building the standalone executable | 66 | # building the standalone executable |
62 | $(OUTPUT): $(OBJS) $(EXTRADEPS) | 67 | $(OUTPUT): $(OBJS) $(EXTRADEPS) |
@@ -70,16 +75,16 @@ $(TARGET_DIR)libmktccbooti386.a: | |||
70 | 75 | ||
71 | $(TARGET_DIR)libmktccbootppc.a: | 76 | $(TARGET_DIR)libmktccbootppc.a: |
72 | make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) libmktccbootppc.a | 77 | make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) libmktccbootppc.a |
73 | endif | 78 | endif |
74 | 79 | ||
75 | libmktccboot-universal: $(TARGET_DIR)libmktccbooti386.a $(TARGET_DIR)libmktccbootppc.a | 80 | libmktccboot-universal: $(TARGET_DIR)libmktccbooti386.a $(TARGET_DIR)libmktccbootppc.a |
76 | @echo lipo $(TARGET_DIR)libmktccboot.a | 81 | @echo lipo $(TARGET_DIR)libmktccboot.a |
77 | $(SILENT) rm -f $(TARGET_DIR)libmktccboot.a | 82 | $(SILENT) rm -f $(TARGET_DIR)libmktccboot.a |
78 | $(SILENT)lipo -create $(TARGET_DIR)libmktccbootppc.a $(TARGET_DIR)libmktccbooti386.a -output $(TARGET_DIR)libmktccboot.a | 83 | $(SILENT)lipo -create $(TARGET_DIR)libmktccbootppc.a $(TARGET_DIR)libmktccbooti386.a -output $(TARGET_DIR)libmktccboot.a |
79 | 84 | ||
80 | clean: | 85 | clean: |
81 | rm -f $(OUTPUT) $(TARGET_DIR)libmktccboot*.a mktccboot.dmg | 86 | rm -f $(OUTPUT) $(TARGET_DIR)libmktccboot*.a mktccboot.dmg |
82 | rm -rf $(OUT) | 87 | rm -rf $(OBJDIR) |
83 | 88 | ||
84 | mktccboot-i386: | 89 | mktccboot-i386: |
85 | $(MAKE) RBARCH=i386 | 90 | $(MAKE) RBARCH=i386 |
@@ -96,8 +101,5 @@ mktccboot.dmg: mktccboot-mac | |||
96 | mkdir -p mktccboot-dmg | 101 | mkdir -p mktccboot-dmg |
97 | cp -p mktccboot-mac mktccboot-dmg | 102 | cp -p mktccboot-mac mktccboot-dmg |
98 | hdiutil create -srcfolder mktccboot-dmg mktccboot.dmg | 103 | hdiutil create -srcfolder mktccboot-dmg mktccboot.dmg |
99 | 104 | ||
100 | $(OUT): | ||
101 | @echo MKDIR $(OUT) | ||
102 | $(SILENT)mkdir $(OUT) | ||
103 | 105 | ||
diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro index 6954a19e0f..64a5ed7f89 100644 --- a/rbutil/rbutilqt/rbutilqt.pro +++ b/rbutil/rbutilqt/rbutilqt.pro | |||
@@ -70,25 +70,25 @@ mac { | |||
70 | # here. This assumes that QMAKE_CC will always be "gcc", maybe with a postfix. | 70 | # here. This assumes that QMAKE_CC will always be "gcc", maybe with a postfix. |
71 | MYAR = $$replace(QMAKE_CC,gcc.*,ar) | 71 | MYAR = $$replace(QMAKE_CC,gcc.*,ar) |
72 | 72 | ||
73 | rbspeex.commands = @$(MAKE) \ | 73 | rbspeex.commands = @$(MAKE) -s \ |
74 | TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/rbspeex \ | 74 | TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/rbspeex \ |
75 | librbspeex$$RBLIBPOSTFIX \ | 75 | librbspeex$$RBLIBPOSTFIX \ |
76 | SYS_SPEEX=\"$$LIBSPEEX\" \ | 76 | SYS_SPEEX=\"$$LIBSPEEX\" \ |
77 | CC=\"$$QMAKE_CC\" AR=\"$$MYAR\" | 77 | CC=\"$$QMAKE_CC\" AR=\"$$MYAR\" |
78 | libucl.commands = @$(MAKE) \ | 78 | libucl.commands = @$(MAKE) -s \ |
79 | TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/ucl/src \ | 79 | TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/ucl/src \ |
80 | libucl$$RBLIBPOSTFIX \ | 80 | libucl$$RBLIBPOSTFIX \ |
81 | CC=\"$$QMAKE_CC\" AR=\"$$MYAR\" | 81 | CC=\"$$QMAKE_CC\" AR=\"$$MYAR\" |
82 | libmkamsboot.commands = @$(MAKE) \ | 82 | libmkamsboot.commands = @$(MAKE) -s \ |
83 | TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkamsboot \ | 83 | TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkamsboot \ |
84 | APPVERSION=\"rbutil\" \ | 84 | APPVERSION=\"rbutil\" \ |
85 | libmkamsboot$$RBLIBPOSTFIX \ | 85 | libmkamsboot$$RBLIBPOSTFIX \ |
86 | CC=\"$$QMAKE_CC\" AR=\"$$MYAR\" | 86 | CC=\"$$QMAKE_CC\" AR=\"$$MYAR\" |
87 | libmktccboot.commands = @$(MAKE) \ | 87 | libmktccboot.commands = @$(MAKE) -s \ |
88 | TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mktccboot \ | 88 | TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mktccboot \ |
89 | libmktccboot$$RBLIBPOSTFIX \ | 89 | libmktccboot$$RBLIBPOSTFIX \ |
90 | CC=\"$$QMAKE_CC\" AR=\"$$MYAR\" | 90 | CC=\"$$QMAKE_CC\" AR=\"$$MYAR\" |
91 | libmkmpioboot.commands = @$(MAKE) \ | 91 | libmkmpioboot.commands = @$(MAKE) -s \ |
92 | TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkmpioboot \ | 92 | TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkmpioboot \ |
93 | APPVERSION=\"rbutil\" \ | 93 | APPVERSION=\"rbutil\" \ |
94 | libmkmpioboot$$RBLIBPOSTFIX \ | 94 | libmkmpioboot$$RBLIBPOSTFIX \ |
diff --git a/tools/ucl/src/Makefile b/tools/ucl/src/Makefile index 01fb66f513..33972bb617 100644 --- a/tools/ucl/src/Makefile +++ b/tools/ucl/src/Makefile | |||
@@ -17,25 +17,29 @@ CFLAGS += -arch $(RBARCH) | |||
17 | endif | 17 | endif |
18 | 18 | ||
19 | 19 | ||
20 | OUT = $(TARGET_DIR)build$(RBARCH) | 20 | TARGET_DIR ?= $(shell pwd) |
21 | OBJDIR = $(TARGET_DIR)build$(RBARCH) | ||
21 | 22 | ||
22 | SOURCES = alloc.c io.c n2b_99.c n2b_d.c n2b_ds.c n2b_to.c n2d_99.c \ | 23 | SOURCES = alloc.c io.c n2b_99.c n2b_d.c n2b_ds.c n2b_to.c n2d_99.c \ |
23 | n2d_d.c n2d_ds.c n2d_to.c n2e_99.c n2e_d.c n2e_ds.c n2e_to.c ucl_crc.c \ | 24 | n2d_d.c n2d_ds.c n2d_to.c n2e_99.c n2e_d.c n2e_ds.c n2e_to.c ucl_crc.c \ |
24 | ucl_init.c ucl_ptr.c ucl_str.c ucl_util.c #ucl_dll.c | 25 | ucl_init.c ucl_ptr.c ucl_str.c ucl_util.c #ucl_dll.c |
25 | 26 | ||
26 | OBJS = $(addprefix $(OUT)/,$(SOURCES:%.c=%.o)) | 27 | OBJS = $(addprefix $(OBJDIR)/,$(SOURCES:%.c=%.o)) |
27 | 28 | ||
28 | # This Makefile is _not_ used to build uclpack for Rockbox builds anymore (they | 29 | # This Makefile is _not_ used to build uclpack for Rockbox builds anymore (they |
29 | # use tools.make), so we can use $(CC) and $(AR) here. | 30 | # use tools.make), so we can use $(CC) and $(AR) here. |
30 | 31 | ||
31 | libucl$(RBARCH).a: $(OUT) $(OBJS) | 32 | libucl$(RBARCH).a: $(TARGET_DIR)libucl$(RBARCH).a |
32 | @echo AR $@ | ||
33 | $(SILENT)$(AR) rucs $(TARGET_DIR)$@ $(OBJS) >/dev/null 2>&1 | ||
34 | 33 | ||
35 | $(OUT)/%.o: %.c | 34 | $(TARGET_DIR)libucl$(RBARCH).a: $(OBJS) |
35 | @echo AR $(notdir $@) | ||
36 | $(SILENT)$(AR) rucs $@ $(OBJS) >/dev/null 2>&1 | ||
37 | |||
38 | $(OBJDIR)/%.o: %.c | ||
36 | @echo CC $< | 39 | @echo CC $< |
40 | $(SILENT)mkdir -p $(dir $@) | ||
37 | $(SILENT)$(CC) $(CFLAGS) -c $< -o $@ | 41 | $(SILENT)$(CC) $(CFLAGS) -c $< -o $@ |
38 | 42 | ||
39 | # some trickery to build ppc and i386 from a single call | 43 | # some trickery to build ppc and i386 from a single call |
40 | ifeq ($(RBARCH),) | 44 | ifeq ($(RBARCH),) |
41 | $(TARGET_DIR)libucli386.a: | 45 | $(TARGET_DIR)libucli386.a: |
@@ -43,18 +47,14 @@ $(TARGET_DIR)libucli386.a: | |||
43 | 47 | ||
44 | $(TARGET_DIR)libuclppc.a: | 48 | $(TARGET_DIR)libuclppc.a: |
45 | make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) libuclppc.a | 49 | make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) libuclppc.a |
46 | endif | 50 | endif |
47 | 51 | ||
48 | libucl-universal: $(TARGET_DIR)libucli386.a $(TARGET_DIR)libuclppc.a | 52 | libucl-universal: $(TARGET_DIR)libucli386.a $(TARGET_DIR)libuclppc.a |
49 | @echo lipo $(TARGET_DIR)libucl.a | 53 | @echo lipo $(TARGET_DIR)libucl.a |
50 | $(SILENT) rm -f $(TARGET_DIR)libucl.a | 54 | $(SILENT) rm -f $(TARGET_DIR)libucl.a |
51 | $(SILENT)lipo -create $(TARGET_DIR)libuclppc.a $(TARGET_DIR)libucli386.a -output $(TARGET_DIR)libucl.a | 55 | $(SILENT)lipo -create $(TARGET_DIR)libuclppc.a $(TARGET_DIR)libucli386.a -output $(TARGET_DIR)libucl.a |
52 | 56 | ||
53 | clean: | 57 | clean: |
54 | rm -f $(TARGET_DIR)libucl*.a | 58 | rm -f $(TARGET_DIR)libucl*.a |
55 | rm -rf build* | 59 | rm -rf build* |
56 | 60 | ||
57 | $(OUT): | ||
58 | @echo MKDIR $(OUT) | ||
59 | $(SILENT)mkdir -p $(OUT) | ||
60 | |||