From 3ffd9ef2e552ee20700f2b764bade93ee999c2f5 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Wed, 1 Feb 2023 02:37:02 -0600 Subject: [PATCH] Docker build --- assignment-1/.gitignore | 1 + assignment-1/Makefile | 23 +++++++++++++++++++++++ assignment-1/README.md | 1 + 3 files changed, 25 insertions(+) create mode 100644 assignment-1/Makefile create mode 100644 assignment-1/README.md diff --git a/assignment-1/.gitignore b/assignment-1/.gitignore index a6ff48c..8aaef81 100644 --- a/assignment-1/.gitignore +++ b/assignment-1/.gitignore @@ -1,2 +1,3 @@ /target *.ppm +*.zip diff --git a/assignment-1/Makefile b/assignment-1/Makefile new file mode 100644 index 000000000..49fa46e --- /dev/null +++ b/assignment-1/Makefile @@ -0,0 +1,23 @@ +.PHONY: clean + +HANDIN := hw1a.michael.zhang.zip + +BINARY := target/release/assignment-1 + +all: $(HANDIN) + +$(BINARY): + docker run \ + --rm \ + -v "$(shell pwd)":/usr/src/myapp \ + -v cargo-registry:/usr/local/cargo \ + --user "$(shell id -u)":"$(shell id -g)" \ + -w /usr/src/myapp \ + rust \ + cargo build --release + +$(HANDIN): $(BINARY) Cargo.toml Cargo.lock README.md + zip -r $@ src $< + +clean: + rm -f $(HANDIN) $(BINARY) diff --git a/assignment-1/README.md b/assignment-1/README.md new file mode 100644 index 000000000..a3f8d2e --- /dev/null +++ b/assignment-1/README.md @@ -0,0 +1 @@ +# Raycaster