-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
34 lines (28 loc) · 939 Bytes
/
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
# SPDX-License-Identifier: GPL-3.0-only
#-*- ConixCore -*- -------------------------------------------------------
#
# Copyright (C) 2019-2021 Maksym Prymierov
#
#-------------------------------------------------------------------------
ifndef ARCH
ARCH := x86
endif
export LD_LIBRARY_PATH=../build/build_env/lib
CC := ../build/build_env/bin/g++
ASM := ../build/build_env/bin/as
LD := ../build/build_env/bin/ld
ifndef CC_FLAGS
CC_FLAGS := -O2 -m32 -mno-red-zone -nostdlib -lgcc -static-libgcc \
-Iinclude -c -fno-stack-protector -Wall \
-Werror -fno-builtin -Wno-main -fno-pic -g -std=c++2a \
-fno-exceptions -fno-rtti
endif
KERNEL_OBJECTS := arch/${ARCH}/boot.o
all: out/out_check out/arch/${ARCH}/kernel.bin
include Check.mk
include arch/${ARCH}/Makefile
include kernel/Makefile
out/arch/${ARCH}/kernel.bin: out/${KERNEL_OBJECTS}
${LD} -m elf_i386 -T arch/${ARCH}/link.ld -o ${@} ${^}
clean:
rm -rfv ./out