diff --git a/workspaces/icecap-host/Makefile b/workspaces/icecap-host/Makefile index 9b372664c..ecd1704bd 100644 --- a/workspaces/icecap-host/Makefile +++ b/workspaces/icecap-host/Makefile @@ -9,9 +9,9 @@ # See the `LICENSING.markdown` file in the Veracruz root directory for # licensing and copyright information. -.PHONY: all build clean clean-cargo-lock default doc fmt clippy \ - test-dependencies test-collateral test-server test-client veracruz-test \ - tests build-tests +.PHONY: all build build-tests build-veracruz-server-test clean \ + clean-cargo-lock clippy default doc fmt icecap-runtime \ + test-client test-dependencies test-server tests veracruz-test default: build @@ -47,11 +47,11 @@ CLIPPY_OPTIONS = --no-deps -A clippy::type_complexity -A clippy::module_inceptio all: build test-collateral -build: rustup-plat $(VERACRUZ_ICECAP_QEMU_IMAGE) +build: rustup-plat icecap-runtime $(COMPILERS) $(BUILD_PARAMETERS) \ cargo build $(PROFILE_FLAG) $(host_feature_flags) $(V_FLAG) -build-veracruz-server-test: rustup-plat $(VERACRUZ_ICECAP_QEMU_IMAGE) +build-veracruz-server-test: rustup-plat icecap-runtime $(COMPILERS) $(BUILD_PARAMETERS) \ cargo test --no-run $(PROFILE_FLAG) \ $(host_feature_flags) \ @@ -64,11 +64,12 @@ build-veracruz-server-test: rustup-plat $(VERACRUZ_ICECAP_QEMU_IMAGE) --message-format=json | jq -r '.executable | select(.)' \ ) target/release/veracruz-server-test -.PHONY: $(MEASUREMENT_FILE) -$(MEASUREMENT_FILE): - $(MAKE) -C ../icecap-runtime elfloader css-icecap.bin ICECAP_PLAT=$(ICECAP_PLAT) +measurement-file: icecap-runtime -test-dependencies: test-collateral $(VERACRUZ_ICECAP_QEMU_IMAGE) +icecap-runtime: + $(MAKE) -C ../icecap-runtime elfloader css-icecap.bin ICECAP_PLAT=$(icecap_plat) + +test-dependencies: test-collateral icecap-runtime CARGO_TEST = $(COMPILERS) $(TEST_PARAMETERS) cargo test $(PROFILE_FLAG) @@ -84,16 +85,13 @@ test-client: test-dependencies veracruz-test: test-dependencies build-tests $(CARGO_TEST) --test integration_test -- --test-threads=1 -$(VERACRUZ_ICECAP_QEMU_IMAGE): - $(MAKE) -C ../icecap-runtime elfloader ICECAP_PLAT=$(ICECAP_PLAT) - doc: cargo doc fmt: cargo fmt -clippy: rustup-plat $(VERACRUZ_ICECAP_QEMU_IMAGE) +clippy: rustup-plat icecap-runtime # workspace members and relevant dependencies $(BUILD_PARAMETERS) $(COMPILERS) \ cargo clippy $(PROFILE_FLAG) \ diff --git a/workspaces/icecap-runtime/Makefile b/workspaces/icecap-runtime/Makefile index c404be9f8..a57828ae6 100644 --- a/workspaces/icecap-runtime/Makefile +++ b/workspaces/icecap-runtime/Makefile @@ -104,7 +104,7 @@ include $(PROJECT)/icecap.mk mk_dirs := $(sel4_build_dir) $(elfloader_build_dir) $(misc_build_dir) -$(mk_dirs): +$(mk_dirs) &: mkdir -p $@ # HACK diff --git a/workspaces/linux-host/Makefile b/workspaces/linux-host/Makefile index f0d0146e3..3e8b8ac6f 100644 --- a/workspaces/linux-host/Makefile +++ b/workspaces/linux-host/Makefile @@ -9,9 +9,9 @@ # See the `LICENSING.markdown` file in the Veracruz root directory for # licensing and copyright information. -.PHONY: all build install clean clean-cargo-lock default doc fmt clippy \ - test-dependencies test-collateral test-server test-client veracruz-test \ - tests build-tests +.PHONY: all build build-tests clean clean-cargo-lock clippy default doc fmt \ + install linux-runtime test-client test-collateral test-dependencies \ + test-server tests veracruz-test default: build @@ -40,7 +40,7 @@ unresolved_crates_path := $(shell pwd)/crates all: build test-collateral -build: $(RUNTIME_ENCLAVE_BINARY_PATH) +build: linux-runtime $(BUILD_ENV) \ cargo build $(PROFILE_FLAG) $(V_FLAG) @@ -52,7 +52,7 @@ install: ln -sf $(BIN_DIR)/linux-veracruz-server $(BIN_DIR)/vc-server ln -sf $(BIN_DIR)/veracruz-client $(BIN_DIR)/vc-client -test-dependencies: test-collateral $(RUNTIME_ENCLAVE_BINARY_PATH) +test-dependencies: test-collateral linux-runtime CARGO_TEST = $(BUILD_ENV) $(TEST_PARAMETERS) \ cargo test $(PROFILE_FLAG) @@ -69,10 +69,12 @@ test-client: test-dependencies veracruz-test: test-dependencies build-tests RUST_LOG="integration_test=info,error" $(CARGO_TEST) --test integration_test -- --test-threads=1 --nocapture -$(RUNTIME_ENCLAVE_BINARY_PATH): +measurement-file: linux-runtime + +linux-runtime: $(MAKE) -C ../linux-runtime linux -clippy: $(RUNTIME_ENCLAVE_BINARY_PATH) +clippy: linux-runtime # workspace members and relevant dependencies RUNTIME_ENCLAVE_BINARY_PATH=$(RUNTIME_ENCLAVE_BINARY_PATH) \ cargo clippy $(PROFILE_FLAG) $(V_FLAG) \ diff --git a/workspaces/nitro-host/Makefile b/workspaces/nitro-host/Makefile index 93554d21e..82a9745ed 100644 --- a/workspaces/nitro-host/Makefile +++ b/workspaces/nitro-host/Makefile @@ -9,8 +9,8 @@ # See the `LICENSING.markdown` file in the Veracruz root directory for # licensing and copyright information. -.PHONY: all build clean clean-cargo-lock clippy default doc fmt \ - test-client test-dependencies test-server veracruz-test build-tests +.PHONY: all build build-tests clean clean-cargo-lock clippy default doc fmt \ + nitro-runtime test-client test-dependencies test-server tests veracruz-test default: build @@ -38,11 +38,12 @@ build: cargo build $(PROFILE_FLAG) $(V_FLAG) strip -p target/$(PROFILE_PATH)/veracruz-client target/$(PROFILE_PATH)/nitro-veracruz-server -.PHONY: $(MEASUREMENT_FILE) -$(MEASUREMENT_FILE): +measurement-file: nitro-runtime + +nitro-runtime: $(MAKE) -C ../nitro-runtime nitro -test-dependencies: test-collateral +test-dependencies: test-collateral nitro-runtime CARGO_TEST = $(TEST_PARAMETERS) cargo test $(PROFILE_FLAG) --features nitro @@ -66,7 +67,7 @@ doc: fmt: cargo fmt -clippy: +clippy: nitro-runtime # workspace members and relevant dependencies $(CC) cargo clippy $(PROFILE_FLAG) $(V_FLAG) \ -p veracruz-client \ diff --git a/workspaces/shared.mk b/workspaces/shared.mk index b4fdaa641..73e1a7d8c 100644 --- a/workspaces/shared.mk +++ b/workspaces/shared.mk @@ -11,9 +11,9 @@ PLATFORM := $(shell uname) -.PHONY: wasm-files datasets policy-files test-collateral +.PHONY: datasets measurement-file policy-files test-collateral wasm-files -test-collateral: wasm-files datasets $(MEASUREMENT_FILE) policy-files +test-collateral: datasets measurement-file policy-files wasm-files ################################################### # Wasm programs @@ -165,7 +165,7 @@ $(PGEN): $(WORKSPACE_DIR)/host/crates/sdk/generate-policy/src/main.rs \ $(WORKSPACE_DIR)/host/crates/sdk/generate-policy/Cargo.toml $(MAKE) -C $(WORKSPACE_DIR)/host -policy-files: $(OUT_DIR) $(MEASUREMENT_FILE) $(patsubst %.json, $(OUT_DIR)/%.json, $(POLICY_FILES)) +policy-files: $(OUT_DIR) measurement-file $(patsubst %.json, $(OUT_DIR)/%.json, $(POLICY_FILES)) @echo $(INFO_COLOR)"GEN => $(POLICY_FILES)"$(RESET_COLOR) PROGRAM_DIR = /program/