signmsg.parts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. # Normal stuff that all Parts should have
  18. env.PartName("signmsg")
  19. src_files = Pattern(src_dir='src/',
  20. includes=['*.c'],
  21. recursive=True).files()
  22. inc_files = Pattern(src_dir='src/',
  23. includes=['*.h'],
  24. recursive=True).files()
  25. parts_file = ['signmsg.parts']
  26. if 'install_package' in env['MODE']:
  27. env.InstallTopLevel(inc_files + src_files,sub_dir='example/${PART_SHORT_NAME}/src')
  28. env.InstallTopLevel(parts_file, sub_dir='example/${PART_SHORT_NAME}')
  29. else:
  30. env.DependsOn([
  31. Component('member'),
  32. Component('util')
  33. ])
  34. env.Append(CPPPATH='#/example/signmsg')
  35. if env['TARGET_PLATFORM']['OS'] == 'win32':
  36. if env.isConfigBasedOn('debug'):
  37. env['PDB'] = '${PART_NAME}.pdb'
  38. outputs = env.Program('${PART_NAME}', src_files,
  39. no_import_lib=True)
  40. env.InstallBin(outputs,
  41. no_pkg=False,
  42. INSTALL_BIN='${INSTALL_SAMPLE_BIN}')