2010-02-16 15:40:05 -05:00
|
|
|
|
|
|
|
SCONS=build/scons/install/bin/scons
|
|
|
|
SCONSSRC=build/scons
|
|
|
|
V8SRC=build/v8
|
2011-03-07 08:20:32 -05:00
|
|
|
V8VERSION=3.1.8
|
2010-02-16 15:40:05 -05:00
|
|
|
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"')
|
2010-06-16 07:08:45 -04:00
|
|
|
ARCH=$(shell ruby detect_cpu.rb)
|
2010-02-16 15:40:05 -05:00
|
|
|
|
|
|
|
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
|
2011-03-07 08:20:32 -05:00
|
|
|
cp -r $(V8VERSION) build/v8
|
2010-06-05 06:50:25 -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
|