blob: 2b8ab8dbc5b6a71c4c388e9ae18d012f2d1bde61 (
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
34
35
|
include ../../defaults.mk
include ../defaults.mk
VPATH := ../../lib ../ cpu/
TARGET := kernel.os
.DEFAULT: $(TARGET)
CPPFLAGS += -I../../api -I.
CFLAGS += -Wno-unused-const-variable -Wno-unused-function -fvisibility=hidden -g
SOBJS :=
GOBJS := entry_x86_64.o reloc_x86_64.o kprint.o serial.o port.o \
kc_main.o main.o memory.o memset.o memcpy.o memmove.o memcmp.o cpu.o \
vm_tree.o exceptions.o panic.o msr.o
IOBJS :=
# __attribute__((interrupt)) requires -mgeneral-regs-only
$(IOBJS): CFLAGS += -mgeneral-regs-only
$(IOBJS) $(GOBJS): CFLAGS += -mcmodel=small -fPIC
OBJS := $(SOBJS) $(GOBJS) $(IOBJS)
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)
|