aboutsummaryrefslogtreecommitdiff
path: root/lib/librtmp/Makefile
diff options
context:
space:
mode:
authordavilla <davilla@svn>2010-07-07 19:18:27 +0000
committerdavilla <davilla@svn>2010-07-07 19:18:27 +0000
commit4abb2f38d1f85eb0850a8939bbd978bcfdc8196c (patch)
tree15a2f5d64cee48174547823f9ac7df43d35618c8 /lib/librtmp/Makefile
parent483ed5d395d0885c6bd6c04c15cc599bb2783749 (diff)
[osx] update librtmp to rel-2.3
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@31652 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'lib/librtmp/Makefile')
-rw-r--r--lib/librtmp/Makefile64
1 files changed, 23 insertions, 41 deletions
diff --git a/lib/librtmp/Makefile b/lib/librtmp/Makefile
index e6f1065f88..5ef9b31309 100644
--- a/lib/librtmp/Makefile
+++ b/lib/librtmp/Makefile
@@ -1,5 +1,5 @@
#
-# rtmpdump build script.
+# rtmpdump build script for OSX darwin.
#
# A quick and dirty Makefile to download/build and install librtmp
#
@@ -7,66 +7,48 @@
# 10.4u.sdk is targeted so we can run on the AppleTV. Macports is assumed to
# be used and the required lib depends installed.
#
-# Linux: builds a simple.so without the proper .so version symlinks,
-# maybe someone with good Linux makefile-fu can fix it up.
+# Linux: builds using the existing librtmp make system
#
# Usage:
# make
# sudo make install
-# librtmp 2.2f is this svn version
-RTMPDUMP_VERS = 511
# get OS type from shell
OSTYPE = $(shell uname)
ifeq ($(OSTYPE),Darwin)
-MACHINE = $(shell uname -m)
-ifeq ($(findstring Power,$(MACHINE)), Power)
- arch = ppc
+ SYS=darwin
+ prefix=/opt/local
+ XCFLAGS=-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -I /opt/local/include
+ XLDFLAGS=-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -L/opt/local/lib
+ MACHINE = $(shell uname -m)
+ ifeq ($(findstring Power,$(MACHINE)), Power)
+ arch = ppc
+ else
+ arch = i386
+ endif
else
- arch = i386
-endif
-PREFIX=/opt/local
-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 $(arch) -L/opt/local/lib \
- -lpthread -lssl -lcrypto -lz
-else
-PREFIX=/usr/local
-XCFLAGS=-fPIC -DPIC
-XLDFLAGS=-shared -fPIC -rdynamic -lpthread -lssl -lcrypto -lz
+ SYS=posix
endif
-LIBRTMP = librtmp/librtmp.a
+LIBRTMP = librtmp/librtmp/librtmp.so
-all:: librtmp.so
-
-librtmp.so: $(LIBRTMP)
-ifeq ($(OSTYPE),Darwin)
- $(CC) $(XLDFLAGS) -o $@ -Wl,-all_load $<
-else
- $(CC) $(XLDFLAGS) -o $@ -Wl,--whole-archive $< -Wl,--no-whole-archive
-endif
+all:: librtmp/librtmp/librtmp.so
$(LIBRTMP): librtmp/Makefile
- make SYS=posix XCFLAGS="$(XCFLAGS)" XLDFLAGS="$(XLDFLAGS)" -C librtmp
+ make SYS=$(SYS) prefix=$(prefix) XCFLAGS="$(XCFLAGS)" XLDFLAGS="$(XLDFLAGS)" -C librtmp/librtmp
librtmp/Makefile:
- svn export --revision $(RTMPDUMP_VERS) svn://svn.mplayerhq.hu/rtmpdump/trunk/librtmp librtmp
+ svn export svn://svn.mplayerhq.hu/rtmpdump/tags/rel-2.3 librtmp
+ifeq ($(OSTYPE),Darwin)
+ cd librtmp; patch -p1 < ../make_shared_lib_for_darwin-tag2.3.patch
+endif
install:
- mkdir -p $(PREFIX)/include/librtmp
- cp -f librtmp/amf.h $(PREFIX)/include/librtmp
- cp -f librtmp/log.h $(PREFIX)/include/librtmp
- cp -f librtmp/http.h $(PREFIX)/include/librtmp
- cp -f librtmp/rtmp.h $(PREFIX)/include/librtmp
- cp -f librtmp.so $(PREFIX)/lib
+ make SYS=$(SYS) prefix=$(prefix) -C librtmp/librtmp install
clean:
- rm -f librtmp.so
- rm -rf includes
- make -C librtmp clean
+ make SYS=$(SYS) prefix=$(prefix) -C librtmp/librtmp clean
distclean::
- rm -rf librtmp.so librtmp
+ rm -rf librtmp