tinycommon.parts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # pylint:disable=I0011,W0401,W0614,C0103,E0602
  2. ############################################################################
  3. # Copyright 2017 Intel Corporation
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. ############################################################################
  17. """Build confioguration for include-only common
  18. Needed to avoid linking to avoid listing ipp in dependencies when only
  19. depending on headers. Eventually should unify this into single header.
  20. """
  21. Import('*')
  22. env.PartName('tinycommon')
  23. include_files = Pattern(src_dir='.',
  24. includes=['*.h'],
  25. recursive=False).files()
  26. install_files = Pattern(src_dir='.',
  27. includes=[
  28. '*.h',
  29. '*.c',
  30. '*-test.cc',
  31. '*-testhelper.cc',
  32. '*.parts'
  33. 'Makefile'],
  34. recursive=True)
  35. if 'install_package' in env['MODE']:
  36. env.InstallTopLevel(install_files,
  37. sub_dir='epid/common')
  38. else:
  39. env.SdkInclude(include_files, sub_dir='epid/common')
  40. if 'install_lib' in env['MODE']:
  41. env.InstallInclude(include_files, sub_dir='epid/common')