Browse Source

Folder reorg

master
Mathieu Maret 3 years ago
parent
commit
95850e0581
46 changed files with 27 additions and 6 deletions
  1. +9
    -6
      Makefile
  2. +0
    -0
      core/exception.c
  3. +2
    -0
      core/exception.d
  4. +0
    -0
      core/exception.h
  5. BIN
      core/exception.o
  6. +0
    -0
      core/exception_handler.c
  7. +2
    -0
      core/exception_handler.d
  8. BIN
      core/exception_handler.o
  9. +0
    -0
      core/gdt.c
  10. +1
    -0
      core/gdt.d
  11. +0
    -0
      core/gdt.h
  12. BIN
      core/gdt.o
  13. +0
    -0
      core/idt.c
  14. +1
    -0
      core/idt.d
  15. +0
    -0
      core/idt.h
  16. BIN
      core/idt.o
  17. +0
    -0
      core/interrupt.h
  18. +0
    -0
      core/io.h
  19. +0
    -0
      core/irq.c
  20. +2
    -0
      core/irq.d
  21. +0
    -0
      core/irq.h
  22. BIN
      core/irq.o
  23. +0
    -0
      core/irq_handler.c
  24. +2
    -0
      core/irq_handler.d
  25. BIN
      core/irq_handler.o
  26. +0
    -0
      core/klibc.c
  27. +1
    -0
      core/klibc.d
  28. +0
    -0
      core/klibc.h
  29. BIN
      core/klibc.o
  30. +0
    -0
      core/main.c
  31. +2
    -0
      core/main.d
  32. BIN
      core/main.o
  33. +0
    -0
      core/segment.h
  34. +0
    -0
      core/types.h
  35. +0
    -0
      drivers/pic.c
  36. +2
    -0
      drivers/pic.d
  37. +0
    -0
      drivers/pic.h
  38. BIN
      drivers/pic.o
  39. +0
    -0
      drivers/pit.c
  40. +1
    -0
      drivers/pit.d
  41. +0
    -0
      drivers/pit.h
  42. BIN
      drivers/pit.o
  43. +0
    -0
      drivers/vga.c
  44. +2
    -0
      drivers/vga.d
  45. +0
    -0
      drivers/vga.h
  46. BIN
      drivers/vga.o

+ 9
- 6
Makefile View File

@ -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 $@ $<


exception.c → core/exception.c View File


+ 2
- 0
core/exception.d 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

exception.h → core/exception.h View File


BIN
core/exception.o View File


exception_handler.c → core/exception_handler.c View File


+ 2
- 0
core/exception_handler.d 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 View File


gdt.c → core/gdt.c View File


+ 1
- 0
core/gdt.d View File

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

gdt.h → core/gdt.h View File


BIN
core/gdt.o View File


idt.c → core/idt.c View File


+ 1
- 0
core/idt.d View File

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

idt.h → core/idt.h View File


BIN
core/idt.o View File


interrupt.h → core/interrupt.h View File


io.h → core/io.h View File


irq.c → core/irq.c View File


+ 2
- 0
core/irq.d 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

irq.h → core/irq.h View File


BIN
core/irq.o View File


irq_handler.c → core/irq_handler.c View File


+ 2
- 0
core/irq_handler.d 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 View File


klibc.c → core/klibc.c View File


+ 1
- 0
core/klibc.d View File

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

klibc.h → core/klibc.h View File


BIN
core/klibc.o View File


main.c → core/main.c View File


+ 2
- 0
core/main.d 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 View File


segment.h → core/segment.h View File


types.h → core/types.h View File


pic.c → drivers/pic.c View File


+ 2
- 0
drivers/pic.d 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

pic.h → drivers/pic.h View File


BIN
drivers/pic.o View File


pit.c → drivers/pit.c View File


+ 1
- 0
drivers/pit.d View File

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

pit.h → drivers/pit.h View File


BIN
drivers/pit.o View File


vga.c → drivers/vga.c View File


+ 2
- 0
drivers/vga.d View File

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

vga.h → drivers/vga.h View File


BIN
drivers/vga.o View File


Loading…
Cancel
Save