Permalink
Browse files

moved to glfw and updated spidermonkey bindings to have the right arg…

…uments
  • Loading branch information...
tmpvar committed Aug 21, 2011
1 parent 312accc commit b890792df17f2d8a542d0d265313aca61a0e284b
Showing with 125 additions and 148 deletions.
  1. +7 −7 bin/SConstruct
  2. +7 −7 example/SConstruct
  3. +97 −124 example/js/main.cc
  4. +6 −3 example/triangle.js
  5. +1 −4 src/arch/wrapper.h
  6. +7 −3 src/js/spidermonkey.cc
View
@@ -9,12 +9,12 @@ spidermonkey_src = path.abspath(path.join(current_dir, '..', 'deps', 'spidermonk
spidermonkey = File(path.join(spidermonkey_src, 'libjs_static.a'))
spidermonkey_includes = spidermonkey_src
-FRAMEWORKS = ['OpenGL', 'GLUT']
+glfw_src = path.abspath(path.join(current_dir, '..', 'deps', 'glfw', ))
+glfw = File(path.join(glfw_src, 'lib', 'cocoa', 'libglfw.a'))
+glfw_includes = path.abspath(path.join(glfw_src, 'include'))
-#Program('triangle', 'triangle.cc',
-# LIBS = [webgl],
-# FRAMEWORKS = FRAMEWORKS
-# )
+
+FRAMEWORKS = ['OpenGL', 'Cocoa']
# Configure spidermonkey
if not path.isfile(path.join(spidermonkey_src, 'Makefile')):
@@ -26,8 +26,8 @@ spidermonkey_make = ['make', '-f', path.join(spidermonkey_src, 'Makefile')]
subprocess.call(spidermonkey_make, cwd=spidermonkey_src)
# Make webgljs
-env = Environment(CPPPATH=[spidermonkey_includes, path.join(current_dir, '..', 'include')])
+env = Environment(CPPPATH=[spidermonkey_includes, path.join(current_dir, '..', 'include'), glfw_includes])
env.Program('webgljs', Glob('js/*.cc'),
- LIBS = [webgl, spidermonkey],
+ LIBS = [webgl, spidermonkey, glfw],
FRAMEWORKS = FRAMEWORKS
)
View
@@ -9,12 +9,12 @@ spidermonkey_src = path.abspath(path.join(current_dir, '..', 'deps', 'spidermonk
spidermonkey = File(path.join(spidermonkey_src, 'libjs_static.a'))
spidermonkey_includes = spidermonkey_src
-FRAMEWORKS = ['OpenGL', 'GLUT']
+glfw_src = path.abspath(path.join(current_dir, '..', 'deps', 'glfw', ))
+glfw = File(path.join(glfw_src, 'lib', 'cocoa', 'libglfw.a'))
+glfw_includes = path.abspath(path.join(glfw_src, 'include'))
-#Program('triangle', 'triangle.cc',
-# LIBS = [webgl],
-# FRAMEWORKS = FRAMEWORKS
-# )
+
+FRAMEWORKS = ['OpenGL', 'Cocoa']
# Configure spidermonkey
if not path.isfile(path.join(spidermonkey_src, 'Makefile')):
@@ -26,8 +26,8 @@ spidermonkey_make = ['make', '-f', path.join(spidermonkey_src, 'Makefile')]
subprocess.call(spidermonkey_make, cwd=spidermonkey_src)
# Make webgljs
-env = Environment(CPPPATH=[spidermonkey_includes, path.join(current_dir, '..', 'include')])
+env = Environment(CPPPATH=[spidermonkey_includes, path.join(current_dir, '..', 'include'), glfw_includes])
env.Program('webgljs', Glob('js/*.cc'),
- LIBS = [webgl, spidermonkey],
+ LIBS = [webgl, spidermonkey, glfw],
FRAMEWORKS = FRAMEWORKS
)
Oops, something went wrong.

0 comments on commit b890792

Please sign in to comment.