Skip to content

Commit

Permalink
samples: properly fix gramine makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasten committed Oct 22, 2024
1 parent 3da5c94 commit 227c603
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions samples/gramine-hello/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
11 changes: 6 additions & 5 deletions samples/gramine-nginx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand All @@ -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) \
Expand Down

0 comments on commit 227c603

Please sign in to comment.