forked from NSG650/Polaris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
60 lines (48 loc) · 1.6 KB
/
GNUmakefile
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
CONFIG_ARCH ?= x86_64
CONFIG_TARGET ?= pc
.PHONY: all
all:
rm -f polaris.iso
$(MAKE) polaris.iso
polaris.iso: jinx
./build-support/makeiso.sh
jinx:
curl -Lo jinx https://raw.githubusercontent.com/mintsuki/jinx/e86d99f1156b33cd5b37a8bb25317949511a28d0/jinx
chmod +x jinx
.PHONY: userspace-full
userspace-full:
rm -f builds/kernel.* builds/drivers.* builds/init.*
./jinx build-all
.PHONY: userspace-base
userspace-base:
rm -f builds/kernel.* builds/drivers.* builds/init.*
./jinx build base-files kernel drivers init bash coreutils lua nano ncurses readline tzdata xz zlib zstd
.PHONY: kernel-clean
kernel-clean:
rm -rf builds/kernel* pkgs/kernel*
.PHONY: init-clean
init-clean:
rm -rf builds/init* pkgs/init*
.PHONY: drivers-clean
drivers-clean:
rm -rf builds/drivers* pkgs/drivers*
.PHONY: base-files-clean
base-files-clean:
rm -rf builds/base-files* pkgs/base-files*
.PHONY: clean
clean: kernel-clean init-clean drivers-clean base-files-clean
rm -rf iso_root sysroot polaris.iso ramdisk.tar
.PHONY: distclean
distclean: jinx
./jinx clean
rm -rf iso_root sysroot polaris.iso ramdisk.tar jinx
chmod -R 777 .jinx-cache
rm -rf .jinx-cache
.PHONY: format
format:
clang-format -i $(shell find . \( -iname *.h -o -iname *.c \) -not -ipath "*./limine*" \
-not -iname "limine.h" -not -ipath "*./kernel/arch/x86_64-pc/fw/lai/*" \
-not -ipath "*./sources*" -not -ipath "*./host-pkgs*" \
-not -ipath "*./pkgs*" -not -ipath "*./builds*" -not -ipath "*./host-builds*" \
-not -ipath "*./kernel/fb/terminal*" -not -ipath "*./.jinx-cache*" \
-not -ipath "*./sysroot*" -not -iname "printf.c" -not -iname "printf.h")