You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
568 B

4 years ago
CARGO_FEATURE_FLAGS?=
RUSTFLAGS?=-C target-cpu=native
.PHONY: all
.NOTPARALLEL: all
all:
$(MAKE) part1
$(MAKE) part2
.NOTPARALLEL: part1
part1: $(wildcard src/*.rs)
RUSTFLAGS="$(RUSTFLAGS)" cargo build --release $(addprefix --features ,$(CARGO_FEATURE_FLAGS))
mv -f target/release/day10 $@
strip $@
.NOTPARALLEL: part2
part2: $(wildcard src/*.rs)
RUSTFLAGS="$(RUSTFLAGS)" cargo build --release --features $@ $(addprefix --features ,$(CARGO_FEATURE_FLAGS))
mv -f target/release/day10 $@
strip $@
clean:
rm -f part{1,2}
full-clean: clean
rm -rf target