-
Notifications
You must be signed in to change notification settings - Fork 24
/
makefile
57 lines (39 loc) · 1.13 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
ROOT := $(shell pwd)
TEST_WIKI := /Users/tees/Sync/wiki
c:
@cargo build
# install deps for mac
install-mac:
brew install upx
clean_all:
@rm -rf $(TEST_WIKI)/_firn
clean_site:
@rm -rf $(TEST_WIKI)/_firn/_site
# Firn commands
new: c clean_all
@./target/debug/firn new $(TEST_WIKI)
build: c clean_site
@./target/debug/firn build $(TEST_WIKI)
serve: c clean_site
./target/debug/firn serve -p 8081 $(TEST_WIKI)
# new + build
nb: new build
## release stuff
build_release:
cargo build --release
strip target/release/firn
ls -la -h target/release
build_release_linux:
cross build --target x86_64-unknown-linux-gnu --release
build_for_gh_release: build_release build_release_linux
mkdir -p target/gh_out
zip -j firn_x86_64-apple-darwin target/release/firn
zip -j firn-x86_64-unknown-linux-gnu target/x86_64-unknown-linux-gnu/release/firn
mv firn_x86_64-apple-darwin.zip target/gh_out
mv firn-x86_64-unknown-linux-gnu.zip target/gh_out
build_time: c clean_site
time ./target/debug/firn build -d $(TEST_WIKI)
install: c
cp target/debug/firn /usr/local/bin
flamegraph:
flamegraph --root ./target/debug/firn build -d $(TEST_WIKI)