summaryrefslogtreecommitdiff
path: root/Kernel/Makefile
blob: 8e9b7201eefe6314448e5009fed4071c7d254169 (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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
OBJS = \
    ../AK/FileSystemPath.o \
    ../AK/JsonParser.o \
    ../AK/JsonValue.o \
    ../AK/LogStream.o \
    ../AK/String.o \
    ../AK/StringBuilder.o \
    ../AK/StringImpl.o \
    ../AK/StringView.o \
    ../AK/StringUtils.o \
    ../Libraries/LibELF/ELFImage.o \
    ../Libraries/LibELF/ELFLoader.o \
    ../Libraries/LibBareMetal/Output/Console.o \
    ../Libraries/LibBareMetal/Output/kprintf.o \
    ../Libraries/LibBareMetal/StdLib.o \
    Arch/i386/CPU.o \
    Interrupts/InterruptManagement.o \
    Interrupts/APIC.o \
    Interrupts/IOAPIC.o \
    Interrupts/PIC.o \
    Interrupts/GenericInterruptHandler.o \
    Interrupts/UnhandledInterruptHandler.o \
    Interrupts/SpuriousInterruptHandler.o \
    Interrupts/IRQHandler.o \
    Interrupts/SharedIRQHandler.o \
    CMOS.o \
    Devices/PIT.o \
    Devices/BXVGADevice.o \
    Devices/BlockDevice.o \
    Devices/CharacterDevice.o \
    Devices/DebugLogDevice.o \
    Devices/Device.o \
    Devices/DiskPartition.o \
    Devices/FloppyDiskDevice.o \
    Devices/FullDevice.o \
    Devices/GPTPartitionTable.o \
    Devices/EBRPartitionTable.o \
    Devices/KeyboardDevice.o \
    Devices/MBRPartitionTable.o \
    Devices/MBVGADevice.o \
    Devices/NullDevice.o \
    Devices/PATAChannel.o \
    Devices/PATADiskDevice.o \
    Devices/PCSpeaker.o \
    Devices/PS2MouseDevice.o \
    Devices/RandomDevice.o \
    Devices/SB16.o \
    Devices/SerialDevice.o \
    Devices/ZeroDevice.o \
    Devices/VMWareBackdoor.o \
    Devices/HardwareTimer.o \
    DoubleBuffer.o \
    FileSystem/Custody.o \
    FileSystem/DevPtsFS.o \
    FileSystem/DiskBackedFileSystem.o \
    FileSystem/Ext2FileSystem.o \
    FileSystem/FIFO.o \
    FileSystem/File.o \
    FileSystem/FileDescription.o \
    FileSystem/FileSystem.o \
    FileSystem/Inode.o \
    FileSystem/InodeFile.o \
    FileSystem/InodeWatcher.o \
    FileSystem/ProcFS.o \
    FileSystem/TmpFS.o \
    FileSystem/VirtualFileSystem.o \
    Heap/SlabAllocator.o \
    Heap/kmalloc.o \
    KBufferBuilder.o \
    KParams.o \
    KSyms.o \
    Lock.o \
    Net/E1000NetworkAdapter.o \
    Net/IPv4Socket.o \
    Net/LocalSocket.o \
    Net/LoopbackAdapter.o \
    Net/NetworkAdapter.o \
    Net/NetworkTask.o \
    Net/RTL8139NetworkAdapter.o \
    Net/Routing.o \
    Net/Socket.o \
    Net/TCPSocket.o \
    Net/UDPSocket.o \
    PCI/Access.o \
    PCI/IOAccess.o \
    PCI/MMIOAccess.o \
    PCI/Initializer.o \
    PCI/Device.o \
    PerformanceEventBuffer.o \
    Process.o \
    ProcessTracer.o \
    Profiling.o \
    RTC.o \
    Random.o \
    Scheduler.o \
    SharedBuffer.o \
    Syscall.o \
    TimerQueue.o \
    TTY/MasterPTY.o \
    TTY/PTYMultiplexer.o \
    TTY/SlavePTY.o \
    TTY/TTY.o \
    TTY/VirtualConsole.o \
    Thread.o \
    VM/AnonymousVMObject.o \
    VM/InodeVMObject.o \
    VM/MemoryManager.o \
    VM/PageDirectory.o \
    VM/PhysicalPage.o \
    VM/PhysicalRegion.o \
    VM/PurgeableVMObject.o \
    VM/PrivateInodeVMObject.o \
    VM/ProcessPagingScope.o \
    VM/RangeAllocator.o \
    VM/Region.o \
    VM/SharedInodeVMObject.o \
    VM/VMObject.o \
    ACPI/ACPIParser.o \
    ACPI/ACPIStaticParser.o \
    ACPI/ACPIDynamicParser.o \
    ACPI/DMIDecoder.o \
    ACPI/MultiProcessorParser.o \
    WaitQueue.o \
    init.o

OBJ_SUFFIX = .kernel

MODULE_OBJS = TestModule$(OBJ_SUFFIX).o

EXTRA_OBJS = Arch/i386/Boot/boot.ao

KERNEL = 1

PROGRAM = kernel

SUBPROJECT_CXXFLAGS += -pie -fPIE -ffreestanding -fbuiltin -mno-80387 -mno-mmx -mno-sse -mno-sse2 -fno-asynchronous-unwind-tables
SUBPROJECT_CXXFLAGS += -nostdlib -nostdinc -nostdinc++
SUBPROJECT_CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/9.2.0/
SUBPROJECT_CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/9.2.0/i686-pc-serenity/

LDFLAGS += -Wl,-T linker.ld -nostdlib -lgcc -lstdc++

all: $(PROGRAM) $(MODULE_OBJS) kernel.map

kernel.map: kernel
	@echo "MKMAP $@"
	$(QUIET) sh mkmap.sh

EXTRA_CLEAN += kernel.map

install:
	mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/Kernel/
	cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/Kernel/

include ../Makefile.common