Llink:Compiling: Difference between revisions

From Lundman Wiki
No edit summary
No edit summary
Line 26: Line 26:
If you want to compile against '''libdvdread''', download this package from (link me) and set the ''environment variable'' '''DVDREAD''' to point to the directory of '''libdvdread'.
If you want to compile against '''libdvdread''', download this package from (link me) and set the ''environment variable'' '''DVDREAD''' to point to the directory of '''libdvdread'.


If you want to compile without '''libdvdread''' remove the pre-processor define '''WITH_DVDREAD''' from the '''llink''' project properties.
If you want to compile without '''libdvdread''' remove the pre-processor define '''WITH_DVDREAD''' from the '''llink''' project properties, as well as the libdvdread.lib from Linker input properties.


For example, '''DVDREAD''' to be "c:/src/libdvdread-0.9.7". You set ''environment variables'' by Properties of My Computer (etc, fill me in).
For example, '''DVDREAD''' to be "c:/src/libdvdread-0.9.7". You set ''environment variables'' by Properties of My Computer (etc, fill me in).

Revision as of 08:39, 24 June 2008

Compiling Instructions

When compiling llink you need to chose if you want to use OpenSSL, libdvdread and libdvdcss. Generally we have no reason to use SSL with link so I will skip this compile time step.

Unix, OsX and other native compiles

The default should work.

# ./configure --without-openssl
# make
# file src/llink

The file command is not necessary, but it shows you where we expect the binary to end up.

However, if you want libdvdread support, and it can not find it. (Say it installs /opt/local/lib/libdvdread.*)

# ./configure --without-openssl --with-dvdread=/opt/local/
# make

If you don't have libdvdread installed, or do not have permission to do so, you can compile it in a parallel directory and use --with-dvdread-tree= as shown in the cross-compile instructions below.

Windows

Download Visual Devstudio C++ 2008 from (insert microsoft link) and install. Download source package, and load the llink.vcproj inside "win32/" directory. Change the default project from libdirlist to llink and hit compile.

If you want to compile against libdvdread, download this package from (link me) and set the environment variable DVDREAD to point to the directory of libdvdread'.

If you want to compile without libdvdread remove the pre-processor define WITH_DVDREAD from the llink project properties, as well as the libdvdread.lib from Linker input properties.

For example, DVDREAD to be "c:/src/libdvdread-0.9.7". You set environment variables by Properties of My Computer (etc, fill me in).

Cross Compile

For example when compiling for the PCH A-100, you download the toolchain that applies to your arch. In this case, it installs into /usr/local/mips/ with a gcc binary named as /usr/local/mips/bin/mipsel-linux-gcc.

First make sure your PATH is updated so that it can find the executable.

# export PATH=$PATH:/usr/local/mips/bin/
# which mipsel-linux-gcc
/usr/local/mips/bin/mipsel-linux-gcc

Great. If you want to have libdvdread and libdvdcss we need to compile those first. If you do not, you can skip this step.

# cd src/libdvdcss-1.2.9/
# ./configure --host=mipsel-linux-uclibc --enable-static
# make
# file src/.libs/libdvdcss.*
src/.libs/libdvdcss.a:        current ar archive
src/.libs/libdvdcss.so.2.0.8: ELF 32-bit LSB shared object, MIPS, version 1 (SYSV), not stripped
(a few other files, but at least one shows its compiled as MIPS)
# src/libdvdread-0.9.7/
# ./configure --host=mipsel-linux-uclibc --with-libdvdcss-includes=/home/lundman/src/libdvdcss-1.2.9/src/ --with-libdvdcss-libs=/home/lundman/src/libdvdcss-1.2.9/src/.libs/
# make
# file dvdread/.libs/libdvdread.*
dvdread/.libs/libdvdread.a:        current ar archive
dvdread/.libs/libdvdread.so.3.2.1: ELF 32-bit LSB shared object, MIPS, version 1 (SYSV), not stripped

Note that we have to use the full path /home/lundman/src/ to get to the libdvdcss-1.2.9/src includes. You should change the first part.

Compiling llink. Now it is time to compile llink itself. The version number might change of course.

# cd src/llink-2.0.7/
# ./configure --host=mipsel-linux --enable-static --without-openssl --with-dvdread-tree=/home/lundman/src/libdvdread-0.9.7/ --with-dvdcss-tree=/home/lundman/src/libdvdcss-1.2.9/
# make
# file src/llink
src/llink: ELF 32-bit LSB executable, MIPS, version 1 (SYSV), statically linked, not stripped

Naturally, if you do not want libdvdread go with the shorter line:

# ./configure --host=mipsel-linux --enable-static --without-openssl
# make