-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
76 lines (53 loc) · 1.87 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#----------------------------------------------------------------------------
# MonkOS root makefile
#
# Makefile for all kernel and boot loader targets.
#----------------------------------------------------------------------------
DIR_ROOT := .
include $(DIR_ROOT)/scripts/config.mk
#----------------------------------------------------------------------------
# Build targets
#----------------------------------------------------------------------------
default: boot kernel iso
all: boot kernel iso tags docs
docker: .force
@$(DIR_DOCKER)/build.sh iso
boot: .force
@$(MAKE) $(MAKE_FLAGS) --directory=$(DIR_BOOT)
kernel: .force libc
@$(MAKE) $(MAKE_FLAGS) --directory=$(DIR_KERNEL)
libc: .force
@$(MAKE) $(MAKE_FLAGS) --directory=$(DIR_LIBC)
iso: .force boot kernel
@echo "$(BLUE)[iso]$(NORMAL) Running mkcdrom.sh"
@$(DIR_SCRIPTS)/mkcdrom.sh 2> /dev/null > /dev/null
@echo "$(BLUE)[iso] $(SUCCESS)"
docs: .force
@$(MAKE) $(MAKE_FLAGS) --directory=$(DIR_DOCS)
tags: .force
@echo "$(BLUE)[tags]$(NORMAL) Running exuberant-ctags"
@$(CTAGS) -R --exclude="docs/*" -f .tags
@echo "$(BLUE)[tags] $(SUCCESS)"
uncrustify: .force
@$(MAKE) $(MAKE_FLAGS) --directory=$(DIR_LIBC) uncrustify
@$(MAKE) $(MAKE_FLAGS) --directory=$(DIR_KERNEL) uncrustify
debug: .force
@$(QEMU) -gdb tcp::8864 -cdrom $(DIR_BUILD)/monk.iso
debugwait: .force
@$(QEMU) -S -gdb tcp::8864 -cdrom $(DIR_BUILD)/monk.iso
hdebug: .force
@$(QEMU) -gdb tcp::8864 -enable-kvm -cpu host \
-cdrom $(DIR_BUILD)/monk.iso
test: .force
@$(QEMU) -cdrom $(DIR_BUILD)/monk.iso
htest: .force
@$(QEMU) -enable-kvm -cpu host -cdrom $(DIR_BUILD)/monk.iso
clean: .force
@rm -rf $(DIR_BUILD)
@$(MAKE) $(MAKE_FLAGS) --directory=$(DIR_DOCS) clean
@echo "$(BLUE)[clean]$(NORMAL) Generated files deleted"
cleandeps: .force
@rm -rf $(DIR_DEPS)
@echo "$(BLUE)[clean]$(NORMAL) Dependency files deleted"
cleanall: clean cleandeps
.force: