csci5607/assignment-1/Makefile
2023-02-01 02:37:02 -06:00

23 lines
421 B
Makefile

.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)