aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordavilla <davilla@svn>2010-06-17 07:10:12 +0000
committerdavilla <davilla@svn>2010-06-17 07:10:12 +0000
commita1a98000bca8b8862ec1f3bc1196e68536244e32 (patch)
treedf50618e31e59c612d38a28d647133d107954875 /lib
parentfa04bfa19b035d0b9d71bb5e94f8bd37e488e7d1 (diff)
add makefile dl/build of librtmp
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@31133 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'lib')
-rw-r--r--lib/librtmp/Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/lib/librtmp/Makefile b/lib/librtmp/Makefile
new file mode 100644
index 0000000000..ef2376251a
--- /dev/null
+++ b/lib/librtmp/Makefile
@@ -0,0 +1,49 @@
+#
+# rtmpdump build script.
+# Usage:
+# make
+#
+
+RTMPDUMP_VERS = 509
+# get OS type from shell
+OSTYPE = $(shell uname)
+
+ifeq ($(OSTYPE),Darwin)
+XCFLAGS=-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
+ -fPIC -I /opt/local/include
+XLDFLAGS=-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
+ -bundle -flat_namespace -undefined suppress -arch i386 -L/opt/local/lib \
+ -lpthread -lssl -lcrypto -lz
+else
+XCFLAGS=-fPIC -DPIC
+XLDFLAGS=-shared -fPIC -rdynamic -lpthread -lssl -lcrypto -lz
+endif
+
+LIBRTMP = librtmp/librtmp.a
+
+all:: librtmp.so
+
+librtmp.so: $(LIBRTMP)
+ mkdir -p includes
+ cp -f librtmp/amf.h includes/
+ cp -f librtmp/log.h includes/
+ cp -f librtmp/rtmp.h includes/
+ifeq ($(OSTYPE),Darwin)
+ $(CC) $(XLDFLAGS) -o $@ -Wl,-all_load $<
+else
+ $(CC) $(XLDFLAGS) -o $@ -Wl,--whole-archive $< -Wl,--no-whole-archive
+endif
+
+$(LIBRTMP): librtmp/Makefile
+ make SYS=posix XCFLAGS="$(XCFLAGS)" XLDFLAGS="$(XLDFLAGS)" -C librtmp
+
+librtmp/Makefile:
+ svn export --revision $(RTMPDUMP_VERS) svn://svn.mplayerhq.hu/rtmpdump/trunk/librtmp librtmp
+
+clean:
+ rm -f librtmp.so
+ rm -rf includes
+ make -C librtmp clean
+
+distclean::
+ rm -rf librtmp.so includes librtmp