aboutsummaryrefslogtreecommitdiff
path: root/kernel/Makefile
blob: e51469dca0aff4d9272955afe11bb205710fcf68 (plain) (blame)
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
# MIT License, Copyright (c) 2020 Marvin Borner
# acpi.o fpu.o
COBJS = entry_asm.o \
	main.o \
	multiboot.o \
	drivers/interrupts.o \
	drivers/interrupts_asm.o \
	drivers/cpu.o \
	drivers/serial.o \
	drivers/pci.o \
	drivers/rtc.o \
	drivers/ide.o \
	drivers/fb.o \
	drivers/timer.o \
	drivers/vmware.o \
	drivers/ps2/ps2.o \
	drivers/ps2/mouse.o \
	drivers/ps2/keyboard.o \
	features/mm.o \
	features/fs.o \
	features/io.o \
	features/bus.o \
	features/logger.o \
	features/load.o \
	features/proc.o \
	features/proc_asm.o \
	features/syscall.o

CFLAGS = $(CFLAGS_DEFAULT) -Wno-address-of-packed-member -ffreestanding -Wl,-ekernel_main -I$(LIBS)/libc/inc/ -Iinc/ -DKERNEL
ASFLAGS = -f elf32

all: compile

%.o: %.c
	@$(CC) -c $(CFLAGS) $< -o $@

%_asm.o: %.asm
	@$(AS) $(ASFLAGS) $< -o $@

compile: $(COBJS)
	@mkdir -p $(BUILD)/apps/kernel/
	@$(LD) -N -z max-page-size=0x1000 -eboot_entry -Tlink.ld -o $(BUILD)/apps/kernel/exec -L$(BUILD) $+ -lk