eglpaths.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*************************************************************************/ /*!
  2. @Title OS-dependent library paths for EGL APIs
  3. @Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
  4. @License Strictly Confidential.
  5. */ /**************************************************************************/
  6. /* If the build options didn't set EGL_BASENAME_SUFFIX, leave it empty. */
  7. #if !defined(EGL_BASENAME_SUFFIX)
  8. #define EGL_BASENAME_SUFFIX
  9. #endif
  10. /* Work out the base path to the system EGL libraries. */
  11. #if defined(SUPPORT_ARC_PLATFORM)
  12. /*
  13. * On ARC, Mesa provides the EGL libraries, which appear in the same place
  14. * as standard Android (i.e. /system/vendor/lib/egl), and the DDK versions
  15. * are installed with all the other vendor libraries.
  16. */
  17. # define EGL_BASEPATH "/system/vendor/lib/"
  18. #elif defined(ANDROID)
  19. /*
  20. * On Android, 32- and 64-bit libraries are kept separately under
  21. * /system/lib and /system/lib64. The path we choose here depends on the
  22. * architecture of the code that's including this file.
  23. */
  24. # if __SIZEOF_POINTER__ == 8
  25. # define EGL_BASEPATH "/system/vendor/lib64/egl/"
  26. # else
  27. # define EGL_BASEPATH "/system/vendor/lib/egl/"
  28. # endif
  29. #elif defined(SUPPORT_TIZEN_PLATFORM)
  30. # define EGL_BASEPATH "/usr/lib/"
  31. #else
  32. /*
  33. * On Linux and other OSs, libraries are in the default linker search path, so there's no
  34. * need to specify a directory.
  35. */
  36. # define EGL_BASEPATH ""
  37. #endif
  38. /* Work out the prefix (usually "lib") of the EGL libraries. */
  39. #if defined(SUPPORT_NTO_LIB_REDIRECTION)
  40. # define EGL_LIBPREFIX "libIMG"
  41. #else
  42. # define EGL_LIBPREFIX "lib"
  43. #endif
  44. /* Work out the suffix (.so, .dll, etc) of the EGL libraries. */
  45. #if defined(_WIN32)
  46. # define EGL_LIBSUFFIX ".dll"
  47. #elif defined(INTEGRITY_OS)
  48. # define EGL_LIBSUFFIX ".a"
  49. #else
  50. # define EGL_LIBSUFFIX ".so"
  51. #endif
  52. /* For OGLES1, the name of the library changes depending on whether we're
  53. * building 1.0 or 1.1.
  54. */
  55. #if defined(SUPPORT_OPENGLES1_V1) || defined(SUPPORT_OPENGLES1_V1_ONLY)
  56. # define OGLES1_BASENAME "GLESv1_CM" EGL_BASENAME_SUFFIX
  57. #else
  58. # define OGLES1_BASENAME "GLES_CM" EGL_BASENAME_SUFFIX
  59. #endif
  60. /* Work out the final names and paths of the EGL libraries. */
  61. #define OGLES1LIBNAME EGL_BASEPATH EGL_LIBPREFIX OGLES1_BASENAME EGL_LIBSUFFIX
  62. #define OGLES3LIBNAME EGL_BASEPATH EGL_LIBPREFIX "GLESv2" EGL_BASENAME_SUFFIX EGL_LIBSUFFIX
  63. #if defined(LIB_IMG_OCL_NAME)
  64. #define OCLLIBNAME LIB_IMG_OCL_NAME
  65. #else
  66. #define OCLLIBNAME "libPVROCL" EGL_LIBSUFFIX
  67. #endif
  68. #if defined(_WIN32)
  69. # define OGLLIBNAME "opengl32.dll"
  70. #else
  71. # define OGLLIBNAME EGL_BASEPATH EGL_LIBPREFIX "GL" EGL_BASENAME_SUFFIX EGL_LIBSUFFIX
  72. #endif