2019-04-21 02:09:39 +00:00
|
|
|
include ../Makefile.common
|
|
|
|
|
2018-10-16 12:17:43 +00:00
|
|
|
KERNEL_OBJS = \
|
2018-10-16 09:01:38 +00:00
|
|
|
init.o \
|
|
|
|
kmalloc.o \
|
|
|
|
StdLib.o \
|
2019-06-07 18:02:01 +00:00
|
|
|
Arch/i386/CPU.o \
|
2018-11-01 12:15:46 +00:00
|
|
|
Process.o \
|
2019-03-23 21:03:17 +00:00
|
|
|
Thread.o \
|
2018-10-16 09:01:38 +00:00
|
|
|
i8253.o \
|
2019-04-03 10:36:40 +00:00
|
|
|
Devices/KeyboardDevice.o \
|
2018-10-16 09:01:38 +00:00
|
|
|
CMOS.o \
|
|
|
|
PIC.o \
|
|
|
|
Syscall.o \
|
2019-04-03 10:36:40 +00:00
|
|
|
Devices/IDEDiskDevice.o \
|
2019-04-03 13:13:07 +00:00
|
|
|
VM/MemoryManager.o \
|
|
|
|
VM/Region.o \
|
|
|
|
VM/VMObject.o \
|
|
|
|
VM/PageDirectory.o \
|
|
|
|
VM/PhysicalPage.o \
|
2019-06-11 11:13:02 +00:00
|
|
|
VM/PhysicalRegion.o \
|
2019-05-17 01:40:15 +00:00
|
|
|
VM/RangeAllocator.o \
|
2018-10-22 10:58:29 +00:00
|
|
|
Console.o \
|
2018-10-22 11:20:35 +00:00
|
|
|
IRQHandler.o \
|
2018-10-23 09:57:38 +00:00
|
|
|
kprintf.o \
|
2018-10-30 12:59:29 +00:00
|
|
|
RTC.o \
|
2019-04-03 10:28:45 +00:00
|
|
|
TTY/TTY.o \
|
|
|
|
TTY/PTYMultiplexer.o \
|
|
|
|
TTY/MasterPTY.o \
|
|
|
|
TTY/SlavePTY.o \
|
|
|
|
TTY/VirtualConsole.o \
|
2019-04-06 18:29:48 +00:00
|
|
|
FileSystem/FIFO.o \
|
2018-12-02 19:27:08 +00:00
|
|
|
Scheduler.o \
|
2018-12-03 00:51:44 +00:00
|
|
|
DoubleBuffer.o \
|
2019-01-09 01:29:11 +00:00
|
|
|
KSyms.o \
|
2019-06-04 10:54:27 +00:00
|
|
|
KParams.o \
|
2019-04-08 23:10:00 +00:00
|
|
|
SharedMemory.o \
|
2019-04-03 10:25:24 +00:00
|
|
|
FileSystem/DevPtsFS.o \
|
2019-04-03 10:36:40 +00:00
|
|
|
Devices/BXVGADevice.o \
|
2019-02-06 09:17:26 +00:00
|
|
|
PCI.o \
|
2019-04-03 10:36:40 +00:00
|
|
|
Devices/PS2MouseDevice.o \
|
2019-06-08 13:24:34 +00:00
|
|
|
Devices/SerialDevice.o \
|
2019-04-06 18:29:48 +00:00
|
|
|
Net/Socket.o \
|
|
|
|
Net/LocalSocket.o \
|
2019-04-02 17:54:38 +00:00
|
|
|
Net/IPv4Socket.o \
|
|
|
|
Net/TCPSocket.o \
|
|
|
|
Net/UDPSocket.o \
|
|
|
|
Net/NetworkAdapter.o \
|
|
|
|
Net/E1000NetworkAdapter.o \
|
2019-04-02 13:46:44 +00:00
|
|
|
Net/LoopbackAdapter.o \
|
|
|
|
Net/Routing.o \
|
2019-04-22 16:44:45 +00:00
|
|
|
Net/NetworkTask.o \
|
2019-04-28 13:02:55 +00:00
|
|
|
ProcessTracer.o \
|
2019-05-15 19:40:41 +00:00
|
|
|
Devices/PCSpeaker.o \
|
2019-05-30 11:39:17 +00:00
|
|
|
FileSystem/InodeFile.o \
|
2019-05-30 15:46:08 +00:00
|
|
|
FileSystem/Custody.o \
|
2019-04-28 13:02:55 +00:00
|
|
|
File.o
|
2018-10-16 12:17:43 +00:00
|
|
|
|
|
|
|
VFS_OBJS = \
|
2019-04-03 10:25:24 +00:00
|
|
|
FileSystem/ProcFS.o \
|
2019-05-16 01:02:37 +00:00
|
|
|
FileSystem/Inode.o \
|
2019-04-03 10:36:40 +00:00
|
|
|
Devices/DiskDevice.o \
|
|
|
|
Devices/Device.o \
|
|
|
|
Devices/CharacterDevice.o \
|
|
|
|
Devices/BlockDevice.o \
|
|
|
|
Devices/NullDevice.o \
|
|
|
|
Devices/FullDevice.o \
|
|
|
|
Devices/ZeroDevice.o \
|
|
|
|
Devices/RandomDevice.o \
|
2019-04-18 14:08:52 +00:00
|
|
|
Devices/DebugLogDevice.o \
|
2019-06-02 09:38:37 +00:00
|
|
|
Devices/DiskPartition.o \
|
2019-06-02 12:57:44 +00:00
|
|
|
Devices/MBRPartitionTable.o \
|
2019-04-03 10:25:24 +00:00
|
|
|
FileSystem/FileSystem.o \
|
|
|
|
FileSystem/DiskBackedFileSystem.o \
|
|
|
|
FileSystem/Ext2FileSystem.o \
|
|
|
|
FileSystem/VirtualFileSystem.o \
|
2019-06-07 07:36:51 +00:00
|
|
|
FileSystem/FileDescription.o \
|
2019-04-03 10:25:24 +00:00
|
|
|
FileSystem/SyntheticFileSystem.o
|
2018-10-16 12:17:43 +00:00
|
|
|
|
2018-10-17 08:55:43 +00:00
|
|
|
AK_OBJS = \
|
|
|
|
../AK/String.o \
|
2018-10-28 11:20:25 +00:00
|
|
|
../AK/StringImpl.o \
|
2018-11-18 13:57:41 +00:00
|
|
|
../AK/StringBuilder.o \
|
2019-04-16 00:39:16 +00:00
|
|
|
../AK/StringView.o \
|
2019-02-07 07:46:52 +00:00
|
|
|
../AK/FileSystemPath.o \
|
2019-05-23 14:42:13 +00:00
|
|
|
../AK/StdLibExtras.o \
|
2019-06-29 07:04:45 +00:00
|
|
|
../AK/JsonObject.o \
|
|
|
|
../AK/JsonValue.o \
|
|
|
|
../AK/JsonArray.o \
|
|
|
|
../AK/JsonParser.o \
|
2019-05-23 14:42:13 +00:00
|
|
|
../AK/ELF/ELFImage.o \
|
|
|
|
../AK/ELF/ELFLoader.o
|
2018-10-17 08:55:43 +00:00
|
|
|
|
2019-04-01 19:43:07 +00:00
|
|
|
CXX_OBJS = $(KERNEL_OBJS) $(VFS_OBJS) $(AK_OBJS)
|
|
|
|
OBJS = $(CXX_OBJS) Boot/boot.ao
|
2018-10-16 12:17:43 +00:00
|
|
|
|
2018-10-16 09:01:38 +00:00
|
|
|
KERNEL = kernel
|
2019-04-22 21:38:33 +00:00
|
|
|
CXXFLAGS += -ffreestanding -mregparm=3 -mno-80387 -mno-mmx -mno-sse -mno-sse2
|
2019-06-28 18:20:19 +00:00
|
|
|
CXXFLAGS += -nostdlib
|
2019-04-21 02:09:39 +00:00
|
|
|
DEFINES += -DKERNEL
|
2019-04-23 19:37:10 +00:00
|
|
|
LDFLAGS += -Ttext 0x10000 -Wl,-T linker.ld -nostdlib
|
2018-10-16 09:01:38 +00:00
|
|
|
|
2019-04-01 19:43:07 +00:00
|
|
|
all: $(KERNEL) kernel.map
|
2018-10-26 20:32:35 +00:00
|
|
|
|
|
|
|
kernel.map: kernel
|
|
|
|
@echo "MKMAP $@"; sh mkmap.sh
|
2018-10-16 09:01:38 +00:00
|
|
|
|
|
|
|
$(KERNEL): $(OBJS)
|
2019-04-23 19:37:10 +00:00
|
|
|
@echo "LD $@"; $(LD) $(LDFLAGS) -o $@ $(OBJS)
|
2018-10-16 09:01:38 +00:00
|
|
|
|
|
|
|
.cpp.o:
|
|
|
|
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
|
|
|
|
2019-04-01 19:43:07 +00:00
|
|
|
%.ao: %.S
|
|
|
|
@echo "AS $@"; $(AS) -o $@ $<
|
|
|
|
|
|
|
|
-include $(CXX_OBJS:%.o=%.d)
|
2019-02-02 03:41:59 +00:00
|
|
|
|
2018-10-16 09:01:38 +00:00
|
|
|
clean:
|
2019-04-01 19:43:07 +00:00
|
|
|
@echo "CLEAN"; rm -f $(KERNEL) $(OBJS) *.d
|
2018-10-16 09:01:38 +00:00
|
|
|
|