--- /dev/null
+Name "libjpeg-turbo SDK"
+OutFile libjpeg-turbo.exe
+InstallDir c:\libjpeg-turbo
+
+SetCompressor bzip2
+
+Page directory
+Page instfiles
+
+UninstPage uninstConfirm
+UninstPage instfiles
+
+Section "libjpeg-turbo SDK (required)"
+ SectionIn RO
+ SetOutPath $SYSDIR
+ File "turbojpeg.dll"
+ File "jpeg62.dll"
+ SetOutPath $INSTDIR\lib
+ File "turbojpeg.lib"
+ File "turbojpeg-static.lib"
+ File "jpeg.lib"
+ File "jpeg-static.lib"
+ SetOutPath $INSTDIR\include
+ File "win\jconfig.h"
+ File "jerror.h"
+ File "jmorecfg.h"
+ File "jpeglib.h"
+ File "turbojpeg.h"
+ SetOutPath $INSTDIR
+ File "LGPL.txt"
+ File "LICENSE.txt"
+
+ WriteRegStr HKLM "SOFTWARE\libjpeg-turbo ${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
+ WriteUninstaller "uninstall_${VERSION}.exe"
+SectionEnd
+
+Section "Uninstall"
+
+ SetShellVarContext all
+
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}"
+ DeleteRegKey HKLM "SOFTWARE\libjpeg-turbo ${VERSION}"
+
+ 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
+ Delete $INSTDIR\include\jconfig.h"
+ Delete $INSTDIR\include\jerror.h"
+ Delete $INSTDIR\include\jmorecfg.h"
+ Delete $INSTDIR\include\jpeglib.h"
+ Delete $INSTDIR\include\turbojpeg.h"
+ Delete $INSTDIR\uninstall_${VERSION}.exe
+ Delete $INSTDIR\LGPL.txt
+ Delete $INSTDIR\LICENSE.txt
+
+ RMDir "$INSTDIR\include"
+ RMDir "$INSTDIR\lib"
+ RMDir "$INSTDIR"
+
+SectionEnd
$(LINK) $(LDFLAGS) -out:$@ $^
+dist: all
+ $(RM) libjpeg-turbo.exe
+ makensis /nocd //DVERSION=$(VERSION) release/libjpeg-turbo.nsi || \
+ makensis /nocd /DVERSION=$(VERSION) release/libjpeg-turbo.nsi # Cygwin doesn't like the //
+
+
test: testclean cjpeg.exe djpeg.exe jpegtran.exe
jpegut
djpeg -dct int -ppm -outfile testout.ppm testorig.jpg