blob: ef443b1422a060dcc94071b0f7cc80ef9caba5a6 (
plain)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
include ../Makefile.common
KERNEL_OBJS = \
init.o \
kmalloc.o \
StdLib.o \
Arch/i386/CPU.o \
Process.o \
Thread.o \
Arch/i386/PIT.o \
Devices/KeyboardDevice.o \
CMOS.o \
Arch/i386/PIC.o \
Syscall.o \
Devices/IDEDiskDevice.o \
VM/MemoryManager.o \
VM/Region.o \
VM/VMObject.o \
VM/PageDirectory.o \
VM/PhysicalPage.o \
VM/PhysicalRegion.o \
VM/RangeAllocator.o \
Console.o \
IRQHandler.o \
kprintf.o \
RTC.o \
TTY/TTY.o \
TTY/PTYMultiplexer.o \
TTY/MasterPTY.o \
TTY/SlavePTY.o \
TTY/VirtualConsole.o \
FileSystem/FIFO.o \
Scheduler.o \
DoubleBuffer.o \
KSyms.o \
KParams.o \
FileSystem/SharedMemory.o \
FileSystem/DevPtsFS.o \
Devices/BXVGADevice.o \
PCI.o \
Devices/PS2MouseDevice.o \
Devices/SerialDevice.o \
Net/Socket.o \
Net/LocalSocket.o \
Net/IPv4Socket.o \
Net/TCPSocket.o \
Net/UDPSocket.o \
Net/NetworkAdapter.o \
Net/E1000NetworkAdapter.o \
Net/LoopbackAdapter.o \
Net/Routing.o \
Net/NetworkTask.o \
ProcessTracer.o \
Devices/PCSpeaker.o \
FileSystem/InodeFile.o \
FileSystem/Custody.o \
FileSystem/File.o
VFS_OBJS = \
FileSystem/ProcFS.o \
FileSystem/Inode.o \
Devices/DiskDevice.o \
Devices/Device.o \
Devices/CharacterDevice.o \
Devices/BlockDevice.o \
Devices/NullDevice.o \
Devices/FullDevice.o \
Devices/ZeroDevice.o \
Devices/RandomDevice.o \
Devices/DebugLogDevice.o \
Devices/DiskPartition.o \
Devices/MBRPartitionTable.o \
FileSystem/FileSystem.o \
FileSystem/DiskBackedFileSystem.o \
FileSystem/Ext2FileSystem.o \
FileSystem/VirtualFileSystem.o \
FileSystem/FileDescription.o \
FileSystem/SyntheticFileSystem.o
AK_OBJS = \
../AK/String.o \
../AK/StringImpl.o \
../AK/StringBuilder.o \
../AK/StringView.o \
../AK/FileSystemPath.o \
../AK/StdLibExtras.o \
../AK/JsonObject.o \
../AK/JsonValue.o \
../AK/JsonArray.o \
../AK/JsonParser.o \
../AK/LogStream.o \
../AK/ELF/ELFImage.o \
../AK/ELF/ELFLoader.o
CXX_OBJS = $(KERNEL_OBJS) $(VFS_OBJS) $(AK_OBJS)
OBJS = $(CXX_OBJS) Boot/boot.ao
KERNEL = kernel
CXXFLAGS += -ffreestanding -mregparm=3 -mno-80387 -mno-mmx -mno-sse -mno-sse2
CXXFLAGS += -nostdlib -nostdinc -nostdinc++
CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/8.3.0/
CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/8.3.0/i686-pc-serenity/
DEFINES += -DKERNEL
LDFLAGS += -Ttext 0x10000 -Wl,-T linker.ld -nostdlib
all: $(KERNEL) kernel.map
kernel.map: kernel
@echo "MKMAP $@"; sh mkmap.sh
$(KERNEL): $(OBJS)
@echo "LD $@"; $(LD) $(LDFLAGS) -o $@ $(OBJS)
.cpp.o:
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
%.ao: %.S
@echo "AS $@"; $(AS) -o $@ $<
-include $(CXX_OBJS:%.o=%.d)
clean:
@echo "CLEAN"; rm -f $(KERNEL) $(OBJS) *.d
|