From 227c603ba16005c3fe5975d61f1b3cc7e867117a Mon Sep 17 00:00:00 2001 From: Thomas Tendyck Date: Tue, 22 Oct 2024 09:51:41 +0200 Subject: [PATCH] samples: properly fix gramine makefiles --- samples/gramine-hello/Makefile | 4 ++-- samples/gramine-nginx/Makefile | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/samples/gramine-hello/Makefile b/samples/gramine-hello/Makefile index 3632ad8d..05e9311d 100644 --- a/samples/gramine-hello/Makefile +++ b/samples/gramine-hello/Makefile @@ -3,7 +3,7 @@ EDG_MARBLE_TYPE ?= hello all: sign .PHONY: clean all -sign: hello.manifest hello premain-libos +sign: hello.manifest gramine-sgx-sign --output hello.manifest.sgx --manifest hello.manifest --key enclave-key.pem clean: @@ -12,7 +12,7 @@ clean: hello: hello.c $(CC) -Os -o$@ $< -hello.manifest: hello.manifest.template premain-libos +hello.manifest: hello.manifest.template hello premain-libos gramine-manifest $< > $@ premain-libos: diff --git a/samples/gramine-nginx/Makefile b/samples/gramine-nginx/Makefile index 88bcea4f..601d290d 100644 --- a/samples/gramine-nginx/Makefile +++ b/samples/gramine-nginx/Makefile @@ -45,7 +45,11 @@ $(NGINX_SRC).tar.gz: wget -O $@ $(NGINX_URL)/$(NGINX_SRC).tar.gz echo "$(NGINX_SHA256) $@" | sha256sum -c --status -nginx.manifest: nginx.manifest.template premain-libos +nginx.manifest: nginx.manifest.template $(INSTALL_DIR)/sbin/nginx \ + $(INSTALL_DIR)/conf/nginx-gramine.conf \ + $(TEST_DATA) \ + $(INSTALL_DIR)/conf/server.crt \ + premain-libos gramine-manifest \ -Dlog_level=$(GRAMINE_LOG_LEVEL) \ -Darch_libdir=$(ARCH_LIBDIR) \ @@ -63,10 +67,7 @@ nginx.manifest.sgx nginx.sig: sgx_sign @: .INTERMEDIATE: sgx_sign -sgx_sign: nginx.manifest $(INSTALL_DIR)/sbin/nginx \ - $(INSTALL_DIR)/conf/nginx-gramine.conf \ - $(TEST_DATA) \ - $(INSTALL_DIR)/conf/server.crt +sgx_sign: nginx.manifest gramine-sgx-sign \ --manifest $< \ --key $(SGX_SIGNER_KEY) \