-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjustfile
39 lines (30 loc) · 1.16 KB
/
justfile
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
root := justfile_directory()
vscdir := (root + "/rotth-vscode")
rotthdir := (root + "/rotth-src/examples")
compiler := (root + "/rotth-src/rotth")
default:
@just --list
assemble FILE:
nasm -g -F dwarf -f elf64 {{root}}/print.asm -o {{root}}/print.o
nasm -g -F dwarf -f elf64 {{FILE}}.asm -o {{FILE}}.o
ld -o {{FILE}} {{FILE}}.o {{root}}/print.o
build FILE:
cargo run --bin rotth -- -- {{rotthdir}}/{{FILE}}.rh
nasm -g -F dwarf -f elf64 {{root}}/print.asm -o {{root}}/print.o
nasm -g -F dwarf -f elf64 {{rotthdir}}/{{FILE}}.asm -o {{rotthdir}}/{{FILE}}.o
ld -o {{rotthdir}}/{{FILE}} {{rotthdir}}/{{FILE}}.o {{root}}/print.o
run FILE: (build FILE)
{{rotthdir}}/{{FILE}}
gdb FILE: (build FILE)
gdb --tui {{rotthdir}}/{{FILE}}
compiler:
cargo run --bin rotth -- -- {{compiler}}.rh
nasm -g -F dwarf -f elf64 {{root}}/print.asm -o {{root}}/print.o
nasm -g -F dwarf -f elf64 {{compiler}}.asm -o {{compiler}}.o
ld -o {{compiler}} {{compiler}}.o {{root}}/print.o
{{compiler}}
clean-run FILE: clean (run FILE)
clean:
find {{rotthdir}} -type f ! -name "*.rh" -delete
build-extension:
cd {{vscdir}} && yes | vsce package