Commit 8c3e9b01 authored by gates's avatar gates

Make libbdplus it's own standalone library and prepare to have it removed out of libbluray repo

parent 4cb13b41
......@@ -53,31 +53,15 @@ elif [[ $use_dlopen = "yes" ]]; then
else
AC_CHECK_LIB([aacs], [aacs_open],,
[AC_MSG_ERROR($library_not_found)])
AC_CHECK_LIB([bdplus], [bdplus_init],,
[AC_MSG_ERROR($library_not_found)])
AC_MSG_NOTICE($using_normal_linking)
fi
AM_CONDITIONAL([USING_DLOPEN],
[test $use_dlopen = "auto" || test $use_dlopen = "yes"])
# libbdplus checks
if [[ -d src/libbdplus ]]; then
PKG_CHECK_MODULES([OPENSSL], [openssl],
[OPENSSL_INCLUDES="$INCLUDES $OPENSSL_CFLAGS";
OPENSSL_LDFLAGS="$LIBS $OPENSSL_LIBS"],
AC_MSG_ERROR($library_not_found))
# Make sure OpenSSL is cool enough to play with the big boys.
AC_CHECK_HEADERS([openssl/ecdsa.h], [], [
AC_MSG_ERROR([Version of OpenSSL does not feature openssl/ecdsa.h, please
upgrade]) ]
, [])
libbdplus_src_available=1
else
libbdplus_src_available=0
fi
AM_CONDITIONAL([HAVE_LIBBDPLUS_SRC], [test $libbdplus_src_available = "1"])
# generate output files
AC_SUBST(OPENSSL_INCLUDES)
AC_SUBST(OPENSSL_LDFLAGS)
AC_SUBST(DLOPEN_LDFLAGS)
AC_CONFIG_FILES([Makefile src/Makefile src/libbdnav/Makefile
src/examples/Makefile src/libbluray.pc])
......
......@@ -2,32 +2,15 @@ SUBDIRS=libbdnav . examples
AM_CFLAGS = -I$(top_builddir)/src
lib_LTLIBRARIES=
if HAVE_LIBBDPLUS_SRC
LIBBDPLUS_LIBADD = libbdplus.la
lib_LTLIBRARIES += $(LIBBDPLUS_LIBADD)
libbdplus_la_SOURCES=libbdplus/bdplus.c libbdplus/bdsvm/segment.c \
libbdplus/bdsvm/trap.c libbdplus/bdsvm/dlx.c \
libbdplus/bdsvm/interface.c libbdplus/bdsvm/trap_helper.c \
libbdplus/bdsvm/diff.c libbdplus/bdsvm/slot.c libbdplus/bdsvm/ram.c \
libbdplus/internal.c util/logging.c
libbdplus_la_CFLAGS = -I$(top_builddir)/src/libbdplus \
-I$(top_builddir)/src/libbdplus/bdsvm @OPENSSL_INCLUDES@
libbdplus_la_LDFLAGS = @OPENSSL_LDFLAGS@
endif
if USING_DLOPEN
LIBBLURAY_LDFLAGS=@DLOPEN_LDFLAGS@
else
LIBBLURAY_LIBADD=$(LIBBDPLUS_LIBADD)
endif
lib_LTLIBRARIES+=libbluray.la
lib_LTLIBRARIES=libbluray.la
libbluray_ladir= $(includedir)/libbluray
libbluray_la_SOURCES= bluray.c file/dl_posix.c
libbluray_la_HEADERS= bluray.h
libbluray_la_LIBADD = libbdnav/libbdnav.la $(LIBBLURAY_LIBADD)
libbluray_la_LIBADD = libbdnav/libbdnav.la
libbluray_la_LDFLAGS= -version-info 0:0:0 $(LIBBLURAY_LDFLAGS)
pkgconfigdir = $(libdir)/pkgconfig
......
......@@ -27,7 +27,7 @@
#ifndef USING_DLOPEN
#include <libaacs/aacs.h>
#include "libbdplus/bdplus.h"
#include <libbdplus/bdplus.h>
#endif
static int _open_m2ts(BLURAY *bd)
......
......@@ -3,13 +3,6 @@ AM_CFLAGS = -I$(top_builddir)/src
noinst_PROGRAMS=bdsplice mpls_dump clpi_dump index_dump mobj_dump libbluray_test
if HAVE_LIBBDPLUS_SRC
bdplus_test_SOURCE=bdplus_test.c
bdplus_test_LDADD=$(top_builddir)/src/libbluray.la
bdplus_test_CFLAGS = -I$(top_builddir)/src/libbdplus
noinst_PROGRAMS+=bdplus_test
endif
BDNAV_LIB = $(top_builddir)/src/libbdnav/libbdnav.la
bdsplice_SOURCES = \
......
/*
* This file is part of libbluray
* Copyright (C) 2008-2010 Accident
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* In addition, as a special exception, the copyright holders of libbluray
* gives permission to link the code of its release of libbluray with the
* OpenSSL project's "OpenSSL" library (or with modified versions of it
* that use the same license as the "OpenSSL" library), and distribute
* the linked executables. You must obey the GNU General Public License
* in all respects for all of the code used other than "OpenSSL". If you
* modify this file, you may extend this exception to your version of the
* file, but you are not obligated to do so. If you do not wish to do
* so, delete this exception statement from your version.
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
#if HAVE_STDLIB_H
#include <stdlib.h>
#endif
#if HAVE_STDINT_H
#include <stdint.h>
#endif
#include <stdio.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "bdplus.h"
extern int bluray_debuglevel; // FIXME
int main(int argc, char **argv)
{
VM *vm = NULL;
if (argc < 2) {
fprintf(stderr, "%s /path/tobluray\r\n", argv[0]);
fprintf(stderr, "Where we expect to find /path/tobluray/BDSVM/\r\n");
exit(1);
}
if (chdir(argv[1])) {
perror("chdir(): ");
exit(1);
}
#if 0
// Technically not required, yet
if (bdplus_init(NULL, NULL, NULL)) goto fail;
// Debug flags?
bluray_debuglevel = 3;
// Create the VM
vm = bdplus_VM_new(0);
if (!vm) goto fail;
printf("Loading core...\n");
if (bdplus_loadsvm(vm, 0x0, "BDSVM/00000.svm")) {
printf("Unable to load BDSVM/00000.svm\n");
goto fail;
}
printf("Loading slots...\n");
bdplus_load_slots(vm, "flash.bin");
// Set VolumeID?
// if (bdplus_loadVolumeID(vm, "volume_id.bin")) {
printf("Running VM for convtab...\n");
result = bdplus_run_convtab(vm);
printf("run_convtab said %d\n", result);
#endif
printf("Cleaning up...\n");
if (vm) {
// bdplus_VM_free(vm);
vm = NULL;
}
// bdplus_free();
exit(0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment