extractgrps.parts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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.PartName("extractgrps")
  18. src_files = Pattern(src_dir='src/',
  19. includes=['*.c'],
  20. recursive=True).files()
  21. parts_file = ['extractgrps.parts']
  22. if 'install_package' in env['MODE']:
  23. env.InstallTopLevel(src_files, sub_dir='tools/${PART_SHORT_NAME}/src')
  24. env.InstallTopLevel(parts_file, sub_dir='tools/${PART_SHORT_NAME}')
  25. else:
  26. env.DependsOn([
  27. Component('common'),
  28. Component('util'),
  29. Component('dropt')
  30. ])
  31. if env['TARGET_PLATFORM']['OS'] == 'win32':
  32. env.Append(CPPDEFINES='_CRT_SECURE_NO_WARNINGS')
  33. if env.isConfigBasedOn('debug'):
  34. env['PDB'] = '${PART_NAME}.pdb'
  35. outputs = env.Program('${PART_NAME}', src_files,
  36. no_import_lib=True)
  37. env.InstallBin(outputs,
  38. no_pkg=False,
  39. INSTALL_BIN='${INSTALL_TOOLS_BIN}')