MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / create

Function create

tools/ports/bullet.py:20–46  ·  view source on GitHub ↗
(final)

Source from the content-addressed store, hash-verified

18 ports.fetch_project('bullet', f'https://github.com/emscripten-ports/bullet/archive/{TAG}.zip', sha512hash=HASH)
19
20 def create(final):
21 source_path = ports.get_dir('bullet', 'Bullet-' + TAG)
22 src_path = os.path.join(source_path, 'bullet', 'src')
23
24 dest_include_path = ports.get_include_dir('bullet')
25 for base, _, files in os.walk(src_path):
26 for f in files:
27 if os.path.splitext(f)[1] != '.h':
28 continue
29 fullpath = os.path.join(base, f)
30 relpath = os.path.relpath(fullpath, src_path)
31 target = os.path.join(dest_include_path, relpath)
32 shared.safe_ensure_dirs(os.path.dirname(target))
33 shutil.copyfile(fullpath, target)
34
35 includes = []
36 for base, dirs, _ in os.walk(src_path, topdown=False):
37 for dir in dirs:
38 includes.append(os.path.join(base, dir))
39
40 flags = [
41 '-Wno-single-bit-bitfield-constant-conversion',
42 '-Wno-int-to-void-pointer-cast',
43 '-std=gnu++14',
44 ]
45 ports.make_pkg_config('bullet', TAG, '-sUSE_BULLET')
46 ports.build_port(src_path, final, 'bullet', includes=includes, flags=flags, exclude_dirs=['MiniCL'])
47
48 return [shared.cache.get_lib('libbullet.a', create)]
49

Callers

nothing calls this directly

Calls 6

get_include_dirMethod · 0.80
appendMethod · 0.80
make_pkg_configMethod · 0.80
build_portMethod · 0.80
get_dirMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected