-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (44 loc) · 1.33 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
# Hexahedron Makefile - Adapted from reduceOS Makefile
include ./make.config
.PHONY: all targets clean build help
targets:
@echo "Available targets for this makefile:"
@echo " all build the OS and package it in an ISO"
@echo " build build the project (DOES NOT PACKAGE INTO ISO)"
@echo " initrd build the initrd"
@echo " clean clean the project"
@echo " iso build an ISO "
help: targets
all: build initrd iso
iso:
$(MAKE) headerlog header="Packing ISO, please wait..."
bash -c "$(BUILDSCRIPTS_ROOT)/iso.sh"
@echo
@echo
build:
$(MAKE) headerlog header="Building OS, please wait..."
bash -c "$(BUILDSCRIPTS_ROOT)/build.sh"
@echo
@echo
@echo "[ Finished building. You may need to pack it into an ISO file. ]"
initrd:
$(MAKE) headerlog header="Creating initial ramdisk, please wait..."
python3 $(BUILDSCRIPTS_ROOT)/mkinitrd.py $(BUILDSCRIPTS_ROOT)/../build-output/sysroot/boot/initrd.tar.img $(BUILDSCRIPTS_ROOT)/../build-output/initrd/
@echo
@echo
@echo "[ Finished creating initial ramdisk ]"
clean:
$(MAKE) headerlog header="Cleaning build, please wait..."
bash -c "$(BUILDSCRIPTS_ROOT)/clean.sh"
@echo
@echo
@echo "[ Finished cleaning. ]"
headerlog:
@echo
@echo
@echo "[ $(header) ]"
@echo
@echo
qemu:
$(MAKE) headerlog header="Launching QEMU..."
qemu-system-x86_64 -cdrom build-output/hexahedron.iso