Folder reorg

This commit is contained in:
Mathieu Maret 2018-07-19 13:26:28 +02:00
parent 228d2a15c8
commit 95850e0581
46 changed files with 27 additions and 6 deletions

View File

@ -6,10 +6,13 @@ LDFLAGS += -m32 -nostdlib -static -fno-common -fno-use-cxa-atexit -fno-exception
CFLAGS += -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-pie -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) asmsrc=$(wildcard *.asm)
asmobj=$(asmsrc:%.asm=%.o) asmobj=$(asmsrc:%.asm=%.o)
csrc=$(wildcard *.c) csrc=$(shell find $(SUBDIRS) -type f -name "*.c")# $(wildcard *.c)
cobj=$(csrc:%.c=%.o) cobj=$(csrc:%.c=%.o)
deps = $(csrc:%.c=%.d) deps = $(csrc:%.c=%.d)
@ -21,10 +24,10 @@ fd.img: kernel
dd if=$< of=$@ conv=notrunc dd if=$< of=$@ conv=notrunc
#https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html#x86-Function-Attributes #https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html#x86-Function-Attributes
exception_handler.o:exception_handler.c core/exception_handler.o:core/exception_handler.c
$(CC) $(CPPFLAGS) $(CFLAGS) -mgeneral-regs-only -c $< $(CC) $(CPPFLAGS) $(CFLAGS) -mgeneral-regs-only -c $< -o $@
irq_handler.o:irq_handler.c core/irq_handler.o:core/irq_handler.c
$(CC) $(CPPFLAGS) $(CFLAGS) -mgeneral-regs-only -c $< $(CC) $(CPPFLAGS) $(CFLAGS) -mgeneral-regs-only -c $< -o $@
%.o:%.asm %.o:%.asm
$(AS) $(ASFLAGS) -o $@ $< $(AS) $(ASFLAGS) -o $@ $<

2
core/exception.d Normal file
View File

@ -0,0 +1,2 @@
core/exception.o: core/exception.c core/exception.h core/interrupt.h \
core/types.h core/idt.h core/irq.h

BIN
core/exception.o Normal file

Binary file not shown.

2
core/exception_handler.d Normal file
View File

@ -0,0 +1,2 @@
core/exception_handler.o: core/exception_handler.c core/exception.h \
core/interrupt.h core/types.h drivers/vga.h

BIN
core/exception_handler.o Normal file

Binary file not shown.

View File

1
core/gdt.d Normal file
View File

@ -0,0 +1 @@
core/gdt.o: core/gdt.c core/segment.h core/types.h core/gdt.h

View File

BIN
core/gdt.o Normal file

Binary file not shown.

View File

1
core/idt.d Normal file
View File

@ -0,0 +1 @@
core/idt.o: core/idt.c core/idt.h core/types.h

View File

BIN
core/idt.o Normal file

Binary file not shown.

View File

View File

2
core/irq.d Normal file
View File

@ -0,0 +1,2 @@
core/irq.o: core/irq.c core/irq.h core/interrupt.h core/types.h \
core/idt.h drivers/pic.h

View File

BIN
core/irq.o Normal file

Binary file not shown.

2
core/irq_handler.d Normal file
View File

@ -0,0 +1,2 @@
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

BIN
core/irq_handler.o Normal file

Binary file not shown.

1
core/klibc.d Normal file
View File

@ -0,0 +1 @@
core/klibc.o: core/klibc.c core/klibc.h core/types.h

BIN
core/klibc.o Normal file

Binary file not shown.

View File

2
core/main.d Normal file
View File

@ -0,0 +1,2 @@
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

BIN
core/main.o Normal file

Binary file not shown.

2
drivers/pic.d Normal file
View File

@ -0,0 +1,2 @@
drivers/pic.o: drivers/pic.c drivers/pic.h core/io.h core/types.h \
core/irq.h core/interrupt.h

BIN
drivers/pic.o Normal file

Binary file not shown.

1
drivers/pit.d Normal file
View File

@ -0,0 +1 @@
drivers/pit.o: drivers/pit.c drivers/pit.h core/io.h core/types.h

BIN
drivers/pit.o Normal file

Binary file not shown.

2
drivers/vga.d Normal file
View File

@ -0,0 +1,2 @@
drivers/vga.o: drivers/vga.c drivers/vga.h core/types.h core/io.h \
core/klibc.h

BIN
drivers/vga.o Normal file

Binary file not shown.