diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-06-30 19:21:38 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-07-01 08:20:51 +0200 |
commit | e91a267a7c9e1e82118ab4f98ed60908c34de115 (patch) | |
tree | 0c5dcb787980082f3dcfc1a5c92f2a4e5a304992 /platform/haiku | |
parent | cb59236ce938fdf3ffe20b1f77c4f7058ddaadf1 (diff) | |
download | redot-engine-e91a267a7c9e1e82118ab4f98ed60908c34de115.tar.gz |
Buildsystem: Improve detect.py readability and fix issues
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
Diffstat (limited to 'platform/haiku')
-rw-r--r-- | platform/haiku/detect.py | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py index 54e227cd19..c0e003a3d2 100644 --- a/platform/haiku/detect.py +++ b/platform/haiku/detect.py @@ -11,57 +11,58 @@ def get_name(): def can_build(): - if (os.name != "posix"): - return False - if (sys.platform == "darwin"): + 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): - is64 = sys.maxsize > 2**32 - - if (env["bits"] == "default"): - if (is64): - env["bits"] = "64" - else: - env["bits"] = "32" - - env.Append(CPPPATH=['#platform/haiku']) - env["CC"] = "gcc-x86" - env["CXX"] = "g++-x86" + ## Build type if (env["target"] == "release"): if (env["debug_release"] == "yes"): - env.Append(CCFLAGS=['-g2']) + env.Prepend(CCFLAGS=['-g2']) else: - env.Append(CCFLAGS=['-O3', '-ffast-math']) + env.Prepend(CCFLAGS=['-O3', '-ffast-math']) + elif (env["target"] == "release_debug"): - env.Append(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED']) + env.Prepend(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED']) + elif (env["target"] == "debug"): - env.Append(CCFLAGS=['-g2', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED']) + 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(CPPFLAGS=['-DOPENGL_ENABLED', '-DMEDIA_KIT_ENABLED']) - env.Append(CPPFLAGS=['-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DGLES_OVER_GL']) env.Append(LIBS=['be', 'game', 'media', 'network', 'bnetapi', 'z', 'GL']) - - import methods - env.Append(BUILDERS={'GLSL120': env.Builder(action=methods.build_legacygl_headers, suffix='glsl.h', src_suffix='.glsl')}) - env.Append(BUILDERS={'GLSL': env.Builder(action=methods.build_glsl_headers, suffix='glsl.h', src_suffix='.glsl')}) - env.Append(BUILDERS={'GLSL120GLES': env.Builder(action=methods.build_gles2_headers, suffix='glsl.h', src_suffix='.glsl')}) |