ladybird/Kernel/Makefile
Andreas Kling 19398cd7d5 Kernel: Reorganize memory layout a bit
Move the kernel image to the 1 MB physical mark. This prevents it from
colliding with stuff like the VGA memory. This was causing us to end
up with the BIOS screen contents sneaking into kernel memory sometimes.

This patch also bumps the kmalloc heap size from 1 MB to 3 MB. It's not
the perfect permanent solution (obviously) but it should get the OOM
monkey off our backs for a while.
2019-11-04 12:04:35 +01:00

136 lines
3.4 KiB
Makefile

include ../Makefile.common
KERNEL_OBJS = \
init.o \
Heap/kmalloc.o \
Heap/SlabAllocator.o \
StdLib.o \
Lock.o \
Arch/i386/CPU.o \
Process.o \
SharedBuffer.o \
Thread.o \
Arch/i386/PIT.o \
Devices/KeyboardDevice.o \
CMOS.o \
Arch/i386/APIC.o \
Arch/i386/PIC.o \
Syscall.o \
Devices/PATAChannel.o \
Devices/PATADiskDevice.o \
Devices/FloppyDiskDevice.o \
VM/MemoryManager.o \
VM/Region.o \
VM/VMObject.o \
VM/AnonymousVMObject.o \
VM/InodeVMObject.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 \
KBufferBuilder.o \
KSyms.o \
KParams.o \
FileSystem/SharedMemory.o \
FileSystem/DevPtsFS.o \
Devices/BXVGADevice.o \
Devices/MBVGADevice.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/RTL8139NetworkAdapter.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/TmpFS.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 \
Devices/GPTPartitionTable.o \
FileSystem/InodeWatcher.o \
FileSystem/FileSystem.o \
FileSystem/DiskBackedFileSystem.o \
FileSystem/Ext2FileSystem.o \
FileSystem/VirtualFileSystem.o \
FileSystem/FileDescription.o \
FileSystem/SyntheticFileSystem.o \
Devices/SB16.o
AK_OBJS = \
../AK/String.o \
../AK/StringImpl.o \
../AK/StringBuilder.o \
../AK/StringView.o \
../AK/FileSystemPath.o \
../AK/JsonValue.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) Arch/i386/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 0x100000 -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