Commit 95850e05 authored by Mathieu Maret's avatar Mathieu Maret

Folder reorg

parent 228d2a15
......@@ -4,12 +4,15 @@ AS=nasm
ASFLAGS += -f elf32
LDFLAGS += -m32 -nostdlib -static -fno-common -fno-use-cxa-atexit -fno-exceptions -fno-non-call-exceptions -fno-weak -fno-rtti -fno-stack-protector
CFLAGS += -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-pie -fno-stack-protector
CXXFLAGS += -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-rtti -fno-pie
CXXFLAGS += -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-rtti -fno-pie
SUBDIRS := core drivers
CPPFLAGS += $(foreach dir, $(SUBDIRS), -I$(dir))
asmsrc=$(wildcard *.asm)
asmobj=$(asmsrc:%.asm=%.o)
csrc=$(wildcard *.c)
csrc=$(shell find $(SUBDIRS) -type f -name "*.c")# $(wildcard *.c)
cobj=$(csrc:%.c=%.o)
deps = $(csrc:%.c=%.d)
......@@ -21,10 +24,10 @@ fd.img: kernel
dd if=$< of=$@ conv=notrunc
#https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html#x86-Function-Attributes
exception_handler.o:exception_handler.c
$(CC) $(CPPFLAGS) $(CFLAGS) -mgeneral-regs-only -c $<
irq_handler.o:irq_handler.c
$(CC) $(CPPFLAGS) $(CFLAGS) -mgeneral-regs-only -c $<
core/exception_handler.o:core/exception_handler.c
$(CC) $(CPPFLAGS) $(CFLAGS) -mgeneral-regs-only -c $< -o $@
core/irq_handler.o:core/irq_handler.c
$(CC) $(CPPFLAGS) $(CFLAGS) -mgeneral-regs-only -c $< -o $@
%.o:%.asm
$(AS) $(ASFLAGS) -o $@ $<
......
core/exception.o: core/exception.c core/exception.h core/interrupt.h \
core/types.h core/idt.h core/irq.h
core/exception_handler.o: core/exception_handler.c core/exception.h \
core/interrupt.h core/types.h drivers/vga.h
core/gdt.o: core/gdt.c core/segment.h core/types.h core/gdt.h
File added
core/idt.o: core/idt.c core/idt.h core/types.h
File added
core/irq.o: core/irq.c core/irq.h core/interrupt.h core/types.h \
core/idt.h drivers/pic.h
File added
core/irq_handler.o: core/irq_handler.c core/interrupt.h core/types.h \
core/io.h core/irq.h drivers/pic.h drivers/vga.h
core/klibc.o: core/klibc.c core/klibc.h core/types.h
File added
core/main.o: core/main.c core/exception.h core/interrupt.h core/types.h \
core/gdt.h core/idt.h core/io.h core/irq.h drivers/pit.h drivers/vga.h
File added
drivers/pic.o: drivers/pic.c drivers/pic.h core/io.h core/types.h \
core/irq.h core/interrupt.h
File added
drivers/pit.o: drivers/pit.c drivers/pit.h core/io.h core/types.h
File added
drivers/vga.o: drivers/vga.c drivers/vga.h core/types.h core/io.h \
core/klibc.h
File added
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment