summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2010-09-05 10:27:39 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2010-09-05 10:27:39 +0000
commitd71d537b17f8a3cf385a6523b4d22458831a4afe (patch)
tree166d3d4ec34163848031c9483d62bb25ecae8e69
parentdbde63bfecc54b9d6402c81bf2bb32b78ec64d08 (diff)
downloadrockbox-d71d537b17f8a3cf385a6523b4d22458831a4afe.tar.gz
rockbox-d71d537b17f8a3cf385a6523b4d22458831a4afe.zip
Don't search for libspeex on Windows and Mac.
Make sure to not try to dynamically link libspeex on Mac, since it's not a standard library, and application bundles aren't statically linked anyway. Remove looking up libspeex on Windows since it's not a standard library there either. Don't search for libspeex multiple times but instead pass it to the librbspeex Makefile. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27999 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--rbutil/rbutilqt/rbutilqt.pro25
-rw-r--r--tools/rbspeex/Makefile2
2 files changed, 18 insertions, 9 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro
index 16d7144729..ec440ab199 100644
--- a/rbutil/rbutilqt/rbutilqt.pro
+++ b/rbutil/rbutilqt/rbutilqt.pro
@@ -51,9 +51,24 @@ message("Rockbox Base dir: "$$RBBASE_DIR)
51mac { 51mac {
52 RBLIBPOSTFIX = -universal 52 RBLIBPOSTFIX = -universal
53} 53}
54# check for system speex. Add a custom rule for pre-building librbspeex if not
55# found. Newer versions of speex are split up into libspeex and libspeexdsp,
56# and some distributions package them separately. Check for both and fall back
57# to librbspeex if not found.
58# NOTE: keep adding the linker option after -lrbspeex, otherwise linker errors
59# occur if the linker defaults to --as-needed
60# (see http://www.gentoo.org/proj/en/qa/asneeded.xml)
61#
62# Always use our own copy when building statically. Don't search for libspeex
63# on Mac, since we don't deploy statically there.
64!static:unix:!mac {
65 LIBSPEEX = $$system(pkg-config --silence-errors --libs speex speexdsp)
66}
67
54rbspeex.commands = @$(MAKE) \ 68rbspeex.commands = @$(MAKE) \
55 TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/rbspeex \ 69 TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/rbspeex \
56 librbspeex$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\" 70 librbspeex$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\" \
71 SYS_SPEEX=\"$$LIBSPEEX\"
57libucl.commands = @$(MAKE) \ 72libucl.commands = @$(MAKE) \
58 TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/ucl/src \ 73 TARGET_DIR=$$MYBUILDDIR -C $$RBBASE_DIR/tools/ucl/src \
59 libucl$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\" 74 libucl$$RBLIBPOSTFIX CC=\"$$QMAKE_CC\"
@@ -91,13 +106,7 @@ DEPENDPATH = $$INCLUDEPATH
91 106
92LIBS += -L$$OUT_PWD -L$$MYBUILDDIR -lrbspeex -lmkamsboot -lmktccboot -lmkmpioboot -lucl 107LIBS += -L$$OUT_PWD -L$$MYBUILDDIR -lrbspeex -lmkamsboot -lmktccboot -lmkmpioboot -lucl
93 108
94# check for system speex. Add a custom rule for pre-building librbspeex if not 109# Add a (possibly found) libspeex now, don't do this before -lrbspeex!
95# found. Newer versions of speex are split up into libspeex and libspeexdsp,
96# and some distributions package them separately. Check for both and fall back
97# to librbspeex if not found.
98# NOTE: keep this after -lrbspeex, otherwise linker errors occur if the linker
99# defaults to --as-needed (see http://www.gentoo.org/proj/en/qa/asneeded.xml)
100LIBSPEEX = $$system(pkg-config --silence-errors --libs speex speexdsp)
101!static:!isEmpty(LIBSPEEX) { 110!static:!isEmpty(LIBSPEEX) {
102 LIBS += $$LIBSPEEX 111 LIBS += $$LIBSPEEX
103} 112}
diff --git a/tools/rbspeex/Makefile b/tools/rbspeex/Makefile
index 267ef8d6d7..2fb1c4dc00 100644
--- a/tools/rbspeex/Makefile
+++ b/tools/rbspeex/Makefile
@@ -29,7 +29,7 @@ endif
29 29
30# don't try to use the systems libspeex when building a static binary. 30# don't try to use the systems libspeex when building a static binary.
31ifndef STATIC 31ifndef STATIC
32SYS_SPEEX = $(shell pkg-config --silence-errors --libs speex speexdsp) 32SYS_SPEEX ?= $(shell pkg-config --silence-errors --libs speex speexdsp)
33endif 33endif
34 34
35# fall back to our own librbspeex if no suitable found. 35# fall back to our own librbspeex if no suitable found.