summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbutilqt.pro
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/rbutilqt/rbutilqt.pro
parent7f6c271badb6ff0620a978b876ea0bcea090a24c (diff)
downloadrockbox-e1b1183f401974700a67db76f39e2bba9a5984e1.tar.gz
rockbox-e1b1183f401974700a67db76f39e2bba9a5984e1.tar.bz2
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/rbutilqt/rbutilqt.pro')
-rw-r--r--rbutil/rbutilqt/rbutilqt.pro25
1 files changed, 13 insertions, 12 deletions
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 {
!static:unix:!mac {
LIBSPEEX = $$system(pkg-config --silence-errors --libs speex speexdsp)
}
+# The external Makefiles use ar to create libs. To allow cross-compiling pass
+# the ar that matches the current gcc. Since qmake doesn't provide a variable
+# holding the correct ar without any additions we need to figure it ourselves
+# here. This assumes that QMAKE_CC will always be "gcc", maybe with a postfix.
+MYAR = $$replace(QMAKE_CC,gcc.*,ar)
rbspeex.commands = @$(MAKE) \
TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/rbspeex \
librbspeex$$RBLIBPOSTFIX \
- CC=\"$$QMAKE_CC\" \
- SYS_SPEEX=\"$$LIBSPEEX\"
+ SYS_SPEEX=\"$$LIBSPEEX\" \
+ CC=\"$$QMAKE_CC\" AR=\"$$MYAR\"
libucl.commands = @$(MAKE) \
TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/ucl/src \
libucl$$RBLIBPOSTFIX \
- CC=\"$$QMAKE_CC\"
+ CC=\"$$QMAKE_CC\" AR=\"$$MYAR\"
libmkamsboot.commands = @$(MAKE) \
TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkamsboot \
APPVERSION=\"rbutil\" \
libmkamsboot$$RBLIBPOSTFIX \
- CC=\"$$QMAKE_CC\"
+ CC=\"$$QMAKE_CC\" AR=\"$$MYAR\"
libmktccboot.commands = @$(MAKE) \
TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mktccboot \
libmktccboot$$RBLIBPOSTFIX \
- CC=\"$$QMAKE_CC\"
+ CC=\"$$QMAKE_CC\" AR=\"$$MYAR\"
libmkmpioboot.commands = @$(MAKE) \
TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/rbutil/mkmpioboot \
APPVERSION=\"rbutil\" \
libmkmpioboot$$RBLIBPOSTFIX \
- CC=\"$$QMAKE_CC\"
+ CC=\"$$QMAKE_CC\" AR=\"$$MYAR\"
QMAKE_EXTRA_TARGETS += rbspeex libucl libmkamsboot libmktccboot libmkmpioboot
PRE_TARGETDEPS += rbspeex libucl libmkamsboot libmktccboot libmkmpioboot
@@ -111,7 +116,7 @@ INCLUDEPATH += $$RBBASE_DIR/rbutil/ipodpatcher $$RBBASE_DIR/rbutil/sansapatcher
DEPENDPATH = $$INCLUDEPATH
-LIBS += -L$$OUT_PWD -L$$MYBUILDDIR -lrbspeex -lmkamsboot -lmktccboot -lmkmpioboot -lucl
+LIBS += -L$$OUT_PWD -L$$MYBUILDDIR -lrbspeex -lmkamsboot -lmktccboot -lmkmpioboot -lucl -lz
# Add a (possibly found) libspeex now, don't do this before -lrbspeex!
!static:!isEmpty(LIBSPEEX) {
@@ -152,10 +157,6 @@ unix:!static:libusb1:!macx {
DEFINES += LIBUSB1
LIBS += -lusb-1.0
}
-unix {
- # explicitly link zlib, we do need it. Don't rely on implicit linking via Qt.
- LIBS += -lz
-}
unix:!macx:static {
# force statically linking of libusb. Libraries that are appended
@@ -177,7 +178,7 @@ macx:intel {
}
macx {
CONFIG += x86
- LIBS += -L/usr/local/lib -lz \
+ LIBS += -L/usr/local/lib \
-framework IOKit -framework CoreFoundation -framework Carbon \
-framework SystemConfiguration -framework CoreServices
INCLUDEPATH += /usr/local/include