-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
60 lines (56 loc) · 2.27 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
60
# Generated by Hydra Makefile Generator
.DEFAULT_GOAL := kernel.bin
TARGET := i586-elf-
PATH := /cygdrive/c/gcc/bin:/cygdrive/c/cygwin/bin
PATH_OUT := /cygdrive/g/
LD_FLAGS := -T /cygdrive/c/os/linker.ld
CC_FLAGS := -Wall -MMD -Wextra -nostdlib -fno-builtin -nostartfiles -nodefaultlibs -fno-stack-protector -O2 -fleading-underscore -c -fpermissive -I source/
CPPC_FLAGS := -Wall -MMD -Wextra -nostdlib -fno-builtin -nostartfiles -nodefaultlibs -fno-exceptions -fno-rtti -fno-stack-protector -O2 -fleading-underscore -c -fpermissive -I source/
CC := $(TARGET)gcc
CPPC := $(TARGET)g++
ASM_FLAGS := -f elf
ASM_CC := /cygdrive/c/cygwin/bin/nasm
OBJ_FILES := obj/Clock.o obj/Console.o obj/EventHandler.o obj/GDT.o obj/Graphics.o obj/IDT.o obj/Kernel.o obj/Memory.o obj/Physical.o obj/PIC.o obj/String.o obj/Symbols.o obj/Tasking.o obj/Hardware/RTC.o obj/Memory/Logical.o obj/Memory/Virtual.o obj/Boot.o obj/Exceptions.o
DEPS := $(OBJ_FILES:.o=.d)
-include $(DEPS)
clean:
/bin/rm -f $(OBJ_FILES) $(DEPS)
kernel.bin: $(OBJ_FILES)
$(TARGET)ld $(LD_FLAGS) -o kernel.bin $(OBJ_FILES)
/bin/cp kernel.bin $(PATH_OUT)
obj/Clock.o: source/Clock.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/Console.o: source/Console.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/EventHandler.o: source/EventHandler.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/GDT.o: source/GDT.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/Graphics.o: source/Graphics.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/IDT.o: source/IDT.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/Kernel.o: source/Kernel.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/Memory.o: source/Memory.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/Physical.o: source/Physical.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/PIC.o: source/PIC.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/String.o: source/String.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/Symbols.o: source/Symbols.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/Tasking.o: source/Tasking.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/Hardware/RTC.o: source/Hardware/RTC.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/Memory/Logical.o: source/Memory/Logical.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/Memory/Virtual.o: source/Memory/Virtual.cpp
$(CPPC) -o $@ $< $(CPPC_FLAGS)
obj/Boot.o: source/Boot.asm
$(ASM_CC) -o $@ $< $(ASM_FLAGS)
obj/Exceptions.o: source/Exceptions.asm
$(ASM_CC) -o $@ $< $(ASM_FLAGS)