mirror of
https://github.com/godotengine/godot.git
synced 2024-12-09 10:09:20 +08:00
e91a267a7c
Tried to organize the configure(env) calls in sections, using the same order for all platforms whenever possible. Apart from cosmetic changes, the following issues were fixed: - Android: cleanup linkage, remove GLESv1_CM and GLESv2 - iPhone: Remove obsolete "ios_gles22_override" option - OSX: * Fix bits detection (default to 64) and remove obsolete "force_64_bits" option (closes #9449) * Make "fat" bits argument explicit - Server: sync with X11 - Windows: clean up old DirectX 9 stuff - X11: * Do not require system OpenSSL for building (closes #9443) * Fix typo'ed use_leak_sanitizer option * Fix .llvm suffix overriding custom extra_suffix
69 lines
1.4 KiB
Python
69 lines
1.4 KiB
Python
import os
|
|
import sys
|
|
|
|
|
|
def is_active():
|
|
return True
|
|
|
|
|
|
def get_name():
|
|
return "Haiku"
|
|
|
|
|
|
def can_build():
|
|
|
|
if (os.name != "posix" or sys.platform == "darwin"):
|
|
return False
|
|
|
|
return True
|
|
|
|
|
|
def get_opts():
|
|
|
|
return [
|
|
('debug_release', 'Add debug symbols to release version', 'no')
|
|
]
|
|
|
|
|
|
def get_flags():
|
|
|
|
return [
|
|
]
|
|
|
|
|
|
def configure(env):
|
|
|
|
## Build type
|
|
|
|
if (env["target"] == "release"):
|
|
if (env["debug_release"] == "yes"):
|
|
env.Prepend(CCFLAGS=['-g2'])
|
|
else:
|
|
env.Prepend(CCFLAGS=['-O3', '-ffast-math'])
|
|
|
|
elif (env["target"] == "release_debug"):
|
|
env.Prepend(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED'])
|
|
|
|
elif (env["target"] == "debug"):
|
|
env.Prepend(CCFLAGS=['-g2', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
|
|
|
|
## Architecture
|
|
|
|
is64 = sys.maxsize > 2**32
|
|
if (env["bits"] == "default"):
|
|
env["bits"] = "64" if is64 else "32"
|
|
|
|
## Compiler configuration
|
|
|
|
env["CC"] = "gcc-x86"
|
|
env["CXX"] = "g++-x86"
|
|
|
|
## Flags
|
|
|
|
env.Append(CPPPATH=['#platform/haiku'])
|
|
env.Append(CPPFLAGS=['-DUNIX_ENABLED', '-DOPENGL_ENABLED', '-DGLES2_ENABLED', '-DGLES_OVER_GL'])
|
|
env.Append(CPPFLAGS=['-DMEDIA_KIT_ENABLED'])
|
|
# env.Append(CCFLAGS=['-DFREETYPE_ENABLED'])
|
|
env.Append(CPPFLAGS=['-DPTHREAD_NO_RENAME']) # TODO: enable when we have pthread_setname_np
|
|
env.Append(LIBS=['be', 'game', 'media', 'network', 'bnetapi', 'z', 'GL'])
|