summaryrefslogtreecommitdiff
path: root/kc/core/Makefile
blob: 9791762966a9872b345b91881aafb93d1f287d84 (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
include ../../defaults.mk
include ../defaults.mk

VPATH := ../../lib ../../lib/libc ../ cpu/ memory/

TARGET := kernel.os
.DEFAULT: $(TARGET)

CPPFLAGS += -I../../api -I../api -I../../lib/api -I.
CFLAGS += -mcmodel=small -Wno-unused-const-variable -Wno-unused-function -fvisibility=hidden -g

AOBJS := entry_x86_64.o reloc_x86_64.o dynamic_x86_64.o
COBJS := mmu.o cpu_thread.o irq.o exceptions.o cpu.o msr.o mmu.o port.o arch_thread.o
POBJS := pic8259.o pic8259_isr.o pit8253.o i8042.o
GOBJS := serial.o kc_main.o memory.o vm_tree.o panic.o task.o \
	     kcc_memory.o page_early.o page_stack.o video.o
LOBJS := printf.o memset.o memcpy.o memmove.o memcmp.o stdio.o string.o

OBJS := $(AOBJS) $(COBJS) $(POBJS) $(GOBJS) $(LOBJS)
DEPS := $(patsubst %.o,%.d,$(OBJS))


$(TARGET): $(LDSCRIPT) $(MAKEFILE_LIST)
$(TARGET): $(OBJS)

CLEANLIST := $(wildcard $(OBJS) $(TARGET)) 
DCLEANLIST := $(wildcard $(DEPS))

include ../../rules.mk
-include $(DEPS)

.DEFAULT: $(TARGET)