diff options
author | Marvin Borner | 2019-10-26 22:45:08 +0200 |
---|---|---|
committer | Marvin Borner | 2019-10-26 22:45:08 +0200 |
commit | 25f1eb375f05883bd499760f4496f4218b5011c9 (patch) | |
tree | 8dc7842ad9efec0ac5521c8e8e06a114b501af09 | |
parent | 5d4180c67cea08bb76eebde6b41b8935e60fed98 (diff) |
Using compiler-based include methods
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | src/kernel/acpi/acpi.c | 6 | ||||
-rw-r--r-- | src/kernel/commands/command.c | 8 | ||||
-rw-r--r-- | src/kernel/graphics/vesa.c | 16 | ||||
-rw-r--r-- | src/kernel/graphics/vesa.h | 2 | ||||
-rw-r--r-- | src/kernel/input/ps2/keyboard.c | 6 | ||||
-rw-r--r-- | src/kernel/input/ps2/mouse.c | 6 | ||||
-rw-r--r-- | src/kernel/interrupts/idt.c | 2 | ||||
-rw-r--r-- | src/kernel/interrupts/irq.c | 4 | ||||
-rw-r--r-- | src/kernel/interrupts/isr.c | 8 | ||||
-rw-r--r-- | src/kernel/io/io.c | 4 | ||||
-rw-r--r-- | src/kernel/kernel.c | 14 | ||||
-rw-r--r-- | src/kernel/lib/alloc.c | 4 | ||||
-rw-r--r-- | src/kernel/lib/string.c | 2 | ||||
-rw-r--r-- | src/kernel/paging/paging.c | 4 | ||||
-rw-r--r-- | src/kernel/sound/frequency.c | 4 | ||||
-rw-r--r-- | src/kernel/system.c | 8 | ||||
-rw-r--r-- | src/kernel/timer/timer.c | 4 |
18 files changed, 53 insertions, 53 deletions
@@ -23,11 +23,11 @@ build: clean stripped=$$(echo "$${line}" | sed -r 's/\//_/g'); \ stripped=$${stripped#??????}; \ stripped=$${stripped%%?}o; \ - i686-elf-gcc -c ./"$${line}" -o ./build/"$${stripped}" -std=gnu99 -ffreestanding -O3 -Wall -Wextra -Wno-unused-parameter || exit; \ + i686-elf-gcc -c ./"$${line}" -o ./build/"$${stripped}" -I ./src -std=gnu99 -ffreestanding -O3 -Wall -Wextra -Wno-unused-parameter || exit; \ done <./build/tmp; \ rm ./build/tmp; \ - i686-elf-gcc -T ./src/kernel/linker.ld -o ./build/melvix.bin -std=gnu99 -ffreestanding -O2 -nostdlib ./build/*.o || exit; \ + i686-elf-gcc -T ./src/kernel/linker.ld -I ./src -o ./build/melvix.bin -std=gnu99 -ffreestanding -O2 -nostdlib ./build/*.o || exit; \ # Testing if grub-file --is-x86-multiboot ./build/melvix.bin; then \ diff --git a/src/kernel/acpi/acpi.c b/src/kernel/acpi/acpi.c index 003b7a4..ef27369 100644 --- a/src/kernel/acpi/acpi.c +++ b/src/kernel/acpi/acpi.c @@ -1,6 +1,6 @@ -#include "../io/io.h" -#include "../lib/lib.h" -#include "../timer/timer.h" +#include <kernel/io/io.h> +#include <kernel/lib/lib.h> +#include <kernel/timer/timer.h> #include <stddef.h> uint32_t *SMI_CMD; diff --git a/src/kernel/commands/command.c b/src/kernel/commands/command.c index b1d9f9b..8ddbb08 100644 --- a/src/kernel/commands/command.c +++ b/src/kernel/commands/command.c @@ -1,7 +1,7 @@ -#include "../lib/lib.h" -#include "../io/io.h" -#include "../acpi/acpi.h" -#include "../graphics/vesa.h" +#include <kernel/lib/lib.h> +#include <kernel/io/io.h> +#include <kernel/acpi/acpi.h> +#include <kernel/graphics/vesa.h> int32_t starts_with(const char *a, const char *b) { size_t length_pre = strlen(b); diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c index 022aec0..f3fb742 100644 --- a/src/kernel/graphics/vesa.c +++ b/src/kernel/graphics/vesa.c @@ -1,11 +1,11 @@ -#include "vesa.h" -#include "font.h" -#include "../io/io.h" -#include "../lib/lib.h" -#include "../paging/paging.h" -#include "../system.h" -#include "../lib/alloc.h" -#include "../commands/command.h" +#include <kernel/graphics/vesa.h> +#include <kernel/graphics/font.h> +#include <kernel/io/io.h> +#include <kernel/lib/lib.h> +#include <kernel/paging/paging.h> +#include <kernel/system.h> +#include <kernel/lib/alloc.h> +#include <kernel/commands/command.h> void switch_to_vga() { serial_write("Force switch to VGA!\n"); diff --git a/src/kernel/graphics/vesa.h b/src/kernel/graphics/vesa.h index 00e058e..a741060 100644 --- a/src/kernel/graphics/vesa.h +++ b/src/kernel/graphics/vesa.h @@ -2,7 +2,7 @@ #define MELVIX_VESA_H #include <stdint.h> -#include "../system.h" +#include <kernel/system.h> int vesa_available; diff --git a/src/kernel/input/ps2/keyboard.c b/src/kernel/input/ps2/keyboard.c index e2fd18f..f793852 100644 --- a/src/kernel/input/ps2/keyboard.c +++ b/src/kernel/input/ps2/keyboard.c @@ -1,6 +1,6 @@ -#include "../../interrupts/interrupts.h" -#include "../../io/io.h" -#include "../../graphics/vesa.h" +#include <kernel/interrupts/interrupts.h> +#include <kernel/io/io.h> +#include <kernel/graphics/vesa.h> char keymap[128] = { 0 /*E*/, 27, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', '\b', diff --git a/src/kernel/input/ps2/mouse.c b/src/kernel/input/ps2/mouse.c index 15522f6..bef226c 100644 --- a/src/kernel/input/ps2/mouse.c +++ b/src/kernel/input/ps2/mouse.c @@ -1,6 +1,6 @@ -#include "../../interrupts/interrupts.h" -#include "../../io/io.h" -#include "../../graphics/vesa.h" +#include <kernel/interrupts/interrupts.h> +#include <kernel/io/io.h> +#include <kernel/graphics/vesa.h> char mouse_cycle = 0; signed char mouse_byte[3]; diff --git a/src/kernel/interrupts/idt.c b/src/kernel/interrupts/idt.c index a3827d7..635743d 100644 --- a/src/kernel/interrupts/idt.c +++ b/src/kernel/interrupts/idt.c @@ -1,4 +1,4 @@ -#include "../lib/lib.h" +#include <kernel/lib/lib.h> struct idt_entry { unsigned short base_lo; diff --git a/src/kernel/interrupts/irq.c b/src/kernel/interrupts/irq.c index 110203c..39cfb23 100644 --- a/src/kernel/interrupts/irq.c +++ b/src/kernel/interrupts/irq.c @@ -1,5 +1,5 @@ -#include "../io/io.h" -#include "interrupts.h" +#include <kernel/io/io.h> +#include <kernel/interrupts/interrupts.h> extern void irq0(); diff --git a/src/kernel/interrupts/isr.c b/src/kernel/interrupts/isr.c index f6e94a5..59c6ad7 100644 --- a/src/kernel/interrupts/isr.c +++ b/src/kernel/interrupts/isr.c @@ -1,8 +1,8 @@ #include <stdint.h> -#include "interrupts.h" -#include "../lib/lib.h" -#include "../system.h" -#include "../io/io.h" +#include <kernel/interrupts/interrupts.h> +#include <kernel/lib/lib.h> +#include <kernel/system.h> +#include <kernel/io/io.h> // Defined in isr.asm extern void isr0(); diff --git a/src/kernel/io/io.c b/src/kernel/io/io.c index e699ae0..5c0eefa 100644 --- a/src/kernel/io/io.c +++ b/src/kernel/io/io.c @@ -1,6 +1,6 @@ #include <stdint.h> -#include "../lib/lib.h" -#include "io.h" +#include <kernel/lib/lib.h> +#include <kernel/io/io.h> uint8_t receive_b(uint16_t port) { uint8_t value; diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c index 3db0b8a..b6f0591 100644 --- a/src/kernel/kernel.c +++ b/src/kernel/kernel.c @@ -1,10 +1,10 @@ -#include "graphics/vesa.h" -#include "gdt/gdt.h" -#include "interrupts/interrupts.h" -#include "io/io.h" -#include "timer/timer.h" -#include "paging/paging.h" -#include "input/input.h" +#include <kernel/graphics/vesa.h> +#include <kernel/gdt/gdt.h> +#include <kernel/interrupts/interrupts.h> +#include <kernel/io/io.h> +#include <kernel/timer/timer.h> +#include <kernel/paging/paging.h> +#include <kernel/input/input.h> void init() { timer_install(); diff --git a/src/kernel/lib/alloc.c b/src/kernel/lib/alloc.c index 2545d28..85ae7db 100644 --- a/src/kernel/lib/alloc.c +++ b/src/kernel/lib/alloc.c @@ -1,7 +1,7 @@ #include <stddef.h> #include <stdint.h> -#include "alloc.h" -#include "../paging/paging.h" +#include <kernel/lib/alloc.h> +#include <kernel/paging/paging.h> int liballoc_lock() { asm volatile ("cli"); diff --git a/src/kernel/lib/string.c b/src/kernel/lib/string.c index 0ca04ee..c171439 100644 --- a/src/kernel/lib/string.c +++ b/src/kernel/lib/string.c @@ -1,5 +1,5 @@ #include <stddef.h> -#include "../io/io.h" +#include <kernel/io/io.h> size_t strlen(const char *str) { size_t len = 0; diff --git a/src/kernel/paging/paging.c b/src/kernel/paging/paging.c index f1dc340..3739100 100644 --- a/src/kernel/paging/paging.c +++ b/src/kernel/paging/paging.c @@ -1,6 +1,6 @@ #include <stdint.h> -#include "paging.h" -#include "../system.h" +#include <kernel/paging/paging.h> +#include <kernel/system.h> extern void *end; diff --git a/src/kernel/sound/frequency.c b/src/kernel/sound/frequency.c index 367e2e8..2a88446 100644 --- a/src/kernel/sound/frequency.c +++ b/src/kernel/sound/frequency.c @@ -1,6 +1,6 @@ #include <stdint.h> -#include "../io/io.h" -#include "../timer/timer.h" +#include <kernel/io/io.h> +#include <kernel/timer/timer.h> void play_sound(uint32_t frequency) { uint32_t divided; diff --git a/src/kernel/system.c b/src/kernel/system.c index b0ad429..fa60296 100644 --- a/src/kernel/system.c +++ b/src/kernel/system.c @@ -1,10 +1,10 @@ #ifndef MELVIX_SYSTEM_H #define MELVIX_SYSTEM_H -#include "timer/timer.h" -#include "io/io.h" -#include "graphics/vesa.h" -#include "system.h" +#include <kernel/timer/timer.h> +#include <kernel/io/io.h> +#include <kernel/graphics/vesa.h> +#include <kernel/system.h> void kernel_time() { vesa_draw_string("\n"); diff --git a/src/kernel/timer/timer.c b/src/kernel/timer/timer.c index 7d650e8..a5dd12e 100644 --- a/src/kernel/timer/timer.c +++ b/src/kernel/timer/timer.c @@ -1,5 +1,5 @@ -#include "../interrupts/interrupts.h" -#include "../io/io.h" +#include <kernel/interrupts/interrupts.h> +#include <kernel/io/io.h> static unsigned int timer_ticks = 0; |