ippcp.parts 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. ############################################################################
  2. # Copyright 2016 Intel Corporation
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ############################################################################
  16. Import('*')
  17. env.PartVersion("9.0.1")
  18. env.PartName("ippcp")
  19. env.DependsOn([Component('ippcommon')])
  20. ipp_libname = '${PART_SHORT_NAME}'
  21. ipp_src_install_loc = 'epid/src/primitives/${IPP_DIR}/'
  22. env.ExportCPPPATH([AbsDir('sources/ippcp/src/')]) #ippcpepid needs this
  23. #includes to install
  24. install_headers = Pattern(src_dir='include/',
  25. includes=[
  26. 'ippcp.h',
  27. 'ippcpdefs.h',
  28. ],
  29. excludes=[],
  30. recursive=True)
  31. # common headers, for SdkInclude
  32. common_headers = Pattern(src_dir='include/',
  33. includes=['ippdefs.h',
  34. 'ippversion.h',
  35. 'ippcore.h',
  36. 'ippbase.h',
  37. 'ipptypes.h'],
  38. excludes=[],
  39. recursive=True)
  40. #files
  41. ippcp_files = Pattern(src_dir='sources/ippcp/src/',
  42. includes=[
  43. 'pcp*.c',
  44. ],
  45. excludes=[],
  46. recursive=True)
  47. ippdir = ''
  48. #internal ipp includes src/primitives/ipp/
  49. env.Append(CPPPATH=[AbsDir('include/')])
  50. env.Append(CPPPATH=[AbsDir('sources/ippcp/src/')])
  51. #ipp defines
  52. env.Append(CPPDEFINES='_IPP_v50_') #required for all ippcp
  53. env.Append(CPPDEFINES='_IPP_DEBUG') #enable function sanity checking
  54. if 'install_package' in env['MODE']:
  55. # All files at /ext/ipp/source/include
  56. env.InstallTopLevel(install_headers, sub_dir='ext/ipp/include')
  57. src_files = Pattern(src_dir='sources/ippcp/src/',
  58. includes=['*'],
  59. excludes=[''],
  60. recursive=True)
  61. env.InstallTopLevel(src_files, sub_dir='ext/ipp/sources/ippcp/src')
  62. this_file = Pattern(src_dir='.',
  63. includes=['ippcp.parts'],
  64. excludes=[],
  65. recursive=True)
  66. env.InstallTopLevel(this_file, sub_dir='ext/ipp/')
  67. else:
  68. all_c_files = ippcp_files.files()
  69. outputs = env.Library(ipp_libname, all_c_files)
  70. env.SdkLib(outputs)
  71. env.SdkInclude(install_headers)
  72. env.SdkInclude(common_headers)
  73. if 'install_lib' in env['MODE']:
  74. env.InstallLib(outputs)