csci5607/assignment-1/Makefile

24 lines
421 B
Makefile
Raw Normal View History

2023-02-01 08:37:02 +00:00
.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)