blob: 3cae8dfc388e141f01d8710a6043c1ba01868729 [file] [log] [blame]
DRC68fef832010-02-16 05:29:10 +00001*******************************************************************************
DRC81543312010-10-18 07:23:58 +00002** Building on Unix Platforms (including Cygwin)
DRC68fef832010-02-16 05:29:10 +00003*******************************************************************************
4
DRCcc243742010-10-16 09:22:43 +00005
DRC68fef832010-02-16 05:29:10 +00006==================
7Build Requirements
8==================
9
10-- autoconf 2.56 or later
DRC68fef832010-02-16 05:29:10 +000011-- automake 1.7 or later
DRC68fef832010-02-16 05:29:10 +000012-- libtool 1.4 or later
DRC68fef832010-02-16 05:29:10 +000013
14-- NASM
15 * 0.98 or later is required for a 32-bit build
16 * NASM 2.05 or later is required for a 64-bit build
DRC9026b372011-04-16 13:37:22 +000017 * NASM 2.07 or later is required for a 64-bit build on OS X. This can be
DRC0dedd1a2010-07-02 09:20:12 +000018 obtained from MacPorts (http://www.macports.org/).
DRC68fef832010-02-16 05:29:10 +000019
DRCcc243742010-10-16 09:22:43 +000020 The NASM 2.05 RPMs do not work on older Linux systems, such as Red Hat
21 Enterprise Linux 4. On such systems, you can easily build and install NASM
22 2.05 from the source RPM by executing the following as root:
DRC68fef832010-02-16 05:29:10 +000023
24 ARCH=`uname -m`
25 wget http://www.nasm.us/pub/nasm/releasebuilds/2.05.01/nasm-2.05.01-1.src.rpm
26 rpmbuild --rebuild nasm-2.05.01-1.src.rpm
27 rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-2.05.01-1.$ARCH.rpm
28
DRCc3f4ac02010-02-19 21:51:26 +000029 NOTE: NASM build will fail if texinfo is not installed.
30
DRC8f870c22010-02-24 00:30:00 +000031-- GCC v4.1 or later recommended for best performance
DRC68fef832010-02-16 05:29:10 +000032
DRCf8e00552011-02-04 11:06:36 +000033-- If building the TurboJPEG/OSS JNI wrapper, the Java Development Kit (JDK)
34 must be installed. On OS X 10.5 and later, instead install the Java
35 Developer Package, which can be obtained from http://connect.apple.com.
36
DRCcc243742010-10-16 09:22:43 +000037
38==================
39Out-of-Tree Builds
40==================
41
42Binary objects, libraries, and executables are generated in the same directory
43from which configure was executed (the "binary directory"), and this directory
44need not necessarily be the same as the libjpeg-turbo source directory. You
45can create multiple independent binary directories, in which different versions
46of libjpeg-turbo can be built from the same source tree using different
47compilers or settings. In the sections below, {build_directory} refers to the
48binary directory, whereas {source_directory} refers to the libjpeg-turbo source
49directory. For in-tree builds, these directories are the same.
50
51
DRC68fef832010-02-16 05:29:10 +000052======================
53Building libjpeg-turbo
54======================
55
DRC49597872010-05-17 20:47:57 +000056The following procedure will build libjpeg-turbo on Linux, FreeBSD, 32-bit
DRC81543312010-10-18 07:23:58 +000057OS X, Cygwin, and Solaris/x86 systems (on Solaris, this generates a 32-bit
58library. See below for 64-bit build instructions.)
DRC68fef832010-02-16 05:29:10 +000059
DRCcc243742010-10-16 09:22:43 +000060 cd {source_directory}
DRC68fef832010-02-16 05:29:10 +000061 autoreconf -fiv
DRCcc243742010-10-16 09:22:43 +000062 cd {build_directory}
DRC98dbe912010-11-04 22:22:30 +000063 sh {source_directory}/configure [additional configure flags]
DRC68fef832010-02-16 05:29:10 +000064 make
65
DRCcc243742010-10-16 09:22:43 +000066NOTE: Running autoreconf in the source directory is only necessary if building
67libjpeg-turbo from the SVN repository.
DRC68fef832010-02-16 05:29:10 +000068
69This will generate the following files under .libs/
70
71 libjpeg.a
72 Static link library for libjpeg-turbo
73
DRCcc243742010-10-16 09:22:43 +000074 libjpeg.so.{version} (Linux, Solaris)
75 libjpeg.{version}.dylib (OS X)
DRC81543312010-10-18 07:23:58 +000076 cygjpeg-{version}.dll (Cygwin)
DRC68fef832010-02-16 05:29:10 +000077 Shared library for libjpeg-turbo
78
79 libjpeg.so (Linux, Solaris)
80 libjpeg.dylib (OS X)
DRC81543312010-10-18 07:23:58 +000081 libjpeg.dll.a (Cygwin)
DRC68fef832010-02-16 05:29:10 +000082 Development stub for libjpeg-turbo shared library
83
84 libturbojpeg.a
85 Static link library for TurboJPEG/OSS
86
87 libturbojpeg.so (Linux, Solaris)
88 libturbojpeg.dylib (OS X)
89 Shared library and development stub for TurboJPEG/OSS
90
DRC81543312010-10-18 07:23:58 +000091 cygturbojpeg.dll (Cygwin)
92 Shared library for TurboJPEG/OSS
93
94 libturbojpeg.dll.a (Cygwin)
95 Development stub for TurboJPEG/OSS shared library
96
DRCcc243742010-10-16 09:22:43 +000097{version} is 62.0.0, 7.0.0, or 8.0.2, depending on whether libjpeg v6b
DRC81543312010-10-18 07:23:58 +000098(default), v7, or v8b emulation is enabled. If using Cygwin, {version} is
9962, 7, or 8.
100
101
102libjpeg v7 or v8b Emulation
103---------------------------
104
105Add --with-jpeg7 to the configure command line to build a version of
106libjpeg-turbo that is compatible with libjpeg v7. Add --with-jpeg8 to the
107configure command to build a version of libjpeg-turbo that is compatible with
108libjpeg v8b. See README-turbo.txt for more information on libjpeg v7 and v8b
109emulation.
110
DRC68fef832010-02-16 05:29:10 +0000111
DRC245cfdf2010-11-23 17:11:06 +0000112Arithmetic Coding Support
113-------------------------
114
115Since the patent on arithmetic coding has expired, this functionality has been
116included in this release of libjpeg-turbo. libjpeg-turbo's implementation is
117based on the implementation in libjpeg v8b, but it works when emulating libjpeg
118v7 or v6b as well. The default is to enable both arithmetic encoding and
119decoding, but those who have philosophical objections to arithmetic coding can
120add --without-arith-enc or --without-arith-dec to the configure command line to
121disable encoding or decoding (respectively.)
122
DRC68fef832010-02-16 05:29:10 +0000123
DRCf8e00552011-02-04 11:06:36 +0000124TurboJPEG/OSS JNI Wrapper
125-------------------------
126Add --with-jni to the configure command line to incorporate an optional Java
127Native Interface wrapper into the TurboJPEG/OSS dynamic library. This allows
128the dynamic library to be used directly from Java applications. See
129java/README for more details.
130
131
DRC68fef832010-02-16 05:29:10 +0000132========================
133Installing libjpeg-turbo
134========================
135
136If you intend to install these libraries and the associated header files, then
137replace 'make' in the instructions above with
138
139 make install prefix={base dir} libdir={library directory}
140
141For example,
142
143 make install prefix=/usr/local libdir=/usr/local/lib64
144
145will install the header files in /usr/local/include and the library files in
146/usr/local/lib64. If 'prefix' and 'libdir' are not specified, then the default
147is to install the header files in /opt/libjpeg-turbo/include and the library
148files in /opt/libjpeg-turbo/lib.
149
150NOTE: You can specify a prefix of /usr and a libdir of, for instance,
151/usr/lib64 to overwrite the system's version of libjpeg. If you do this,
152however, then be sure to BACK UP YOUR SYSTEM'S INSTALLATION OF LIBJPEG before
153overwriting it. It is recommended that you instead install libjpeg-turbo into
154a non-system directory and manipulate the LD_LIBRARY_PATH or create sym links
155to force applications to use libjpeg-turbo instead of libjpeg. See
156README-turbo.txt for more information.
157
DRCcc243742010-10-16 09:22:43 +0000158
DRC68fef832010-02-16 05:29:10 +0000159=============
160Build Recipes
161=============
162
DRCcc243742010-10-16 09:22:43 +0000163
DRC68fef832010-02-16 05:29:10 +000016432-bit Library Build on 64-bit Linux
165------------------------------------
166
DRCca5e7d12010-02-17 02:25:06 +0000167Add
DRC68fef832010-02-16 05:29:10 +0000168
DRC8c2b9fa2010-06-04 23:09:00 +0000169 --host i686-pc-linux-gnu CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32
DRC68fef832010-02-16 05:29:10 +0000170
171to the configure command line.
172
173
DRC9026b372011-04-16 13:37:22 +000017464-bit Library Build on 64-bit OS X
DRC68fef832010-02-16 05:29:10 +0000175-----------------------------------
176
DRCca5e7d12010-02-17 02:25:06 +0000177Add
DRC68fef832010-02-16 05:29:10 +0000178
DRC0dedd1a2010-07-02 09:20:12 +0000179 --host x86_64-apple-darwin NASM=/opt/local/bin/nasm
DRC68fef832010-02-16 05:29:10 +0000180
DRC7bac07b2010-04-10 05:53:35 +0000181to the configure command line. NASM 2.07 or later from MacPorts must be
182installed.
DRC68fef832010-02-16 05:29:10 +0000183
184
DRC9026b372011-04-16 13:37:22 +000018532-bit Library Build on 64-bit OS X
DRC68fef832010-02-16 05:29:10 +0000186-----------------------------------
187
DRCca5e7d12010-02-17 02:25:06 +0000188Add
DRC68fef832010-02-16 05:29:10 +0000189
190 CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32
191
192to the configure command line.
193
194
DRC9026b372011-04-16 13:37:22 +000019564-bit Backward-Compatible Library Build on 64-bit OS X
DRC68fef832010-02-16 05:29:10 +0000196-------------------------------------------------------
197
DRCca5e7d12010-02-17 02:25:06 +0000198Add
DRC68fef832010-02-16 05:29:10 +0000199
DRC0dedd1a2010-07-02 09:20:12 +0000200 --host x86_64-apple-darwin NASM=/opt/local/bin/nasm \
201 CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
202 -mmacosx-version-min=10.4 -O3' \
203 CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
204 -mmacosx-version-min=10.4 -O3' \
205 LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
206 -mmacosx-version-min=10.4'
207
DRC575c3422010-07-08 07:01:20 +0000208to the configure command line. The OS X 10.4 SDK, and NASM 2.07 or later from
209MacPorts, must be installed.
DRC0dedd1a2010-07-02 09:20:12 +0000210
211
DRC9026b372011-04-16 13:37:22 +000021232-bit Backward-Compatible Library Build on OS X
DRC0dedd1a2010-07-02 09:20:12 +0000213------------------------------------------------
214
215Add
216
DRC485cd802010-02-23 23:23:42 +0000217 CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
218 -mmacosx-version-min=10.4 -O3 -m32' \
219 CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
220 -mmacosx-version-min=10.4 -O3 -m32' \
DRC68fef832010-02-16 05:29:10 +0000221 LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
222 -mmacosx-version-min=10.4 -m32'
223
224to the configure command line. The OS X 10.4 SDK must be installed.
225
226
22764-bit Library Build on 64-bit Solaris
228--------------------------------------
229
DRCca5e7d12010-02-17 02:25:06 +0000230Add
DRC68fef832010-02-16 05:29:10 +0000231
232 --host x86_64-pc-solaris CFLAGS='-O3 -m64' CXXFLAGS='-O3 -m64' LDFLAGS=-m64
233
234to the configure command line.
235
236
DRC7bac07b2010-04-10 05:53:35 +000023732-bit Library Build on 64-bit FreeBSD
238--------------------------------------
239
240Add
241
242 --host i386-unknown-freebsd CC='gcc -B /usr/lib32' CXX='g++ -B/usr/lib32' \
243 CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS='-B/usr/lib32'
244
245to the configure command line. NASM 2.07 or later from FreeBSD ports must be
246installed.
247
248
DRCca5e7d12010-02-17 02:25:06 +0000249Sun Studio
250----------
251
252Add
253
254 CC=cc CXX=CC
255
256to the configure command line. libjpeg-turbo will automatically be built with
257the maximum optimization level (-xO5) unless you override CFLAGS and CXXFLAGS.
258
259To build a 64-bit version of libjpeg-turbo using Sun Studio, add
260
261 --host x86_64-pc-solaris CC=cc CXX=CC CFLAGS='-xO5 -m64' \
262 CXXFLAGS='-xO5 -m64' LDFLAGS=-m64
263
264to the configure command line.
265
DRC8b014d72010-02-18 13:03:41 +0000266
DRC81543312010-10-18 07:23:58 +0000267MinGW Build on Cygwin
268---------------------
269
270Use CMake (see recipes below)
271
272
273
DRC68fef832010-02-16 05:29:10 +0000274*******************************************************************************
DRC81543312010-10-18 07:23:58 +0000275** Building on Windows (Visual C++ or MinGW)
DRC68fef832010-02-16 05:29:10 +0000276*******************************************************************************
277
DRCcc243742010-10-16 09:22:43 +0000278
DRC68fef832010-02-16 05:29:10 +0000279==================
280Build Requirements
281==================
282
DRCcc243742010-10-16 09:22:43 +0000283-- CMake (http://www.cmake.org) v2.6 or later
DRC68fef832010-02-16 05:29:10 +0000284
DRCcc243742010-10-16 09:22:43 +0000285-- Microsoft Visual C++ 2005 or later
DRC68fef832010-02-16 05:29:10 +0000286
DRCcc243742010-10-16 09:22:43 +0000287 If you don't already have Visual C++, then the easiest way to get it is by
288 installing the Windows SDK:
DRC68fef832010-02-16 05:29:10 +0000289
DRCcc243742010-10-16 09:22:43 +0000290 http://msdn.microsoft.com/en-us/windows/bb980924.aspx
291
292 The Windows SDK includes both 32-bit and 64-bit Visual C++ compilers and
293 everything necessary to build libjpeg-turbo.
294
295 * For 32-bit builds, you can also use Microsoft Visual C++ Express
296 Edition. Visual C++ Express Edition is a free download.
297 * If you intend to build libjpeg-turbo from the command line, then add the
298 appropriate compiler and SDK directories to the INCLUDE, LIB, and PATH
299 environment variables. This is generally accomplished by executing
300 vcvars32.bat or vcvars64.bat and SetEnv.cmd. vcvars32.bat and
301 vcvars64.bat are part of Visual C++ and are located in the same directory
302 as the compiler. SetEnv.cmd is part of the Windows SDK. You can pass
303 optional arguments to SetEnv.cmd to specify a 32-bit or 64-bit build
304 environment.
305
306... OR ...
307
DRC81543312010-10-18 07:23:58 +0000308-- MinGW
DRCcc243742010-10-16 09:22:43 +0000309
310 GCC v4.1 or later recommended for best performance
DRC68fef832010-02-16 05:29:10 +0000311
DRC377add72010-05-17 16:41:12 +0000312-- NASM (http://www.nasm.us/) 0.98 or later (NASM 2.05 or later is required for
313 a 64-bit build)
DRC68fef832010-02-16 05:29:10 +0000314
DRCcc243742010-10-16 09:22:43 +0000315
316==================
317Out-of-Tree Builds
318==================
319
320Binary objects, libraries, and executables are generated in the same directory
321from which cmake was executed (the "binary directory"), and this directory need
322not necessarily be the same as the libjpeg-turbo source directory. You can
323create multiple independent binary directories, in which different versions of
324libjpeg-turbo can be built from the same source tree using different compilers
325or settings. In the sections below, {build_directory} refers to the binary
326directory, whereas {source_directory} refers to the libjpeg-turbo source
327directory. For in-tree builds, these directories are the same.
328
329
DRC68fef832010-02-16 05:29:10 +0000330======================
331Building libjpeg-turbo
332======================
333
DRC68fef832010-02-16 05:29:10 +0000334
DRCcc243742010-10-16 09:22:43 +0000335Visual C++ (Command Line)
336-------------------------
DRC68fef832010-02-16 05:29:10 +0000337
DRCcc243742010-10-16 09:22:43 +0000338 cd {build_directory}
339 cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release {source_directory}
340 nmake
DRC68fef832010-02-16 05:29:10 +0000341
DRCcc243742010-10-16 09:22:43 +0000342This will build either a 32-bit or a 64-bit version of libjpeg-turbo, depending
343on which version of cl.exe is in the PATH.
DRC8b014d72010-02-18 13:03:41 +0000344
DRCcc243742010-10-16 09:22:43 +0000345The following files will be generated under {build_directory}:
346
347 jpeg-static.lib
348 Static link library for libjpeg-turbo
349 sharedlib/jpeg{version}.dll
350 DLL for libjpeg-turbo
351 sharedlib/jpeg.lib
352 Import library for libjpeg-turbo DLL
353 turbojpeg-static.lib
354 Static link library for TurboJPEG/OSS
355 turbojpeg.dll
356 DLL for TurboJPEG/OSS
357 turbojpeg.lib
358 Import library for TurboJPEG/OSS DLL
359
360{version} is 62, 7, or 8, depending on whether libjpeg v6b (default), v7, or
361v8b emulation is enabled.
362
363
364Visual C++ (IDE)
365----------------
366
367Choose the appropriate CMake generator option for your version of Visual Studio
368(run "cmake" with no arguments for a list of available generators.) For
369instance:
370
371 cd {build_directory}
372 cmake -G "Visual Studio 9 2008" {source_directory}
373
374You can then open ALL_BUILD.vcproj in Visual Studio and build one of the
375configurations in that project ("Debug", "Release", etc.) to generate a full
376build of libjpeg-turbo.
377
378This will generate the following files under {build_directory}:
379
380 {configuration}/jpeg-static.lib
381 Static link library for libjpeg-turbo
382 sharedlib/{configuration}/jpeg{version}.dll
383 DLL for libjpeg-turbo
384 sharedlib/{configuration}/jpeg.lib
385 Import library for libjpeg-turbo DLL
386 {configuration}/turbojpeg-static.lib
387 Static link library for TurboJPEG/OSS
388 {configuration}/turbojpeg.dll
389 DLL for TurboJPEG/OSS
390 {configuration}/turbojpeg.lib
391 Import library for TurboJPEG/OSS DLL
392
393{configuration} is Debug, Release, RelWithDebInfo, or MinSizeRel, depending on
394the configuration you built in the IDE, and {version} is 62, 7, or 8,
395depending on whether libjpeg v6b (default), v7, or v8b emulation is enabled.
396
397
398MinGW
399-----
400
401 cd {build_directory}
402 cmake -G "MSYS Makefiles" {source_directory}
403 make
404
405This will generate the following files under {build_directory}
406
407 libjpeg.a
408 Static link library for libjpeg-turbo
409 sharedlib/libjpeg-{version}.dll
410 DLL for libjpeg-turbo
411 sharedlib/libjpeg.dll.a
412 Import library for libjpeg-turbo DLL
413 libturbojpeg.a
414 Static link library for TurboJPEG/OSS
415 libturbojpeg.dll
416 DLL for TurboJPEG/OSS
417 libturbojpeg.dll.a
418 Import library for TurboJPEG/OSS DLL
419
420{version} is 62, 7, or 8, depending on whether libjpeg v6b (default), v7, or
421v8b emulation is enabled.
422
423
DRCcc243742010-10-16 09:22:43 +0000424Debug Build
425-----------
426
427Add "-DCMAKE_BUILD_TYPE=Debug" to the cmake command line. Or, if building with
428NMake, remove "-DCMAKE_BUILD_TYPE=Release" (Debug builds are the default with
429NMake.)
430
431
432libjpeg v7 or v8b Emulation
433---------------------------
434
435Add "-DWITH_JPEG7=1" to the cmake command line to build a version of
436libjpeg-turbo that is compatible with libjpeg v7. Add "-DWITH_JPEG8=1" to the
437cmake command to build a version of libjpeg-turbo that is compatible with
DRC81543312010-10-18 07:23:58 +0000438libjpeg v8b. See README-turbo.txt for more information on libjpeg v7 and v8b
DRCcc243742010-10-16 09:22:43 +0000439emulation.
440
441
DRC245cfdf2010-11-23 17:11:06 +0000442Arithmetic Coding Support
443-------------------------
444
445Since the patent on arithmetic coding has expired, this functionality has been
446included in this release of libjpeg-turbo. libjpeg-turbo's implementation is
447based on the implementation in libjpeg v8b, but it works when emulating libjpeg
448v7 or v6b as well. The default is to enable both arithmetic encoding and
449decoding, but those who have philosophical objections to arithmetic coding can
450add "-DWITH_ARITH_ENC=0" or "-DWITH_ARITH_DEC=0" to the cmake command line to
451disable encoding or decoding (respectively.)
452
453
DRC26658432010-10-16 22:04:29 +0000454========================
455Installing libjpeg-turbo
456========================
457
458You can use the build system to install libjpeg-turbo into a directory of your
459choosing (as opposed to creating an installer.) To do this, add:
460
461 -DCMAKE_INSTALL_PREFIX={install_directory}
462
463to the cmake command line.
464
465For example,
466
DRC81543312010-10-18 07:23:58 +0000467 cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release \
DRC26658432010-10-16 22:04:29 +0000468 -DCMAKE_INSTALL_PREFIX=c:\libjpeg-turbo {source_directory}
469 nmake install
470
471will install the header files in c:\libjpeg-turbo\include, the library files
472in c:\libjpeg-turbo\lib, the DLL's in c:\libjpeg-turbo\bin, and the
473documentation in c:\libjpeg-turbo\doc.
474
475
DRCcc243742010-10-16 09:22:43 +0000476=============
477Build Recipes
478=============
479
480
DRC1c73ce82010-10-16 21:02:54 +000048164-bit MinGW Build on Cygwin
482----------------------------
483
484 cd {build_directory}
485 CC=/usr/bin/x86_64-w64-mingw32-gcc CXX=/usr/bin/x86_64-w64-mingw32-g++ \
DRC68bf3f22010-10-18 07:56:14 +0000486 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
487 -DCMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar \
DRC1c73ce82010-10-16 21:02:54 +0000488 -DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib {source_directory}
489 make
490
491This produces a 64-bit build of libjpeg-turbo that does not depend on
492cygwin1.dll or other Cygwin DLL's. The mingw64-x86_64-gcc-core and
493mingw64-x86_64-gcc-g++ packages (and their dependencies) must be installed.
494
495
49632-bit MinGW Build on Cygwin
497----------------------------
498
499 cd {build_directory}
500 CC=/usr/bin/i686-w64-mingw32-gcc CXX=/usr/bin/i686-w64-mingw32-g++ \
DRC68bf3f22010-10-18 07:56:14 +0000501 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
502 -DDCMAKE_AR=/usr/bin/i686-w64-mingw32-ar \
DRC1c73ce82010-10-16 21:02:54 +0000503 -DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib {source_directory}
504 make
505
506This produces a 32-bit build of libjpeg-turbo that does not depend on
507cygwin1.dll or other Cygwin DLL's. The mingw64-i686-gcc-core and
508mingw64-i686-gcc-g++ packages (and their dependencies) must be installed.
509
510
511MinGW-w64 Build on Windows
512--------------------------
513
514This produces a 64-bit build of libjpeg-turbo using the "native" MinGW-w64
515toolchain (which is faster than the Cygwin version):
516
517 cd {build_directory}
518 CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \
519 CXX={mingw-w64_binary_path}/x86_64-w64-mingw32-g++ \
DRC81543312010-10-18 07:23:58 +0000520 cmake -G "MSYS Makefiles" \
DRC1c73ce82010-10-16 21:02:54 +0000521 -DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \
522 -DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \
523 {source_directory}
524 make
525
526
DRCcc243742010-10-16 09:22:43 +0000527MinGW Build on Linux
528--------------------
529
530 cd {build_directory}
531 CC={mingw_binary_path}/i386-mingw32-gcc \
532 CXX={mingw_binary_path}/i386-mingw32-g++ \
DRC68bf3f22010-10-18 07:56:14 +0000533 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
534 -DCMAKE_AR={mingw_binary_path}/i386-mingw32-ar \
DRCcc243742010-10-16 09:22:43 +0000535 -DCMAKE_RANLIB={mingw_binary_path}/i386-mingw32-ranlib \
DRC68bf3f22010-10-18 07:56:14 +0000536 {source_directory}
DRCcc243742010-10-16 09:22:43 +0000537 make
DRC8b014d72010-02-18 13:03:41 +0000538
DRC68fef832010-02-16 05:29:10 +0000539
540*******************************************************************************
541** Creating Release Packages
542*******************************************************************************
543
544The following commands can be used to create various types of release packages:
545
DRCcc243742010-10-16 09:22:43 +0000546
547Unix
548----
549
DRC68fef832010-02-16 05:29:10 +0000550make rpm
551
DRCcc243742010-10-16 09:22:43 +0000552 Create Red Hat-style binary RPM package. Requires RPM v4 or later.
DRC68fef832010-02-16 05:29:10 +0000553
554make srpm
555
556 This runs 'make dist' to create a pristine source tarball, then creates a
DRCcc243742010-10-16 09:22:43 +0000557 Red Hat-style source RPM package from the tarball. Requires RPM v4 or later.
DRC68fef832010-02-16 05:29:10 +0000558
559make deb
560
561 Create Debian-style binary package. Requires dpkg.
562
563make dmg
564
565 Create Macintosh package/disk image. This requires the PackageMaker
566 application, which must be installed in /Developer/Applications/Utilities.
567
DRC9ef93db2010-10-18 08:24:42 +0000568make udmg [BUILDDIR32={32-bit build directory}]
DRC68fef832010-02-16 05:29:10 +0000569
DRC0dedd1a2010-07-02 09:20:12 +0000570 On 64-bit OS X systems, this creates a version of the Macintosh package and
DRC9ef93db2010-10-18 08:24:42 +0000571 disk image which contains universal i386/x86-64 binaries. You should first
572 configure a 32-bit out-of-tree build of libjpeg-turbo, then configure a
573 64-bit out-of-tree build, then run 'make udmg' from the 64-bit build
574 directory. The build system will look for the 32-bit build under
575 {source_directory}/osxx86 by default, but you can override this by setting
576 the BUILDDIR32 variable on the make command line as shown above.
DRC68fef832010-02-16 05:29:10 +0000577
DRC0f53df82010-10-21 19:47:06 +0000578make sunpkg
579
580 Build a Solaris package. This requires pkgmk, pkgtrans, and bzip2.
581
582make csunpkg [BUILDDIR32={32-bit build directory}]
583
584 On 64-bit Solaris systems, this creates a combined package which contains
585 both 32-bit and 64-bit libraries. You should first configure a 32-bit
586 out-of-tree build of libjpeg-turbo, then configure a 64-bit out-of-tree
587 build, then run 'make csunpkg' from the 64-bit build directory. The build
588 system will look for the 32-bit build under {source_directory}/solx86 by
589 default, but you can override this by setting the BUILDDIR32 variable on the
590 make command line as shown above.
591
DRC81543312010-10-18 07:23:58 +0000592make cygwinpkg
593
594 Build a Cygwin binary package.
595
DRC0a1f68e2010-02-24 07:24:26 +0000596
DRCcc243742010-10-16 09:22:43 +0000597Windows
598-------
DRC0a1f68e2010-02-24 07:24:26 +0000599
DRCcc243742010-10-16 09:22:43 +0000600If using NMake:
DRC68fef832010-02-16 05:29:10 +0000601
DRCcc243742010-10-16 09:22:43 +0000602 cd {build_directory}
603 nmake installer
604
DRC81543312010-10-18 07:23:58 +0000605If using MinGW:
DRCcc243742010-10-16 09:22:43 +0000606
607 cd {build_directory}
608 make installer
609
610If using the Visual Studio IDE, build the "installer" project.
611
612The installer package (libjpeg-turbo[-gcc][64].exe) will be located under
613{build_directory}. If building using the Visual Studio IDE, then the installer
614package will be located in a subdirectory with the same name as the
615configuration you built (such as {build_directory}\Debug\ or
616{build_directory}\Release\).
617
618Building a Windows installer requires the Nullsoft Install System
619(http://nsis.sourceforge.net/.) makensis.exe should be in your PATH.