Esenthel Building.txt 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. /******************************************************************************/
  2. // SOURCE CHANGED
  3. /******************************************************************************/
  4. "lib/jmemmgr.c" insert at the top:
  5. #include <limits.h> // ESENTHEL CHANGED
  6. "lib/simd/jsimd_arm.c"
  7. #ifndef __LP64__ // ESENTHEL CHANGED
  8. ..
  9. #endif // ESENTHEL CHANGED
  10. "lib/simd/jsimd_arm_neon.S"
  11. #ifndef __LP64__ // ESENTHEL CHANGED
  12. #if defined(__linux__) && defined(__ELF__)
  13. .section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
  14. #endif
  15. .text
  16. #ifndef __APPLE__ // ESENTHEL CHANGED
  17. .fpu neon
  18. .arch armv7a
  19. .object_arch armv4
  20. .arm
  21. .syntax unified
  22. #endif // ESENTHEL CHANGED
  23. ..
  24. #endif // ESENTHEL CHANGED
  25. "lib/simd/jsimd_arm64.c"
  26. #ifdef __LP64__ // ESENTHEL CHANGED
  27. ..
  28. #endif // ESENTHEL CHANGED
  29. "lib/simd/jsimd_arm64_neon.S"
  30. #ifdef __LP64__ // ESENTHEL CHANGED
  31. #if defined(__linux__) && defined(__ELF__)
  32. .section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
  33. #endif
  34. ..
  35. #endif // ESENTHEL CHANGED
  36. /******************************************************************************/
  37. // WINDOWS
  38. /******************************************************************************/
  39. Start CMake
  40. set source path to: C:\Esenthel\ThirdPartyLibs\JpegTurbo\lib
  41. set build path to: C:\Esenthel\ThirdPartyLibs\JpegTurbo\Windows32 (for VS 2015 32-bit builds)
  42. set build path to: C:\Esenthel\ThirdPartyLibs\JpegTurbo\Windows64 (for VS 2015 64-bit builds)
  43. set build path to: C:\Esenthel\ThirdPartyLibs\JpegTurbo\WindowsArm (for VS 2015 ARM builds)
  44. set build path to: C:\Esenthel\ThirdPartyLibs\JpegTurbo\Web (for VS 2015 32-bit builds)
  45. -copy nasm.exe to C:\Esenthel\ThirdPartyLibs\JpegTurbo\Windows32\simd and C:\Esenthel\ThirdPartyLibs\JpegTurbo\Windows64\simd
  46. -set config types: Release
  47. -disable sharedlibs
  48. -enable v7 and v8
  49. -FOR ARM/WEB DISABLE SIMD
  50. -generate
  51. -open libjpeg-turbo.sln
  52. -unload all projects except "simd" and "turbojpeg-static" - important !
  53. -edit project settings to set:
  54. Windows 32/64 - "xp platform toolset" and optimizations such as "fast" floating point mode and others
  55. Windows Arm - nothing
  56. Web - "emcc" platform toolset (if it's not available, then try adding "Emscripten" platform configuration first for the project)
  57. General/Target Extension needs to be reverted to default settings which is ".bc", to do that, click on the field, select "inherit from defaults" and click apply
  58. Clang/Output Files/Object File Name needs to be reverted to default settings which is "$(IntDir)%(Filename).o", to do that, click on the field, select "inherit from defaults" and click apply
  59. /******************************************************************************/
  60. // MAC
  61. /******************************************************************************/
  62. Install Autoconf:
  63. http://www.gnu.org/software/autoconf/autoconf.html#downloading
  64. download latest version and extract
  65. in Terminal go to that path
  66. ./configure
  67. make
  68. sudo make install
  69. Install Automake:
  70. https://www.gnu.org/software/automake/#downloading
  71. download latest version and extract
  72. in Terminal go to that path
  73. ./configure
  74. make
  75. sudo make install
  76. Install LibTool:
  77. https://www.gnu.org/software/libtool/#downloading
  78. download latest version and extract
  79. in Terminal go to that path
  80. ./configure
  81. make
  82. sudo make install
  83. Install latest version of Nasm:
  84. http://www.nasm.us/pub/nasm/releasebuilds/?C=M;O=D
  85. download latest version and extract
  86. in Terminal go to that path
  87. ./configure --prefix=/usr/local
  88. make
  89. sudo make install
  90. then proceed to the JpegTurbo:
  91. cd /Esenthel/ThirdPartyLibs/JpegTurbo/lib
  92. autoreconf -fiv
  93. mkdir ../Mac
  94. cd ../Mac
  95. ../lib/configure --with-jpeg7 --with-jpeg8
  96. make
  97. lib will be available in hidden folder:
  98. /Esenthel/ThirdPartyLibs/JpegTurbo/Mac/.libs/libturbojpeg.a
  99. copy back to Windows
  100. replace entire Mac folder from Windows
  101. /******************************************************************************/
  102. // LINUX
  103. /******************************************************************************/
  104. install nasm:
  105. sudo apt-get install nasm
  106. cd ~/Esenthel/ThirdPartyLibs/JpegTurbo/lib
  107. autoreconf -fiv
  108. mkdir ../Linux
  109. cd ../Linux
  110. ../lib/configure --with-jpeg7 --with-jpeg8
  111. make
  112. lib will be available in hidden folder:
  113. ThirdPartyLibs\JpegTurbo\Linux\.libs\libturbojpeg.a
  114. copy back to Windows
  115. RUN "extract.bat"
  116. /******************************************************************************/
  117. // IOS - THIS DOESN'T WORK SO XCODE PROJECT WAS CREATED
  118. /******************************************************************************/
  119. 32bit:
  120. IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
  121. IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk
  122. IOS_GCC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
  123. IOS_CFLAGS="-arch armv7 -miphoneos-version-min=4.3"
  124. cd {source_directory}
  125. autoreconf -fiv
  126. mkdir ../iOS32
  127. cd ../iOS32
  128. ../lib/configure --with-jpeg7 --with-jpeg8 --host arm-apple-darwin10 CC="$IOS_GCC" LD="$IOS_GCC" CFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT -O3 $IOS_CFLAGS" LDFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT $IOS_CFLAGS" CCASFLAGS="-no-integrated-as $IOS_CFLAGS"
  129. make
  130. 64 bit:
  131. IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
  132. IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk
  133. IOS_GCC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
  134. IOS_CFLAGS="-arch arm64 -miphoneos-version-min=4.3"
  135. cd {source_directory}
  136. autoreconf -fiv
  137. mkdir ../iOS64
  138. cd ../iOS64
  139. ../lib/configure --with-jpeg7 --with-jpeg8 --host aarch64-apple-darwin CC="$IOS_GCC" LD="$IOS_GCC" CFLAGS="-isysroot $IOS_SYSROOT -O3 $IOS_CFLAGS" LDFLAGS="-isysroot $IOS_SYSROOT $IOS_CFLAGS"
  140. make
  141. /******************************************************************************/