-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (30 loc) · 898 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
ROOT := /Users/ethan/gh/cs6120
BRIL := /Users/ethan/gh/bril
.PHONY: default
default:
@echo "Please specify a test target"
@echo
@echo "Use 'make help' for help"
.PHONY: build_cfg
build_cfg: ## Test build-cfg
make test_equivalence \
EQUIV_NAME="build-cfg" \
EQUIV_CMD="${ROOT}/target/debug/build-cfg --mode passthrough" \
EQUIV_PIPE="bril2json"
EQUIV_DIR := lesson2
EQUIV_NAME := _
EQUIV_CMD := _
EQUIV_PIPE := cat
EQUIV_FLAGS := --exclude benchmarks/float/cordic.bril --exclude benchmarks/mem/cordic.bril
.PHONY: test_equivalence
test_equivalence:
cd "${EQUIV_DIR}" && \
python3 "${ROOT}/lesson2/test/check_equivalence.py" \
"${EQUIV_NAME}" \
"${EQUIV_CMD}" \
"${EQUIV_PIPE}" \
${BRIL}/benchmarks/**/*.bril \
${EQUIV_FLAGS}
# https://stackoverflow.com/questions/8889035/how-to-document-a-makefile
help: ## Shows this help
@sed -ne '/@sed/!s/## //p' ${MAKEFILE_LIST}