ARCH=@ARCH@ SYSDIR=../../../../../system/players/dvdplayer SOS= libdvdnav-$(ARCH).so DIRS= libdvdread \ libdvdnav WRAPPER=../../../DllLoader/exports/wrapper.o WRAPPER_OSX=../../../../../tools/Mach5/wrapper.rb LDFLAGS=-shared -fPIC -rdynamic 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_OSX) libdvdcss/src/.libs/libdvdcss.a ld -bundle -flat_namespace -undefined suppress -o $@ \ libdvdcss/src/*.o $(BUNDLE1_O) $(WRAPPER_OSX) $@;mv output.so $@ $(SYSDIR)/libdvdnav-$(ARCH).so: $(WRAPPER_OSX) $(DVDCSS_A) libdvdread/obj/libdvdread.a libdvdnav/obj/libdvdnav.a ld -bundle -flat_namespace -undefined suppress -o $@ \ $(DVDCSS_O) libdvdread/obj/*.o libdvdnav/obj/*.o $(BUNDLE1_O) $(WRAPPER_OSX) $@;mv output.so $@ else $(SYSDIR)/libdvdcss-$(ARCH).so: $(WRAPPER) libdvdcss/src/.libs/libdvdcss.a $(CC) -o $@ $(LDFLAGS) --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) --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 ../../../../../Makefile.include