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
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
ARCH=@ARCH@
SYSROOT=@SYSROOT@
CC=@CC@
CXX=@CXX@
SYSDIR=@abs_top_srcdir@/system/players/dvdplayer
SOS= libdvdnav-$(ARCH).so
DIRS= libdvdread \
libdvdnav
WRAPPER=@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o
WRAPPER_MACH_ALIAS=@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias
ifeq ($(findstring osx,$(ARCH)),osx)
LDFLAGS +=-bundle -undefined dynamic_lookup -read_only_relocs suppress
else
LDFLAGS += -shared -fPIC -rdynamic
endif
ifeq ($(ARCH), powerpc-osx)
# Add -lbundle1.o for powerpc-osx
BUNDLE1_O = -lbundle1.o
endif
# Allows us to optionally build xbmc with DVDCSS support
ifeq (@BUILD_DVDCSS@,1)
DIRS += libdvdcss
SOS += libdvdcss-$(ARCH).so
DVDCSS_A = libdvdcss/src/.libs/libdvdcss.a
DVDCSS_O = libdvdcss/src/.libs/*.o
DVDNAV_PREREQ = libdvdcss
endif
SLIB=$(addprefix $(SYSDIR)/, $(SOS))
DISTCLEAN_FILES=includes/dvdread/*.h \
includes/dvdcss/*.h \
libdvdnav/config.h \
libdvdread/config.h
.PHONY: $(DIRS) compile
all: $(SLIB)
ifeq ($(findstring osx,$(ARCH)), osx)
$(SYSDIR)/libdvdcss-$(ARCH).so: $($(WRAPPER)) libdvdcss/src/.libs/libdvdcss.a
$(CC) $(SYSROOT) $(LDFLAGS) -Wl,-alias_list,$(WRAPPER_MACH_ALIAS) -o $@ \
$(WRAPPER) libdvdcss/src/*.o $(BUNDLE1_O)
$(SYSDIR)/libdvdnav-$(ARCH).so: $($(WRAPPER)) $(DVDCSS_A) libdvdread/obj/libdvdread.a libdvdnav/obj/libdvdnav.a
$(CC) $(SYSROOT) $(LDFLAGS) -Wl,-alias_list,$(WRAPPER_MACH_ALIAS) -o $@ \
$(WRAPPER) $(DVDCSS_O) libdvdread/obj/*.o libdvdnav/obj/*.o $(BUNDLE1_O)
else
$(SYSDIR)/libdvdcss-$(ARCH).so: $(WRAPPER) libdvdcss/src/.libs/libdvdcss.a
$(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ \
libdvdcss/src/*.o \
`cat $(WRAPPER:.o=.def)` $(WRAPPER)
$(SYSDIR)/libdvdnav-$(ARCH).so: $(WRAPPER) $(DVDCSS_A) libdvdread/obj/libdvdread.a libdvdnav/obj/libdvdnav.a
$(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ $(DVDCSS_O) libdvdread/obj/*.o libdvdnav/obj/*.o \
`cat $(WRAPPER:.o=.def)` $(WRAPPER)
endif
libdvdcss/src/.libs/libdvdcss.a: libdvdcss
libdvdcss: compile
$(MAKE) -C $@
libdvdread/obj/libdvdread.a: libdvdread
libdvdread: compile
$(MAKE) -C $@
libdvdnav/obj/libdvdnav.a: libdvdnav
libdvdnav: compile
$(MAKE) -C $@
include @abs_top_srcdir@/Makefile.include
|