diff options
-rwxr-xr-x | tools/emmaken.py | 4 | ||||
-rw-r--r-- | tools/shared.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/emmaken.py b/tools/emmaken.py index e203f196..ca02f258 100755 --- a/tools/emmaken.py +++ b/tools/emmaken.py @@ -77,7 +77,9 @@ CONFIGURE_CONFIG = os.environ.get('EMMAKEN_JUST_CONFIGURE') CMAKE_CONFIG = 'CMakeFiles/cmTryCompileExec.dir' in ' '.join(sys.argv)# or 'CMakeCCompilerId' in ' '.join(sys.argv) if CONFIGURE_CONFIG or CMAKE_CONFIG: compiler = 'g++' if 'CXXCompiler' in ' '.join(sys.argv) or os.environ.get('EMMAKEN_CXX') else 'gcc' - exit(os.execvp(compiler, [compiler] + sys.argv[1:])) + cmd = [compiler] + EMSDK_OPTS + sys.argv[1:] + print >> sys.stderr, 'emmaken.py, just configuring: ', cmd + exit(os.execvp(compiler, cmd)) try: #f=open('/dev/shm/tmp/waka.txt', 'a') diff --git a/tools/shared.py b/tools/shared.py index 3cee4b4b..360f80cc 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -41,7 +41,7 @@ COMPILER_OPTS = COMPILER_OPTS + ['-m32', '-U__i386__', '-U__x86_64__', '-U__i386 USE_EMSDK = not os.environ.get('EMMAKEN_NO_SDK') if USE_EMSDK: - COMPILER_OPTS += [ '-nostdinc', + EMSDK_OPTS = [ '-nostdinc', '-I' + path_from_root('system', 'include'), '-I' + path_from_root('system', 'include', 'bsd'), # posix stuff '-I' + path_from_root('system', 'include', 'libc'), @@ -52,6 +52,7 @@ if USE_EMSDK: ] + [ '-U__APPLE__' ] + COMPILER_OPTS += EMSDK_OPTS # Engine tweaks |