later, whereas the 64-bit fork is compatible with OS X 10.6 and later. OS X
10.4 compatibility SDK required.
+make nsi
+
+ When using MinGW, this creates a Win32 installer for the GCC version of the
+ libjpeg-turbo SDK. This requires the Nullsoft Install System
+ (http://nsis.sourceforge.net/.) makensis.exe should be in your PATH.
+
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.
+ This creates a Win32 installer for the Visual C++ version of the
+ libjpeg-turbo SDK. This requires the Nullsoft Install System
+ (http://nsis.sourceforge.net/.) makensis.exe should be in your PATH.
${DEBARCH} ${srcdir} $(CC) $(CXX)
endif
+
+nsi: all
+ makensis -nocd -DVERSION=$(VERSION) -DAPPNAME=libjpeg-turbo-gcc \
+ -DWLIBDIR=.libs -DWSRCDIR=$(srcdir) -DWBLDDIR=. -DWHDRDIR=. \
+ -DPLATFORM="GCC" -DGCC $(srcdir)/release/libjpeg-turbo.nsi
({lib} = lib, lib32, lib64, or lib/amd64, as appropriate.)
-This is useful, for instance, if you want to build an application that
-leverages the libjpeg-turbo colorspace extensions (see below.) On Linux and
-Solaris systems, you would still need to manipulate the LD_LIBRARY_PATH or sym
-links appropriately to use libjpeg-turbo at run time. On such systems, you can
-pass -R /opt/libjpeg-turbo/{lib} to the linker to force the use of
-libjpeg-turbo at run time rather than libjpeg (also useful if you want to
-leverage the colorspace extensions), or you can link against the libjpeg-turbo
-static library.
-
-To force a Linux or Solaris application to link against the static version of
-libjpeg-turbo, you can use the following linker options:
+If using Cygwin, then set
+
+ CPATH=/cygdrive/c/libjpeg-turbo-gcc/include
+ and
+ LIBRARY_PATH=/cygdrive/c/libjpeg-turbo-gcc/lib
+
+If using MinGW, then set
+
+ CPATH=/c/libjpeg-turbo-gcc/include
+ and
+ LIBRARY_PATH=/c/libjpeg-turbo-gcc/lib
+
+Building against libjpeg-turbo is useful, for instance, if you want to build an
+application that leverages the libjpeg-turbo colorspace extensions (see below.)
+On Linux and Solaris systems, you would still need to manipulate the
+LD_LIBRARY_PATH or sym links appropriately to use libjpeg-turbo at run time.
+On such systems, you can pass -R /opt/libjpeg-turbo/{lib} to the linker to
+force the use of libjpeg-turbo at run time rather than libjpeg (also useful if
+you want to leverage the colorspace extensions), or you can link against the
+libjpeg-turbo static library.
+
+To force a Linux, Solaris, or MinGW application to link against the static
+version of libjpeg-turbo, you can use the following linker options:
-Wl,-Bstatic -ljpeg -Wl,-Bdynamic
-or you can simply add /opt/libjpeg-turbo/{lib}/libjpeg.a to the linker command
-line (the latter is the only way to link against the static version of
-libjpeg-turbo on OS X.)
+On OS X, simply add /opt/libjpeg-turbo/{lib}/libjpeg.a to the linker command
+line (this also works on Linux and Solaris.)
To build Visual C++ applications using libjpeg-turbo, add
c:\libjpeg-turbo\include to your system or user INCLUDE environment variable
then link against either jpeg.lib (to use jpeg62.dll) or jpeg-static.lib (to
use the static version of libjpeg-turbo.)
-If building an application using Cygwin, then set
-
- CPATH=/cygdrive/c/libjpeg-turbo/include
- and
- LIBRARY_PATH=/cygdrive/c/libjpeg-turbo/lib
-
-If using MinGW, then set
-
- CPATH=/c/libjpeg-turbo/include
- and
- LIBRARY_PATH=/c/libjpeg-turbo/lib
-
-and link using -ljpeg in both cases. NOTE: The static libraries shipped with
-the Windows version of libjpeg-turbo cannot be used with MinGW and Cygwin. If
-you wish to link statically with libjpeg-turbo using MinGW or Cygwin, then you
-will need to build libjpeg-turbo from source using GCC.
-
=====================
Colorspace Extensions
=====================
-Name "libjpeg-turbo SDK"
-OutFile ${WSRCDIR}\libjpeg-turbo.exe
-InstallDir ${WINSTDIR}
+Name "libjpeg-turbo SDK for ${PLATFORM}"
+OutFile ${WBLDDIR}\${APPNAME}.exe
+InstallDir c:\${APPNAME}
SetCompressor bzip2
UninstPage uninstConfirm
UninstPage instfiles
-Section "libjpeg-turbo SDK (required)"
+Section "libjpeg-turbo SDK for ${PLATFORM} (required)"
SectionIn RO
SetOutPath $SYSDIR
- File "${WSRCDIR}\turbojpeg.dll"
- File "${WSRCDIR}\jpeg62.dll"
+!ifdef GCC
+ File "${WLIBDIR}\libturbojpeg.dll"
+ File "${WLIBDIR}\libjpeg-62.dll"
+!else
+ File "${WLIBDIR}\turbojpeg.dll"
+ File "${WLIBDIR}\jpeg62.dll"
+!endif
SetOutPath $INSTDIR\lib
- File "${WSRCDIR}\turbojpeg.lib"
- File "${WSRCDIR}\turbojpeg-static.lib"
- File "${WSRCDIR}\jpeg.lib"
- File "${WSRCDIR}\jpeg-static.lib"
+!ifdef GCC
+ File "${WLIBDIR}\libturbojpeg.dll.a"
+ File "${WLIBDIR}\libturbojpeg.a"
+ File "${WLIBDIR}\libjpeg.dll.a"
+ File "${WLIBDIR}\libjpeg.a"
+!else
+ File "${WLIBDIR}\turbojpeg.lib"
+ File "${WLIBDIR}\turbojpeg-static.lib"
+ File "${WLIBDIR}\jpeg.lib"
+ File "${WLIBDIR}\jpeg-static.lib"
+!endif
SetOutPath $INSTDIR\include
- File "win\jconfig.h"
- File "jerror.h"
- File "jmorecfg.h"
- File "jpeglib.h"
- File "turbojpeg.h"
+ File "${WHDRDIR}\jconfig.h"
+ File "${WSRCDIR}\jerror.h"
+ File "${WSRCDIR}\jmorecfg.h"
+ File "${WSRCDIR}\jpeglib.h"
+ File "${WSRCDIR}\turbojpeg.h"
SetOutPath $INSTDIR
- File "README"
- File "README-turbo.txt"
- File "libjpeg.doc"
- File "LGPL.txt"
- File "LICENSE.txt"
+ File "${WSRCDIR}\README"
+ File "${WSRCDIR}\README-turbo.txt"
+ File "${WSRCDIR}\libjpeg.doc"
+ File "${WSRCDIR}\LGPL.txt"
+ File "${WSRCDIR}\LICENSE.txt"
- WriteRegStr HKLM "SOFTWARE\libjpeg-turbo ${VERSION}" "Install_Dir" "$INSTDIR"
+ WriteRegStr HKLM "SOFTWARE\${APPNAME} ${VERSION}" "Install_Dir" "$INSTDIR"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}" "DisplayName" "libjpeg-turbo SDK ${VERSION}"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}" "UninstallString" '"$INSTDIR\uninstall_${VERSION}.exe"'
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}" "NoModify" 1
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}" "NoRepair" 1
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME} ${VERSION}" "DisplayName" "libjpeg-turbo SDK v${VERSION} for ${PLATFORM}"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME} ${VERSION}" "UninstallString" '"$INSTDIR\uninstall_${VERSION}.exe"'
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME} ${VERSION}" "NoModify" 1
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME} ${VERSION}" "NoRepair" 1
WriteUninstaller "uninstall_${VERSION}.exe"
SectionEnd
SetShellVarContext all
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}"
- DeleteRegKey HKLM "SOFTWARE\libjpeg-turbo ${VERSION}"
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME} ${VERSION}"
+ DeleteRegKey HKLM "SOFTWARE\${APPNAME} ${VERSION}"
+!ifdef GCC
+ Delete $SYSDIR\libjpeg-62.dll
+ Delete $SYSDIR\libturbojpeg.dll
+ Delete $INSTDIR\lib\libturbojpeg.dll.a"
+ Delete $INSTDIR\lib\libturbojpeg.a"
+ Delete $INSTDIR\lib\libjpeg.dll.a"
+ Delete $INSTDIR\lib\libjpeg.a"
+!else
Delete $SYSDIR\jpeg62.dll
Delete $SYSDIR\turbojpeg.dll
Delete $INSTDIR\lib\jpeg.lib
Delete $INSTDIR\lib\jpeg-static.lib
Delete $INSTDIR\lib\turbojpeg.lib
Delete $INSTDIR\lib\turbojpeg-static.lib
+!endif
Delete $INSTDIR\include\jconfig.h"
Delete $INSTDIR\include\jerror.h"
Delete $INSTDIR\include\jmorecfg.h"
$(LINK) $(LDFLAGS) -out:$@ $^
-WINSTDIR=c:\\libjpeg-turbo
-WSRCDIR=windows
-
dist: all
$(RM) $(ODIR)/libjpeg-turbo.exe
- makensis /nocd //DVERSION=$(VERSION) //DWINSTDIR=$(WINSTDIR) \
- //DWSRCDIR=$(WSRCDIR) release/libjpeg-turbo.nsi || \
- makensis /nocd /DVERSION=$(VERSION) /DWINSTDIR=$(WINSTDIR) \
- /DWSRCDIR=$(WSRCDIR) release/libjpeg-turbo.nsi # Cygwin doesn't like the //
+ makensis -nocd -DVERSION=$(VERSION) -DAPPNAME=libjpeg-turbo \
+ -DWLIBDIR=windows -DWSRCDIR=. -DWBLDDIR=windows -DWHDRDIR=win \
+ -DPLATFORM="Visual C++" release/libjpeg-turbo.nsi
test: testclean $(ODIR)/cjpeg.exe $(ODIR)/djpeg.exe $(ODIR)/jpegtran.exe \