Merge pull request #4791 from jmarshallnz/playlist_settings
[vuplus_xbmc] / lib / libbluray / Makefile
1 #
2 #  libbluray build script for OSX darwin.
3 #
4 #  A quick and dirty Makefile to download/build and install libbluray
5 #
6 #  Darwin:
7 #  10.4u.sdk is targeted so we can run on the AppleTV. Macports is assumed to
8 #  be used and the required lib depends installed.
9 #
10 #  Linux: builds using the existing libbluray make system
11 #  
12 #  Usage:
13 #    make
14 #    sudo make install
15 #
16 #  Darwin only:
17 #    make install_xbmc
18
19 # get OS type from shell
20 OSTYPE  = $(shell uname)
21
22 ifeq ($(OSTYPE),Darwin)
23   prefix=/opt/local
24   CFLAGS=-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -I /opt/local/include
25   LDFLAGS=-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -L/opt/local/lib
26   CPPFLAGS=-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -I /opt/local/include
27 else
28   prefix=/usr/local
29 endif
30
31 ifeq ($(OSTYPE),Darwin)
32   LIBBLURAY = libbluray/src/.libs/libbluray.dylib
33 else
34   LIBBLURAY = libbluray/src/.libs/libbluray.so
35 endif
36
37 all:: $(LIBBLURAY)
38
39 $(LIBBLURAY): libbluray/configure
40         make -C libbluray
41
42 libbluray/configure:
43         if [ ! -d libbluray ]; then git clone git://git.videolan.org/libbluray.git; fi
44         cd  libbluray; ./bootstrap
45 ifeq ($(OSTYPE),Darwin)
46         cd  libbluray; ./configure --prefix=$(prefix) --exec-prefix=$(prefix) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
47 else
48         cd  libbluray; ./configure --prefix=$(prefix) --exec-prefix=$(prefix)
49 endif
50
51 ifeq ($(OSTYPE),Darwin)
52 install_xbmc: $(LIBBLURAY)
53         cp $(LIBBLURAY) ../../system/
54 endif
55
56 install:
57         make -C libbluray install
58
59 clean:
60         make -C libbluray clean
61
62 distclean::
63         rm -rf libbluray