-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 859 Bytes
/
Makefile
File metadata and controls
40 lines (30 loc) · 859 Bytes
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
export AS := nasm
export CC := gcc
export LD := ld
export ARCH := $(shell uname -m | sed s,i[3456789]86,ia32,)
ifeq ($(ARCH), aarch64)
export EFIARCH := pei-aarch64-little
else
export EFIARCH := efi-app-$(ARCH)
endif
export OUT := build/
export TMP := build/tmp/
export SRC := src/
export SCRIPTS := scripts/
export ROOT := $(shell pwd)/
CWARNS := -Wall -Wextra -Werror
CWARNS += -Wno-unused-function -Wno-unused-variable -Wno-unused-parameter
CWARNS += -Wno-unused-but-set-variable -Wno-missing-braces -Wno-sign-compare
CWARNS += -Wno-pointer-sign -Wno-unused-value -Wno-builtin-declaration-mismatch
CWARNS += -Wno-unterminated-string-initialization
export CWARNS
.PHONY: mount all loader kernel clean
mount: all
./scripts/mount.sh
all: loader kernel
loader:
cd src/loader && $(MAKE)
kernel:
cd src/kernel && $(MAKE)
clean:
rm -rf $(OUT)