Browse Source

Folder reorg

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

15
Makefile

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

0
exception.c → core/exception.c

2
core/exception.d

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

0
exception.h → core/exception.h

BIN
core/exception.o

0
exception_handler.c → core/exception_handler.c

2
core/exception_handler.d

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

0
gdt.c → core/gdt.c

1
core/gdt.d

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

0
gdt.h → core/gdt.h

BIN
core/gdt.o

0
idt.c → core/idt.c

1
core/idt.d

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

0
idt.h → core/idt.h

BIN
core/idt.o

0
interrupt.h → core/interrupt.h

0
io.h → core/io.h

0
irq.c → core/irq.c

2
core/irq.d

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

0
irq.h → core/irq.h

BIN
core/irq.o

0
irq_handler.c → core/irq_handler.c

2
core/irq_handler.d

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

0
klibc.c → core/klibc.c

1
core/klibc.d

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

0
klibc.h → core/klibc.h

BIN
core/klibc.o

0
main.c → core/main.c

2
core/main.d

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

0
segment.h → core/segment.h

0
types.h → core/types.h

0
pic.c → drivers/pic.c

2
drivers/pic.d

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

0
pic.h → drivers/pic.h

BIN
drivers/pic.o

0
pit.c → drivers/pit.c

1
drivers/pit.d

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

0
pit.h → drivers/pit.h

BIN
drivers/pit.o

0
vga.c → drivers/vga.c

2
drivers/vga.d

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

0
vga.h → drivers/vga.h

BIN
drivers/vga.o

Loading…
Cancel
Save