-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (47 loc) · 1.64 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
# Hitomi build system
# Artur Wyszyński <[email protected]>
# Recursive Make Considered Harmful (http://aegis.sourceforge.net/auug97.pdf)
# Managing Projects with GNU Make, 3rd Edition
TOP = .
BUILD := build
TARGETS := $(BUILD)/targets
OBJS := $(BUILD)/objects
include mk/env.mk
include mk/rules.mk
.PHONY: all
.PHONY: all-apps all-drivers all-kernel all-loader all-servers all-tools
.PHONY: clean distclean install help mount umount install_bootloader
.PHONY: print_objs_recipes
.DEFAULT_GOAL := all
all: create all-targets
clean:
@echo "$(MSG_RM) $(BUILD)/"
$(V)-$(RM) -rf $(BUILD)
# do not depend on umount, since it depends on create and on disk.vhd itself,
# so to do an umount & remove disk.vhd, we need to create it first, only to
# remove it after creation
distclean: clean
@echo -n "$(MSG_UMOUNT) $(DISKNAME) $(CYELLOW)<- $(CNONE)$(DISKMOUNTPATH)/"
$(V)$(PYTHON) scripts/vhd-umount.py $(DISKMOUNTPATH)
@echo "$(MSG_RM) $(DISKNAME)"
$(V)-$(RM) -rf $(DISKNAME)
install:
@echo "$(MSG_INSTALL) $@"
create: $(DISKNAME)
mount: create
@echo -n "$(MSG_MOUNT) $(DISKNAME) $(CYELLOW)-> $(CNONE)$(DISKMOUNTPATH)/"
$(V)$(PYTHON) scripts/vhd-mount.py $(DISKNAME) $(DISKMOUNTPATH)
umount: create
@echo -n "$(MSG_UMOUNT) $(DISKNAME) $(CYELLOW)<- $(CNONE)$(DISKMOUNTPATH)/"
$(V)$(PYTHON) scripts/vhd-umount.py $(DISKMOUNTPATH)
include src/module.mk
$(eval $(call create-directories))
all-apps: $(TARGET_APPS)
all-drivers: $(TARGET_DRIVERS)
all-kernel: $(TARGET_KERNEL)
all-loader: $(TARGET_LOADER)
all-servers: $(TARGET_SERVERS)
all-tools: $(HOST_APPS)
all-targets: $(ALL_TARGETS)
install: umount install-loader mount
-include $(DEPENDENCIES)