Commit 5fc4c66b authored by Nicolas "Norswap" Laurent's avatar Nicolas "Norswap" Laurent Committed by norswap

avoid rebuilding unicorn each time 'make build' is invoked

parent 95d3ee1c
......@@ -2,8 +2,20 @@ SHELL := /bin/bash
build: submodules unicorn minigeth_mips minigeth_default_arch mipsevm contracts
unicorn:
./build_unicorn.sh
# Approximation, use `make unicorn_rebuild` to force.
unicorn/build: unicorn/CMakeLists.txt
mkdir -p unicorn/build
cd unicorn/build && cmake .. -DUNICORN_ARCH=mips -DCMAKE_BUILD_TYPE=Release
unicorn: unicorn/build
cd unicorn/build && make -j8
# The Go linker / runtime expects these to be there!
cp unicorn/build/libunicorn.so.1 unicorn
cp unicorn/build/libunicorn.so.2 unicorn
unicorn_rebuild:
touch unicorn/CMakeLists.txt
make unicorn
submodules:
# CI will checkout submodules on its own (and fails on these commands)
......@@ -88,4 +100,5 @@ mrproper: clean
rm -rf mipigo/venv
.PHONY: build unicorn submodules minigeth_mips minigeth_default_arch mipsevm contracts \
nodejs clean mrproper test_challenge test_mipsevm test_minigeth test clear_cache
nodejs clean mrproper test_challenge test_mipsevm test_minigeth test
clear_cache unicorn_rebuild
cd unicorn
mkdir -p build
cd build
cmake .. -DUNICORN_ARCH=mips -DCMAKE_BUILD_TYPE=Release
make -j8
# The Go linker / runtime expects these to be there!
cp libunicorn.so.1 ..
cp libunicorn.so.2 ..
# export LIBUNICORN_PATH for Github CI
# TODO: is this actually needed?
if [[ ! -z "$GITHUB_ENV" ]]; then
echo "LIBUNICORN_PATH=$(pwd)/unicorn/" >> $GITHUB_ENV
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment