You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.1 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. # Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
  2. #
  3. # Use of this source code is governed by a BSD-style license
  4. # that can be found in the LICENSE file in the root of the source
  5. # tree. An additional intellectual property rights grant can be found
  6. # in the file PATENTS. All contributing project authors may
  7. # be found in the AUTHORS file in the root of the source tree.
  8. import argparse
  9. import sys
  10. def GenerateModulemap():
  11. parser = argparse.ArgumentParser(description='Generate modulemap')
  12. parser.add_argument("-o", "--out", type=str, help="Output file.")
  13. parser.add_argument("-n", "--name", type=str, help="Name of binary.")
  14. args = parser.parse_args()
  15. with open(args.out, "w") as outfile:
  16. module_template = 'framework module %s {\n' \
  17. ' umbrella header "%s.h"\n' \
  18. '\n' \
  19. ' export *\n' \
  20. ' module * { export * }\n' \
  21. '}\n' % (args.name, args.name)
  22. outfile.write(module_template)
  23. return 0
  24. if __name__ == '__main__':
  25. sys.exit(GenerateModulemap())