-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.in
54 lines (40 loc) · 1.2 KB
/
Makefile.in
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
SUBDIRS= nux tools/mig tests libmachina kern bootstrap
NUX_DIR=@NUXBUILDROOT@
APXH_DIR=$(NUX_DIR)/apxh
TOOLS= $(NUX_DIR)/tools
AR50= $(TOOLS)/ar50/ar50
OBJAPPEND= $(TOOLS)/objappend/objappend
ifeq (@MACHINE@,riscv64)
APXH=$(APXH_DIR)/sbi/apxh
QEMU_CMD=qemu-system-riscv64 -M virt
endif
ifeq (@MACHINE@,amd64)
APXH=$(APXH_DIR)/multiboot/apxh
QEMU_CMD=qemu-system-x86_64
endif
ifeq (@MACHINE@,i386)
APXH=$(APXH_DIR)/multiboot/apxh
QEMU_CMD=qemu-system-i386
endif
bootstrap: libmachina
tests: tools/mig libmachina
tests kern bootstrap: nux
kern: tests
machina_qemu: kern bootstrap
cp $(APXH) $@
$(AR50) -m nux-payload -c [email protected] kern/machina bootstrap/bootstrap
$(OBJAPPEND) -a $@ [email protected]
.PHONY: qemu qemu_dbg
qemu: machina_qemu
$(QEMU_CMD) -kernel machina_qemu -serial mon:stdio -nographic
qemu_dbg: machina_qemu
$(QEMU_CMD) -kernel machina_qemu -serial mon:stdio -nographic -S -s
tests_qemu: kern tests
cp $(APXH) $@
$(AR50) -m nux_payload -c [email protected] kern/machina tests/test/test
$(OBJAPPEND) -a $@ [email protected]
.PHONY: test
test: tests_qemu
$(QEMU_CMD) -kernel tests_qemu -serial mon:stdio -nographic
ALL_TARGET += machina_qemu tests_qemu
CLEAN_FILES += machina_qemu machina_qemu.ar50 tests_qemu tests_qemu.ar50