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