-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (48 loc) · 1.9 KB
/
Makefile
File metadata and controls
58 lines (48 loc) · 1.9 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Copyright 2018 Anthony Wharton
# Simple makefile with a few bindings to get this project running on a fresh
# machine.
ifndef VERBOSE
.SILENT:
endif
# Do not run this makefile in parallel - will not apply to recursive makefile
# calls, so running with -jX may still help.
.NOTPARALLEL:
default:
echo "This Makefile will (purposefully) not run anything when called with no"
echo "arguments. Please run one of the following:"
echo
echo "PROJECT MANAGEMENT:"
echo " make build - Builds the project."
echo " make run - Runs the simulator."
echo " make doc - Builds and opens the documentation."
echo " make clean - Cleans the project directory."
echo
echo "RUST INSTALLATION:"
echo " make rust-install - Installs rust to userspace using the packaged rustup"
echo " installer script."
echo " make rust-remove - Unininstalls everything installed by make rust-install."
echo " make env - Sets the environment variable to include rustup binaries"
echo " in your PATH variable."
echo "Rust installation is powered by rustup, packaged into the project."
echo " - https://rustup.rs/"
echo " - https://github.com/rust-lang-nursery/rustup.rs"
build:
$(MAKE) --no-print-directory -C ./resources/programs/ all:build
echo "================================ simulator"
cargo build --release
run: build
./target/release/daybreak --alu=4 --blu=1 --mcu=4 --rsv=32 --rob=64 -n=4 -i=6 -b=twobit -r\
./resources/programs/fib_non_recursive/a.out
doc:
cargo doc --document-private-items --open
clean:
$(MAKE) --no-print-directory -C ./resources/programs all:clean
echo "================================ simulator"
cargo clean
rust-install:
./rustup.sh -y
rust-remove: env
rustup self uninstall -y
env:
echo -e "\e[31mSorry this cannot be done automatically, PLEASE RUN:"
echo -e "\e[1;37msource ~/.cargo/env\e[0m"