-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (42 loc) · 1.89 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
export PYTHONPATH = .
test:
python3 -m unittest game/test_*.py
all: assets/solutions.gif assets/steps.gif assets/pbox.svg assets/sbox.svg challenge/hello docs/index.html
docs/graph.svg: docs/graph.py
docs/graph.py | dot -T svg > docs/graph.svg
docs/index.html: docs/definition.py docs/εὕρηκα.py docs/graph.svg docs/notes.py
docs/notes.py > docs/index.html
εὕρηκα: docs/εὕρηκα.py
docs/εὕρηκα.py
example:
@tools/reverse-level2.py 'Hello, World!' | tools/forward.py
perftest:
@pypy3 tools/reverse.py 8192 ZGlzdGluZ3Vpc2hl perftest > /dev/null
@pypy3 tools/reverse.py 8192 ZCBub3Qgb25seSBi perftest > /dev/null
@pypy3 tools/reverse.py 8192 eSByZWFzb24gYnV0 perftest > /dev/null
@pypy3 tools/reverse.py 8192 IGJ5IHBhc3Npb24= perftest > /dev/null
assets/solutions.txt:
tools/reverse.py 800 'Hello, World!!!!' > assets/solutions.txt
assets/solutions.gif: assets/solutions.txt
@#tools/animate-solutions.py < assets/solutions.txt > assets/solutions.gif
tools/animate-solutions.py < assets/solutions.txt | convert - -scale 200%% -strip assets/solutions.gif
assets/steps.gif:
@#tools/reverse-level2.py "Hello, World!" | tools/animate-steps.py > assets/steps.gif
tools/reverse-level2.py 'Hello, World!' | tools/animate-steps.py | convert - -scale 200%% -strip assets/steps.gif
assets/pbox.dot:
tools/pbox.py > assets/pbox.dot
assets/sbox.dot:
tools/sbox.py > assets/sbox.dot
assets/pbox.svg: assets/pbox.dot
dot -T svg < assets/pbox.dot > assets/pbox.svg
assets/sbox.svg: assets/sbox.dot
dot -T svg < assets/sbox.dot > assets/sbox.svg
unroll:
tools/unroll.py
challenge/hello: challenge/hello.cpp
cd challenge; clang hello.cpp -o hello
clean:
@rm -rf game/__pycache__ tools/__pycache__
@rm -f assets/solutions.txt assets/solutions.gif assets/steps.gif assets/pbox.dot assets/pbox.svg assets/sbox.dot assets/sbox.svg
@rm -f challenge/hello
@rm -f docs/graph.svg docs/index.html