ippcpepid.parts 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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("ippcpepid")
  19. env.DependsOn([
  20. Component('ippcommon'),
  21. Component('ippcp'),
  22. ])
  23. IPP_LIBNAME = '${PART_SHORT_NAME}'
  24. env.ExportCPPPATH([AbsDir('sources/ippcp/src/')]) #ippcpepid needs this
  25. #includes to install
  26. install_headers = Pattern(src_dir='include/',
  27. includes=[
  28. 'ippcpepid.h',
  29. ],
  30. excludes=[],
  31. recursive=True)
  32. # common headers, for SdkInclude
  33. common_headers = Pattern(src_dir='include/',
  34. includes=['ippdefs.h',
  35. 'ippversion.h',
  36. 'ippcore.h',
  37. 'ippbase.h',
  38. 'ipptypes.h'],
  39. excludes=[],
  40. recursive=True)
  41. #files
  42. ippcp_files = Pattern(src_dir='sources/ippcpepid/src/',
  43. includes=[
  44. 'pcp*.c',
  45. ],
  46. excludes=['pcpepidmain.c'],
  47. recursive=True)
  48. ippdir = ''
  49. #internal ipp includes src/primitives/ipp/
  50. env.Append(CPPPATH=[AbsDir('include/')])
  51. env.Append(CPPPATH=[AbsDir('sources/ippcp/src/')])
  52. env.Append(CPPPATH=[AbsDir('sources/ippcpepid/src/')])
  53. #ipp defines
  54. env.Append(CPPDEFINES='_IPP_v50_') #required for all ippcp
  55. env.Append(CPPDEFINES='_IPP_DEBUG') #enable function sanity checking
  56. if 'install_package' in env['MODE']:
  57. # All files at /ext/ipp/source/include
  58. env.InstallTopLevel(install_headers, sub_dir='ext/ipp/include')
  59. src_files = Pattern(src_dir='sources/ippcpepid/src/',
  60. includes=['*'],
  61. excludes=['pcpepidmain.c'],
  62. recursive=True)
  63. env.InstallTopLevel(src_files, sub_dir='ext/ipp/sources/ippcpepid/src')
  64. this_file = Pattern(src_dir='.',
  65. includes=['ippcpepid.parts'],
  66. excludes=[],
  67. recursive=True)
  68. env.InstallTopLevel(this_file, sub_dir='ext/ipp/')
  69. else:
  70. all_c_files = ippcp_files.files()
  71. outputs = env.Library(IPP_LIBNAME, all_c_files)
  72. env.SdkLib(outputs)
  73. env.SdkInclude(install_headers)
  74. env.SdkInclude(common_headers)
  75. if 'install_lib' in env['MODE']:
  76. env.InstallLib(outputs)