2023-02-24 06:20:51 +00:00
|
|
|
.PHONY: all installdeps build test clean
|
2023-01-26 03:49:55 +00:00
|
|
|
|
2023-02-24 06:20:51 +00:00
|
|
|
all: .pre-build build
|
|
|
|
|
|
|
|
.fetch-submodules:
|
|
|
|
@git submodule update --init --recursive
|
2023-01-26 03:49:55 +00:00
|
|
|
|
2023-02-24 06:20:51 +00:00
|
|
|
.pre-build: .fetch-submodules
|
2023-03-14 12:14:06 +00:00
|
|
|
@cargo install cargo-make
|
|
|
|
ifdef CI
|
2023-07-04 04:58:45 +00:00
|
|
|
@cargo install cross --git https://github.com/cross-rs/cross --rev 1511a28
|
2023-01-26 03:49:55 +00:00
|
|
|
endif
|
|
|
|
|
2023-02-24 06:20:51 +00:00
|
|
|
installdeps: .pre-build
|
2023-03-24 04:00:48 +00:00
|
|
|
ifeq ($(shell uname),Darwin)
|
|
|
|
@brew update
|
|
|
|
@brew install cmake ninja
|
|
|
|
else ifeq ($(shell uname),Linux)
|
|
|
|
@sudo apt-get update
|
|
|
|
@sudo apt-get install -y cmake ninja-build
|
|
|
|
endif
|
|
|
|
@git clone --recursive https://github.com/WebAssembly/wabt.git
|
|
|
|
@cd wabt && mkdir build && cd build && cmake .. -GNinja && ninja && sudo ninja install
|
2023-02-24 06:20:51 +00:00
|
|
|
|
|
|
|
build: .pre-build
|
|
|
|
@cargo make build
|
|
|
|
|
2023-01-26 03:49:55 +00:00
|
|
|
test: .pre-build
|
|
|
|
@cargo make test
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@cargo clean
|