summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2010-12-23 18:59:58 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2010-12-23 18:59:58 +0000
commite1b1183f401974700a67db76f39e2bba9a5984e1 (patch)
tree95c145de01d23ebf4a77c8c69ef30eda8c6793f8 /rbutil
parent7f6c271badb6ff0620a978b876ea0bcea090a24c (diff)
downloadrockbox-e1b1183f401974700a67db76f39e2bba9a5984e1.tar.gz
rockbox-e1b1183f401974700a67db76f39e2bba9a5984e1.zip
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
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/mkamsboot/Makefile2
-rw-r--r--rbutil/mkmpioboot/Makefile2
-rw-r--r--rbutil/mktccboot/Makefile2
-rw-r--r--rbutil/rbutilqt/rbutilqt.pro25
4 files changed, 16 insertions, 15 deletions
diff --git a/rbutil/mkamsboot/Makefile b/rbutil/mkamsboot/Makefile
index 0a9ab3b4e7..a76259794e 100644
--- a/rbutil/mkamsboot/Makefile
+++ b/rbutil/mkamsboot/Makefile
@@ -60,7 +60,7 @@ $(OBJDIR)%.o: %.c
60 60
61libmkamsboot$(RBARCH).a: $(LIBOBJS) 61libmkamsboot$(RBARCH).a: $(LIBOBJS)
62 @echo AR $@ 62 @echo AR $@
63 $(SILENT)$(AR) ruc $(TARGET_DIR)$@ $^ 63 $(SILENT)$(AR) rucs $(TARGET_DIR)$@ $^
64 64
65# building the standalone executable 65# building the standalone executable
66$(OUTPUT): $(OBJS) $(EXTRADEPS) 66$(OUTPUT): $(OBJS) $(EXTRADEPS)
diff --git a/rbutil/mkmpioboot/Makefile b/rbutil/mkmpioboot/Makefile
index 7ba7c41a1f..5e138b6f12 100644
--- a/rbutil/mkmpioboot/Makefile
+++ b/rbutil/mkmpioboot/Makefile
@@ -54,7 +54,7 @@ $(OBJDIR)%.o: %.c
54 54
55libmkmpioboot$(RBARCH).a: $(LIBOBJS) 55libmkmpioboot$(RBARCH).a: $(LIBOBJS)
56 @echo AR $@ 56 @echo AR $@
57 $(SILENT)$(AR) ruc $(TARGET_DIR)$@ $^ 57 $(SILENT)$(AR) rucs $(TARGET_DIR)$@ $^
58 58
59# building the standalone executable 59# building the standalone executable
60$(OUTPUT): $(OBJS) $(EXTRADEPS) 60$(OUTPUT): $(OBJS) $(EXTRADEPS)
diff --git a/rbutil/mktccboot/Makefile b/rbutil/mktccboot/Makefile
index 1b8ff5b349..7a7acf87b7 100644
--- a/rbutil/mktccboot/Makefile
+++ b/rbutil/mktccboot/Makefile
@@ -56,7 +56,7 @@ $(OUT)/%.o: %.c $(OUT)
56 56
57libmktccboot$(RBARCH).a: $(LIBOBJS) 57libmktccboot$(RBARCH).a: $(LIBOBJS)
58 @echo AR $@ 58 @echo AR $@
59 $(SILENT)$(AR) ruc $(TARGET_DIR)$@ $^ 59 $(SILENT)$(AR) rucs $(TARGET_DIR)$@ $^
60 60
61# building the standalone executable 61# building the standalone executable
62$(OUTPUT): $(OBJS) $(EXTRADEPS) 62$(OUTPUT): $(OBJS) $(EXTRADEPS)
diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro
index 56be36d9fc..ca7214989c 100644
--- a/rbutil/rbutilqt/rbutilqt.pro
+++ b/rbutil/rbutilqt/rbutilqt.pro
@@ -64,30 +64,35 @@ mac {
64!static:unix:!mac { 64!static:unix:!mac {
65 LIBSPEEX = $$system(pkg-config --silence-errors --libs speex speexdsp) 65 LIBSPEEX = $$system(pkg-config --silence-errors --libs speex speexdsp)
66} 66}
67# The external Makefiles use ar to create libs. To allow cross-compiling pass
68# the ar that matches the current gcc. Since qmake doesn't provide a variable
69# holding the correct ar without any additions we need to figure it ourselves
70# here. This assumes that QMAKE_CC will always be "gcc", maybe with a postfix.
71MYAR = $$replace(QMAKE_CC,gcc.*,ar)
67 72
68rbspeex.commands = @$(MAKE) \ 73rbspeex.commands = @$(MAKE) \
69 TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/rbspeex \ 74 TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/rbspeex \
70 librbspeex$$RBLIBPOSTFIX \ 75 librbspeex$$RBLIBPOSTFIX \
71 CC=\"$$QMAKE_CC\" \ 76 SYS_SPEEX=\"$$LIBSPEEX\" \
72 SYS_SPEEX=\"$$LIBSPEEX\" 77 CC=\"$$QMAKE_CC\" AR=\"$$MYAR\"
73libucl.commands = @$(MAKE) \ 78libucl.commands = @$(MAKE) \
74 TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/ucl/src \ 79 TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/ucl/src \
75 libucl$$RBLIBPOSTFIX \ 80 libucl$$RBLIBPOSTFIX \
76 CC=\"$$QMAKE_CC\" 81 CC=\"$$QMAKE_CC\" AR=\"$$MYAR\"
77libmkamsboot.commands = @$(MAKE) \ 82libmkamsboot.commands = @$(MAKE) \
78 TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkamsboot \ 83 TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkamsboot \
79 APPVERSION=\"rbutil\" \ 84 APPVERSION=\"rbutil\" \
80 libmkamsboot$$RBLIBPOSTFIX \ 85 libmkamsboot$$RBLIBPOSTFIX \
81 CC=\"$$QMAKE_CC\" 86 CC=\"$$QMAKE_CC\" AR=\"$$MYAR\"
82libmktccboot.commands = @$(MAKE) \ 87libmktccboot.commands = @$(MAKE) \
83 TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mktccboot \ 88 TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mktccboot \
84 libmktccboot$$RBLIBPOSTFIX \ 89 libmktccboot$$RBLIBPOSTFIX \
85 CC=\"$$QMAKE_CC\" 90 CC=\"$$QMAKE_CC\" AR=\"$$MYAR\"
86libmkmpioboot.commands = @$(MAKE) \ 91libmkmpioboot.commands = @$(MAKE) \
87 TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkmpioboot \ 92 TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkmpioboot \
88 APPVERSION=\"rbutil\" \ 93 APPVERSION=\"rbutil\" \
89 libmkmpioboot$$RBLIBPOSTFIX \ 94 libmkmpioboot$$RBLIBPOSTFIX \
90 CC=\"$$QMAKE_CC\" 95 CC=\"$$QMAKE_CC\" AR=\"$$MYAR\"
91QMAKE_EXTRA_TARGETS += rbspeex libucl libmkamsboot libmktccboot libmkmpioboot 96QMAKE_EXTRA_TARGETS += rbspeex libucl libmkamsboot libmktccboot libmkmpioboot
92PRE_TARGETDEPS += rbspeex libucl libmkamsboot libmktccboot libmkmpioboot 97PRE_TARGETDEPS += rbspeex libucl libmkamsboot libmktccboot libmkmpioboot
93 98
@@ -111,7 +116,7 @@ INCLUDEPATH += $$RBBASE_DIR/rbutil/ipodpatcher $$RBBASE_DIR/rbutil/sansapatcher
111 116
112DEPENDPATH = $$INCLUDEPATH 117DEPENDPATH = $$INCLUDEPATH
113 118
114LIBS += -L$$OUT_PWD -L$$MYBUILDDIR -lrbspeex -lmkamsboot -lmktccboot -lmkmpioboot -lucl 119LIBS += -L$$OUT_PWD -L$$MYBUILDDIR -lrbspeex -lmkamsboot -lmktccboot -lmkmpioboot -lucl -lz
115 120
116# Add a (possibly found) libspeex now, don't do this before -lrbspeex! 121# Add a (possibly found) libspeex now, don't do this before -lrbspeex!
117!static:!isEmpty(LIBSPEEX) { 122!static:!isEmpty(LIBSPEEX) {
@@ -152,10 +157,6 @@ unix:!static:libusb1:!macx {
152 DEFINES += LIBUSB1 157 DEFINES += LIBUSB1
153 LIBS += -lusb-1.0 158 LIBS += -lusb-1.0
154} 159}
155unix {
156 # explicitly link zlib, we do need it. Don't rely on implicit linking via Qt.
157 LIBS += -lz
158}
159 160
160unix:!macx:static { 161unix:!macx:static {
161 # force statically linking of libusb. Libraries that are appended 162 # force statically linking of libusb. Libraries that are appended
@@ -177,7 +178,7 @@ macx:intel {
177} 178}
178macx { 179macx {
179 CONFIG += x86 180 CONFIG += x86
180 LIBS += -L/usr/local/lib -lz \ 181 LIBS += -L/usr/local/lib \
181 -framework IOKit -framework CoreFoundation -framework Carbon \ 182 -framework IOKit -framework CoreFoundation -framework Carbon \
182 -framework SystemConfiguration -framework CoreServices 183 -framework SystemConfiguration -framework CoreServices
183 INCLUDEPATH += /usr/local/include 184 INCLUDEPATH += /usr/local/include