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"')
|
2010-06-07 06:52:07 -04:00
|
|
|
ARCH=$(shell ruby build_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
|
2010-06-05 06:50:25 -04:00
|
|
|
cp -r 2.1.10 build/v8
|
|
|
|
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
|