summaryrefslogtreecommitdiffstats
path: root/src/libbluray.mk
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2014-03-09 02:31:30 (GMT)
committerTony Theodore <tonyt@logyst.com>2014-03-09 02:31:30 (GMT)
commit471cc8cb13ef5ba865647b7d9e79c318cf434cce (patch)
treea9c4fae4fcb430bfaae0dbd760f598e5f6949cd1 /src/libbluray.mk
parent2927f7472fa89e64ff93cdf4ef7854731ad0e92f (diff)
downloadmxe-471cc8cb13ef5ba865647b7d9e79c318cf434cce.zip
mxe-471cc8cb13ef5ba865647b7d9e79c318cf434cce.tar.gz
mxe-471cc8cb13ef5ba865647b7d9e79c318cf434cce.tar.bz2
package libbluray: fix shared build and add test program
Diffstat (limited to 'src/libbluray.mk')
-rw-r--r--src/libbluray.mk19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/libbluray.mk b/src/libbluray.mk
index d5fdf52..bc8c572 100644
--- a/src/libbluray.mk
+++ b/src/libbluray.mk
@@ -18,21 +18,16 @@ endef
define $(PKG)_BUILD
cd '$(1)' && ./configure \
- --host='$(TARGET)' \
- --build="`config.guess`" \
- --prefix='$(PREFIX)/$(TARGET)' \
- --disable-shared \
+ $(MXE_CONFIGURE_OPTS) \
--disable-examples \
--with-freetype \
--with-libxml2 \
--disable-bdjava
- $(MAKE) -C '$(1)' -j '$(JOBS)'
-
- # Since libbluray doesn't export its symbols, we can't create a shared
- # build on Windows. So we mangle the pkg-config to fool ffmpegs detection
- # to work... In a static build, this fixes transitive dependencies of xml2
- # and freetype...
- $(SED) -i '/Libs:/ s,$$, -lxml2 -lfreetype,; s,^Libs.private:.*$$,Requires.private: libxml-2.0 freetype2,' '$(1)/src/libbluray.pc'
-
+ $(MAKE) -C '$(1)' -j '$(JOBS)' LDFLAGS='-no-undefined'
$(MAKE) -C '$(1)' -j 1 install
+
+ '$(TARGET)-gcc' \
+ -W -Wall -Werror -ansi -pedantic \
+ '$(1)/src/examples/sound_dump.c' -o '$(PREFIX)/$(TARGET)/bin/test-libbluray.exe' \
+ `'$(TARGET)-pkg-config' libbluray --cflags --libs`
endef