blob: 45bd3d875e7cd0a062c75fc0a2ff13fc7d1fe66d [file] [log] [blame]
Joel Sutherlandd2fb1bf2018-10-02 16:08:25 -04001# 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
9import argparse
10import sys
11
12def GenerateModulemap():
13 parser = argparse.ArgumentParser(description='Generate modulemap')
14 parser.add_argument("-o", "--out", type=str, help="Output file.")
15 parser.add_argument("-n", "--name", type=str, help="Name of binary.")
16
17 args = parser.parse_args()
18
19 with open(args.out, "w") as outfile:
20 module_template = 'framework module %s {\n' \
21 ' umbrella header "%s.h"\n' \
22 '\n' \
23 ' export *\n' \
24 ' module * { export * }\n' \
25 '}\n' % (args.name, args.name)
26 outfile.write(module_template)
27 return 0
28
29
30if __name__ == '__main__':
31 sys.exit(GenerateModulemap())
32