- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakefile
More file actions
Latest commit
24 lines (17 loc) · 474 Bytes
/
Copy pathmakefile
File metadata and controls
24 lines (17 loc) · 474 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
CC = gcc
CC_FLAGS = -m32 -c -nostdlib -std=c++11 -ffreestanding -O2 -Wall -Wextra
CPP_FILES := $(wildcard*.cpp)
ASM_FILES := $(wildcard*.asm)
BOOT_FILE := boot.asm
O_FILES := $(CPP_FILES:.cpp=.o)$(ASM_FILES:.asm=.o)
KERNEL_BIN := Kernel.bin
all: $(KERNEL_BIN)
clean:
rm -f $(KERNEL_BIN)$(O_FILES)
%.o: %.cpp
$(CC)$(CC_FLAGS) -o $@$<
$(BOOT_FILE): $(O_FILES)
as --32 -o $@$<
$(KERNEL_BIN): $(O_FILES)
ld -m elf_i386 -nostdlib -T linker.ld -o $@$^
./iso.sh