summaryrefslogtreecommitdiff
path: root/kernel/makefile
blob: 608e67ecc7cfc4c7f29ceba56ede2a0b3982d06d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
SOURCES = \
  storage/bd/memory.cpp storage/fs/tarfs.cpp application.asm application.cpp \
  framebuffer.cpp interrupts.asm interrupts.cpp allocator.cpp storage.cpp \
  syscall.cpp utility.cpp paging.asm paging.cpp entry.cpp input.cpp panic.cpp \
  vfile.cpp serial.asm app-memory.cpp load-app.cpp timer.cpp timer.asm

build/%.asm.o: source/%.asm
	@mkdir -p $(@D)
	$(HILBERT_NASM) $^ -o $@

build/%.cpp.o: source/%.cpp
	@mkdir -p $(@D)
	$(HILBERT_CC) -c -ffreestanding -fno-exceptions -fno-rtti \
	  -mcmodel=kernel -I ${LIMINE_DIR} -I ${MINTSUKI_HEADERS_DIR} $^ -o $@

build/kernel.elf: $(SOURCES:%=build/%.o)
	$(HILBERT_LD) -T link.ld $^ -o $@

clean:
	rm -rf build