1
0
exercises/Makefile

50 lines
974 B
Makefile
Raw Normal View History

2024-07-03 16:35:49 -06:00
# Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media>
# SPDX-License-Identifier: FSFAP
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and this
# notice are preserved. This file is offered as-is, without any warranty.
2024-07-03 16:29:11 -06:00
.POSIX:
RUSTC ?= rustc
CC ?= cc
.PHONY: all
all: exercism fun
.PHONY: exercism
exercism: exercism-test protein
fun: fun-test butt
.PHONY: build
build:
mkdir -p build
.PHONY: clean
clean:
rm -rf build
.PHONY: butt
butt: build/butt
build/butt: build fun/butt.rs
$(RUSTC) $(RUSTFLAGS) -o $@ fun/butt.rs
.PHONY: protein
protein: build/protein
build/protein: build exercism/protein.rs
$(RUSTC) $(RUSTFLAGS) -o $@ exercism/protein.rs
.PHONY: test
test: exercism-test fun-test
.PHONY: exercism-test
exercism-test: build /tmp/protein
/tmp/protein: exercism/protein.rs
$(RUSTC) --test -o $@ exercism/protein.rs
$@
.PHONY: fun-test
fun-test: