-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
54 lines (39 loc) · 1.53 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
kernel := kernel/build/$(ARCH)/libkernel.bin
rinit := rinit/build/$(ARCH)/librinit.bin
.PHONY: all clean run run-release rinit rinit-release kernel kernel-release doc-kernel doc-kernel-deploy
kernel:
@make -C kernel build
kernel-release:
@make -C kernel version=release build
rinit:
@make -C rinit build
rinit-release:
@make -C rinit version=release build
run: kernel rinit
@qemu-system-$(ARCH) -kernel $(kernel) -initrd $(rinit) -serial stdio --no-reboot
run-release: kernel-release rinit-release
@qemu-system-$(ARCH) -kernel $(kernel) -initrd $(rinit) -serial stdio --no-reboot
debug: kernel rinit
@qemu-system-$(ARCH) -d int -no-reboot -s -S -kernel $(kernel) -initrd $(rinit) -serial stdio
noreboot: kernel rinit
@qemu-system-$(ARCH) -d int -no-reboot -kernel $(kernel) -initrd $(rinit) -serial stdio
noreboot-release: kernel-release rinit-release
@qemu-system-$(ARCH) -d int -no-reboot -kernel $(kernel) -initrd $(rinit) -serial stdio
test: kernel-release
@make -C tests/userspace version=release kernel=$(shell realpath $(kernel)) test=allocator test
gdb:
@gdb $(kernel) -ex "target remote :1234"
clean:
@make -C kernel clean
@make -C rinit clean
@make -C tests/userspace kernel=none test=none clean
doc-kernel:
@rm -rf kernel/target/doc
@cargo rustdoc --manifest-path kernel/Cargo.toml -- \
--no-defaults \
--passes strip-hidden \
--passes collapse-docs \
--passes unindent-comments \
--passes strip-priv-imports
doc-kernel-deploy: doc-kernel
@rsync -vraP --delete-after kernel/target/doc/ [email protected]:~/~docs/rux