summaryrefslogtreecommitdiff
path: root/platform/x11/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11/detect.py')
-rw-r--r--platform/x11/detect.py39
1 files changed, 19 insertions, 20 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 933ee6b72e..f3a486df02 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -75,11 +75,7 @@ def get_opts():
def get_flags():
- return [
- ('builtin_freetype', False),
- ('builtin_libpng', False),
- ('builtin_zlib', False),
- ]
+ return []
def configure(env):
@@ -102,7 +98,7 @@ def configure(env):
env.Prepend(CCFLAGS=['-O2'])
else: #optimize for size
env.Prepend(CCFLAGS=['-Os'])
- env.Prepend(CPPFLAGS=['-DDEBUG_ENABLED'])
+ env.Prepend(CPPDEFINES=['DEBUG_ENABLED'])
if (env["debug_symbols"] == "yes"):
env.Prepend(CCFLAGS=['-g1'])
@@ -111,7 +107,7 @@ def configure(env):
elif (env["target"] == "debug"):
env.Prepend(CCFLAGS=['-g3'])
- env.Prepend(CPPFLAGS=['-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
+ env.Prepend(CPPDEFINES=['DEBUG_ENABLED', 'DEBUG_MEMORY_ENABLED'])
env.Append(LINKFLAGS=['-rdynamic'])
## Architecture
@@ -131,7 +127,7 @@ def configure(env):
env["CC"] = "clang"
env["CXX"] = "clang++"
env["LINK"] = "clang++"
- env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND'])
+ env.Append(CPPDEFINES=['TYPED_METHOD_BIND'])
env.extra_suffix = ".llvm" + env.extra_suffix
if env['use_lld']:
@@ -201,7 +197,7 @@ def configure(env):
env.ParseConfig('pkg-config xi --cflags --libs')
if (env['touch']):
- env.Append(CPPFLAGS=['-DTOUCH_ENABLED'])
+ env.Append(CPPDEFINES=['TOUCH_ENABLED'])
# FIXME: Check for existence of the libs before parsing their flags with pkg-config
@@ -216,15 +212,15 @@ def configure(env):
env.ParseConfig('pkg-config freetype2 --cflags --libs')
if not env['builtin_libpng']:
- env.ParseConfig('pkg-config libpng --cflags --libs')
+ env.ParseConfig('pkg-config libpng16 --cflags --libs')
if not env['builtin_bullet']:
- # We need at least version 2.88
+ # We need at least version 2.89
import subprocess
bullet_version = subprocess.check_output(['pkg-config', 'bullet', '--modversion']).strip()
- if str(bullet_version) < "2.88":
+ if str(bullet_version) < "2.89":
# Abort as system bullet was requested but too old
- print("Bullet: System version {0} does not match minimal requirements ({1}). Aborting.".format(bullet_version, "2.88"))
+ print("Bullet: System version {0} does not match minimal requirements ({1}). Aborting.".format(bullet_version, "2.89"))
sys.exit(255)
env.ParseConfig('pkg-config bullet --cflags --libs')
@@ -270,8 +266,8 @@ def configure(env):
# mbedTLS does not provide a pkgconfig config yet. See https://github.com/ARMmbed/mbedtls/issues/228
env.Append(LIBS=['mbedtls', 'mbedcrypto', 'mbedx509'])
- if not env['builtin_libwebsockets']:
- env.ParseConfig('pkg-config libwebsockets --cflags --libs')
+ if not env['builtin_wslay']:
+ env.ParseConfig('pkg-config libwslay --cflags --libs')
if not env['builtin_miniupnpc']:
# No pkgconfig file so far, hardcode default paths.
@@ -287,7 +283,7 @@ def configure(env):
if (os.system("pkg-config --exists alsa") == 0): # 0 means found
print("Enabling ALSA")
- env.Append(CPPFLAGS=["-DALSA_ENABLED", "-DALSAMIDI_ENABLED"])
+ env.Append(CPPDEFINES=["ALSA_ENABLED", "ALSAMIDI_ENABLED"])
# Don't parse --cflags, we don't need to add /usr/include/alsa to include path
env.ParseConfig('pkg-config alsa --libs')
else:
@@ -296,18 +292,18 @@ def configure(env):
if env['pulseaudio']:
if (os.system("pkg-config --exists libpulse") == 0): # 0 means found
print("Enabling PulseAudio")
- env.Append(CPPFLAGS=["-DPULSEAUDIO_ENABLED"])
+ env.Append(CPPDEFINES=["PULSEAUDIO_ENABLED"])
env.ParseConfig('pkg-config --cflags --libs libpulse')
else:
print("PulseAudio development libraries not found, disabling driver")
if (platform.system() == "Linux"):
- env.Append(CPPFLAGS=["-DJOYDEV_ENABLED"])
+ env.Append(CPPDEFINES=["JOYDEV_ENABLED"])
if env['udev']:
if (os.system("pkg-config --exists libudev") == 0): # 0 means found
print("Enabling udev support")
- env.Append(CPPFLAGS=["-DUDEV_ENABLED"])
+ env.Append(CPPDEFINES=["UDEV_ENABLED"])
env.ParseConfig('pkg-config libudev --cflags --libs')
else:
print("libudev development libraries not found, disabling udev support")
@@ -317,7 +313,7 @@ def configure(env):
env.ParseConfig('pkg-config zlib --cflags --libs')
env.Prepend(CPPPATH=['#platform/x11'])
- env.Append(CPPFLAGS=['-DX11_ENABLED', '-DUNIX_ENABLED', '-DOPENGL_ENABLED', '-DGLES_ENABLED'])
+ env.Append(CPPDEFINES=['X11_ENABLED', 'UNIX_ENABLED', 'OPENGL_ENABLED', 'GLES_ENABLED'])
env.Append(LIBS=['GL', 'pthread'])
if (platform.system() == "Linux"):
@@ -328,6 +324,9 @@ def configure(env):
if env["execinfo"]:
env.Append(LIBS=['execinfo'])
+
+ if not env['tools']:
+ env.Append(LINKFLAGS=['-T', 'platform/x11/pck_embed.ld'])
## Cross-compilation