diff options
author | dcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2010-02-16 05:29:10 +0000 |
---|---|---|
committer | dcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2010-02-16 05:29:10 +0000 |
commit | b77f26e3f510e1a1d8734c269200ecfa1fcc5cb4 (patch) | |
tree | a6875e7061321cfbd7fcee580cad9e2914d74a5a /trunk/BUILDING.txt | |
parent | 01d7444e9739ea7b304cd6d648813376d9caae68 (diff) |
Split build instructions into a new file and add SDK usage notes to README-turbo.txt
git-svn-id: https://libjpeg-turbo.svn.sourceforge.net/svnroot/libjpeg-turbo@111 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'trunk/BUILDING.txt')
-rw-r--r-- | trunk/BUILDING.txt | 282 |
1 files changed, 282 insertions, 0 deletions
diff --git a/trunk/BUILDING.txt b/trunk/BUILDING.txt new file mode 100644 index 0000000..25ce457 --- /dev/null +++ b/trunk/BUILDING.txt @@ -0,0 +1,282 @@ +******************************************************************************* +** Building on Unix Platforms, Cygwin, and MinGW +******************************************************************************* + +================== +Build Requirements +================== + +-- autoconf 2.56 or later + * If using MinGW, this can be obtained by installing the MSYS DTK + +-- automake 1.7 or later + * If using MinGW, this can be obtained by installing the MSYS DTK + +-- libtool 1.4 or later + * If using MinGW, this can be obtained by installing the MSYS DTK + +-- NASM + * 0.98 or later is required for a 32-bit build + * NASM 2.05 or later is required for a 64-bit build + * NASM 2.07 or later is required for a 64-bit build on OS/X (10.6 "Snow + Leopard" or later.) This can be obtained from MacPorts + (http://www.macports.org/). + + The NASM 2.05 RPMs do not work on older Linux systems, such as Enterprise + Linux 4. On such systems, you can easily build and install NASM 2.05 + from the source RPM by executing the following as root: + + ARCH=`uname -m` + wget http://www.nasm.us/pub/nasm/releasebuilds/2.05.01/nasm-2.05.01-1.src.rpm + rpmbuild --rebuild nasm-2.05.01-1.src.rpm + rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-2.05.01-1.$ARCH.rpm + +-- GCC v4 or later recommended for best performance + +====================== +Building libjpeg-turbo +====================== + +The following procedure will build libjpeg-turbo on Linux, 32-bit OS X, and +Solaris/x86 systems (on Solaris, this generates a 32-bit library. See below +for 64-bit build instructions.) + + cd libjpeg-turbo + autoreconf -fiv + sh ./configure + make + +NOTE: Running autoreconf is only necessary if building libjpeg-turbo from the +SVN repository. + +This will generate the following files under .libs/ + + libjpeg.a + Static link library for libjpeg-turbo + + libjpeg.so.62.0.0 (Linux, Solaris) + libjpeg.62.dylib (OS X) + libjpeg-62.dll (MinGW) + cygjpeg-62.dll (Cygwin) + Shared library for libjpeg-turbo + + libjpeg.so (Linux, Solaris) + libjpeg.dylib (OS X) + libjpeg.dll.a (Cygwin, MinGW) + Development stub for libjpeg-turbo shared library + + libturbojpeg.a + Static link library for TurboJPEG/OSS + + libturbojpeg.so (Linux, Solaris) + libturbojpeg.dylib (OS X) + Shared library and development stub for TurboJPEG/OSS + + libturbojpeg.dll (MinGW) + cygturbojpeg.dll (Cygwin) + Shared library for TurboJPEG/OSS + + libturbojpeg.dll.a (Cygwin, MinGW) + Development stub for TurboJPEG/OSS shared library + +======================== +Installing libjpeg-turbo +======================== + +If you intend to install these libraries and the associated header files, then +replace 'make' in the instructions above with + + make install prefix={base dir} libdir={library directory} + +For example, + + make install prefix=/usr/local libdir=/usr/local/lib64 + +will install the header files in /usr/local/include and the library files in +/usr/local/lib64. If 'prefix' and 'libdir' are not specified, then the default +is to install the header files in /opt/libjpeg-turbo/include and the library +files in /opt/libjpeg-turbo/lib. + +NOTE: You can specify a prefix of /usr and a libdir of, for instance, +/usr/lib64 to overwrite the system's version of libjpeg. If you do this, +however, then be sure to BACK UP YOUR SYSTEM'S INSTALLATION OF LIBJPEG before +overwriting it. It is recommended that you instead install libjpeg-turbo into +a non-system directory and manipulate the LD_LIBRARY_PATH or create sym links +to force applications to use libjpeg-turbo instead of libjpeg. See +README-turbo.txt for more information. + +============= +Build Recipes +============= + +32-bit Library Build on 64-bit Linux +------------------------------------ + +Same instructions as above, but add + + --host i686-pc-linux-gnu CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' + +to the configure command line. + + +64-bit Library Build on 64-bit OS/X +----------------------------------- + +Same instructions as above, but add + + --host x86_64-apple-darwin10.0.0 NASM=/opt/local/bin/nasm + +to the configure command line. NASM 2.07 from MacPorts must be installed. + + +32-bit Library Build on 64-bit OS/X +----------------------------------- + +Same instructions as above, but add + + CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32 + +to the configure command line. + + +32-bit Backward-Compatible Library Build on 64-bit OS/X +------------------------------------------------------- + +Same instructions as above, but add + + CC=gcc-4.0 CXX=g++-4.0 CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ + -mmacosx-version-min=10.4 -O3 -m32' CXXFLAGS='-isysroot \ + /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -O3 -m32' \ + LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ + -mmacosx-version-min=10.4 -m32' + +to the configure command line. The OS X 10.4 SDK must be installed. + + +64-bit Library Build on 64-bit Solaris +-------------------------------------- + +Same instructions as above, but add + + --host x86_64-pc-solaris CFLAGS='-O3 -m64' CXXFLAGS='-O3 -m64' LDFLAGS=-m64 + +to the configure command line. + + +MinGW Build on Cygwin +--------------------- + +Same instructions as above, but add + + --host mingw32 + +to the configure command line. This will produce libraries which do not +depend on cygwin1.dll or other Cygwin DLL's. + + +******************************************************************************* +** Windows (Visual C++) +******************************************************************************* + +================== +Build Requirements +================== + +-- GNU Make v3.7 or later + * Can be found in MSYS (http://www.mingw.org/download.shtml) or + Cygwin (http://www.cygwin.com/) + +-- Microsoft Visual C++ 2003 or later + * Tested with Microsoft Visual C++ 2008 Express Edition (free download): + + http://msdn.microsoft.com/vstudio/express/visualc/ + + * Add the compiler binary directories (for instance, + c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN; + c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE) + to the system or user PATH environment variable prior to building + libjpeg-turbo. + * Add the compiler include directory (for instance, + c:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE) + to the system or user INCLUDE environment variable prior to building + libjpeg-turbo. + * Add the compiler library directory (for instance, + c:\Program Files\Microsoft Visual Studio 9.0\VC\LIB) + to the system or user LIB environment variable prior to building + libjpeg-turbo. + +-- Microsoft Windows SDK + * This is included with Microsoft Visual C++ 2008 Express Edition, but users + of prior editions of Visual C++ can download the SDK from: + + http://msdn2.microsoft.com/en-us/windowsserver/bb980924.aspx + + * Add the SDK binary directory (for instance, + c:\Program Files\Microsoft SDKs\Windows\v6.0A\bin) + to the system or user PATH environment variable prior to building + libjpeg-turbo. + * Add the SDK include directory (for instance, + c:\Program Files\Microsoft SDKs\Windows\v6.0A\include) + to the system or user INCLUDE environment variable prior to building + libjpeg-turbo. + * Add the SDK library directory (for instance, + c:\Program Files\Microsoft SDKs\Windows\v6.0A\lib) + to the system or user LIB environment variable prior to building + libjpeg-turbo. + +-- NASM (http://www.nasm.us/) 0.98 or later + +====================== +Building libjpeg-turbo +====================== + + cd libjpeg-turbo + make -f win/Makefile + +This will generate the following files: + + jpeg-static.lib Static link library for libjpeg-turbo + jpeg62.dll Shared library for libjpeg-turbo + jpeg.lib Development stub for libjpeg-turbo shared library + turbojpeg-static.lib Static link library for TurboJPEG/OSS + turbojpeg.dll Shared library for TurboJPEG/OSS + turbojpeg.lib Development stub for TurboJPEG/OSS shared library + + +******************************************************************************* +** Creating Release Packages +******************************************************************************* + +The following commands can be used to create various types of release packages: + +make rpm + + Create RedHat-style binary RPM package. Requires RPM v4 or later. + +make srpm + + This runs 'make dist' to create a pristine source tarball, then creates a + RedHat-style source RPM package from the tarball. Requires RPM v4 or later. + +make deb + + Create Debian-style binary package. Requires dpkg. + +make dmg + + Create Macintosh package/disk image. This requires the PackageMaker + application, which must be installed in /Developer/Applications/Utilities. + +make udmg + + On 64-bit OS X (10.6 "Snow Leopard" or later), this creates a version of the + Macintosh package/disk image which contains universal i386/x86-64 binaries. + The 32-bit fork of these binaries is backward compatible with OS X 10.4 and + later, whereas the 64-bit fork is compatible with OS X 10.6 and later. OS X + 10.4 compatibility SDK required. + +make -f win/Makefile dist + + This creates a Win32 installer for the libjpeg-turbo SDK. This requires the + Nullsoft Install System (http://nsis.sourceforge.net/.) makensis.exe should + be in your PATH. |