Build spidermonkey and bindings

This commit is contained in:
Brian Anderson 2012-05-06 02:03:07 -07:00
parent 12a679df46
commit 1e686a16d9
6 changed files with 31 additions and 0 deletions

6
.gitmodules vendored
View file

@ -7,3 +7,9 @@
[submodule "src/rust-cocoa"]
path = src/rust-cocoa
url = git://github.com/pcwalton/rust-cocoa.git
[submodule "src/mozjs"]
path = src/mozjs
url = git://github.com/brson/mozjs.git
[submodule "src/rust-mozjs"]
path = src/rust-mozjs
url = git://github.com/brson/rust-mozjs.git

View file

@ -13,6 +13,7 @@ ifeq ($(UNAME),Linux)
endif
RUSTFLAGS += \
-L src/rust-mozjs \
-L src/rust-azure \
-L src/rust-sdl \
-L src/rust-cocoa \
@ -36,17 +37,20 @@ ifeq ($(OSTYPE),darwin)
endif
SERVO_DEPS += \
src/rust-mozjs/libmozjs.dummy \
src/rust-azure/libazure.dummy \
src/rust-sdl/libsdl.dummy \
$(NULL)
CHECK_DEPS += \
check-mozjs \
check-sdl \
check-azure \
check-servo \
$(NULL)
CLEAN_DEPS += \
clean-mozjs \
clean-sdl \
clean-azure \
clean-servo \
@ -61,6 +65,12 @@ servo: $(SERVO_DEPS)
servo-test: $(SERVO_DEPS)
$(RUSTC) $(RUSTFLAGS) --test -o $@ $<
src/mozjs/libjs_static.a:
$(MAKE) -C src/mozjs
src/rust-mozjs/libmozjs.dummy: src/mozjs/libjs_static.a
$(MAKE) -C src/rust-mozjs RUSTFLAGS="-L ../mozjs/"
src/rust-azure/libazure.dummy:
$(MAKE) -C src/rust-azure
@ -75,6 +85,10 @@ check: $(CHECK_DEPS)
check-servo: servo-test
./servo-test
.PHONY: check-mozjs
check-mozjs:
$(MAKE) check -C src/rust-mozjs RUSTFLAGS="-L ../mozjs/"
.PHONY: check-azure
check-azure:
$(MAKE) check -C src/rust-azure
@ -90,6 +104,10 @@ check-cocoa:
.PHONY: clean
clean: $(CLEAN_DEPS)
.PHONY: clean-mozjs
clean-mozjs:
$(MAKE) clean -C src/rust-mozjs
.PHONY: clean-azure
clean-azure:
$(MAKE) clean -C src/rust-azure

4
configure vendored
View file

@ -3,10 +3,14 @@
SRCDIR="$(cd $(dirname $0) && pwd)"
sed "s#%VPATH%#${SRCDIR}#" ${SRCDIR}/Makefile.in > Makefile
mkdir -p src/mozjs
mkdir -p src/rust-mozjs
mkdir -p src/rust-sdl
mkdir -p src/rust-azure
mkdir -p src/rust-cocoa
(cd src/mozjs && sh ${SRCDIR}/src/mozjs/js/src/configure)
(cd src/rust-mozjs && sh ${SRCDIR}/src/rust-mozjs/configure)
(cd src/rust-sdl && sh ${SRCDIR}/src/rust-sdl/configure)
(cd src/rust-azure && sh ${SRCDIR}/src/rust-azure/configure)
(cd src/rust-cocoa && sh ${SRCDIR}/src/rust-cocoa/configure)

1
src/mozjs Submodule

@ -0,0 +1 @@
Subproject commit a971b9dd53975db0225bb900c216f2a1f4cd1de9

1
src/rust-mozjs Submodule

@ -0,0 +1 @@
Subproject commit f46084656c10471438ee5ef2488e514227d3e6d5

View file

@ -9,6 +9,7 @@
use std;
use sdl;
use azure;
use js;
mod dom {
mod base;