diff options
author | Michael J. Bishop <mbtyke@gmail.com> | 2013-05-22 21:37:14 -0400 |
---|---|---|
committer | Michael Bishop <mbtyke@gmail.com> | 2013-05-23 11:51:25 -0400 |
commit | c5fb79f031969c58bf9281e9b7b339076ca6a3c2 (patch) | |
tree | 34d60749e93a5dfb237676c8e6f46c6df3d08b18 /emcc | |
parent | e1703b407293121e2f2133d189c4438d039ea846 (diff) |
Allowed Emscripten to recognize and compile .m and .mm files
(Objective-C and Objective-C++, respectively)
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -601,7 +601,7 @@ if EMMAKEN_CFLAGS: CC_ADDITIONAL_ARGS += shlex.split(EMMAKEN_CFLAGS) # ---------------- Utilities --------------- -SOURCE_SUFFIXES = ('.c', '.cpp', '.cxx', '.cc') +SOURCE_SUFFIXES = ('.c', '.cpp', '.cxx', '.cc', '.m', '.mm') BITCODE_SUFFIXES = ('.bc', '.o', '.obj') DYNAMICLIB_SUFFIXES = ('.dylib', '.so', '.dll') STATICLIB_SUFFIXES = ('.a',) @@ -629,8 +629,9 @@ header = False # pre-compiled headers. We fake that by just copying the file for i in range(1, len(sys.argv)): arg = sys.argv[i] if not arg.startswith('-'): - if arg.endswith('.c'): - use_cxx = False + for extension in ['.c','.m']: + if arg.endswith(extension): + use_cxx = False if arg.endswith('.h') and sys.argv[i-1] != '-include': header = True |