23 lines
421 B
Makefile
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)
|