Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (53 loc) · 1.56 KB
/
Copy pathMakefile
File metadata and controls
63 lines (53 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
789E
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#
# libbluray build script for OSX darwin.
#
# A quick and dirty Makefile to download/build and install libbluray
#
# Darwin:
# 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 using the existing libbluray make system
#
# Usage:
# make
# sudo make install
#
# Darwin only:
# make install_xbmc
# get OS type from shell
OSTYPE = $(shell uname)
ifeq ($(OSTYPE),Darwin)
prefix=/opt/local
CFLAGS=-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -I /opt/local/include
LDFLAGS=-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -L/opt/local/lib
CPPFLAGS=-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -I /opt/local/include
else
prefix=/usr/local
endif
ifeq ($(OSTYPE),Darwin)
LIBBLURAY = libbluray/src/.libs/libbluray.dylib
else
LIBBLURAY = libbluray/src/.libs/libbluray.so
endif
all:: $(LIBBLURAY)
$(LIBBLURAY): libbluray/configure
make -C libbluray
libbluray/configure:
if [ ! -d libbluray ]; then git clone git://git.videolan.org/libbluray.git; fi
cd libbluray; ./bootstrap
ifeq ($(OSTYPE),Darwin)
cd libbluray; ./configure --prefix=$(prefix) --exec-prefix=$(prefix) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
else
cd libbluray; ./configure --prefix=$(prefix) --exec-prefix=$(prefix)
endif
ifeq ($(OSTYPE),Darwin)
install_xbmc: $(LIBBLURAY)
cp $(LIBBLURAY) ../../system/
endif
install:
make -C libbluray install
clean:
make -C libbluray clean
distclean::
rm -rf libbluray