2010-02-16 15:40:05 -05:00
|
|
|
|
|
|
|
SCONS=build/scons/install/bin/scons
|
|
|
|
SCONSSRC=build/scons
|
|
|
|
V8SRC=build/v8
|
|
|
|
LIBV8=build/v8/libv8.a
|
2010-05-22 20:46:33 -04:00
|
|
|
LIBV8_G=build/v8/libv8_g.a
|
2010-02-16 15:40:05 -05:00
|
|
|
GCC_VERSION=$(shell ruby -e 'puts %x{gcc --version} =~ /(\d)\.(\d)\.\d/ ? $$1 + $$2 : "UNKNOWN"')
|
|
|
|
ARCH=$(shell ruby -e "puts ['foo'].pack('p').size == 8 ? 'x64' : 'ia32'")
|
|
|
|
|
|
|
|
all: $(LIBV8)
|
|
|
|
|
2010-05-22 20:46:33 -04:00
|
|
|
debug: $(LIBV8_G)
|
|
|
|
cp $(LIBV8_G) $(LIBV8)
|
|
|
|
|
2010-02-16 15:40:05 -05:00
|
|
|
$(LIBV8): $(SCONS) $(V8SRC)
|
|
|
|
cd build/v8 && GCC_VERSION=$(GCC_VERSION) ../scons/install/bin/scons arch=$(ARCH)
|
|
|
|
|
2010-05-22 20:46:33 -04:00
|
|
|
$(LIBV8_G): $(SCONS) $(V8SRC)
|
|
|
|
cd build/v8 && GCC_VERSION=$(GCC_VERSION) ../scons/install/bin/scons arch=$(ARCH) mode=debug
|
|
|
|
|
2010-02-16 15:40:05 -05:00
|
|
|
$(SCONS): $(SCONSSRC)
|
|
|
|
mkdir -p $(SCONSSRC)/install
|
|
|
|
python build/scons/setup.py install --prefix=install
|
|
|
|
|
|
|
|
$(V8SRC): build
|
2010-05-06 21:53:35 -04:00
|
|
|
cp -r 2.1.10 build/v8
|
2010-05-11 07:18:36 -04:00
|
|
|
patch -td build/v8 -i ../../fpic-on-linux-amd64.patch
|
2010-02-16 15:40:05 -05:00
|
|
|
|
|
|
|
$(SCONSSRC): build
|
|
|
|
cp -r scons build
|
|
|
|
|
|
|
|
build:
|
|
|
|
mkdir -p build
|
|
|
|
|
|
|
|
scons: $(SCONS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf build
|