diff options
author | aqua <aqua@iserlohn-fortress.net> | 2023-02-05 11:16:42 +0200 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2023-02-05 11:17:58 +0200 |
commit | 8fa3f22e388b75276737466e984a49545cb8a108 (patch) | |
tree | d3891fe7a7b74f3719f68be69dcb11ac339b0e5c | |
parent | Split Makefile (diff) | |
download | kernel-8fa3f22e388b75276737466e984a49545cb8a108.tar.xz |
Remove makefile include targets
-rw-r--r-- | devices/Makefile | 8 | ||||
-rw-r--r-- | i686/Makefile | 5 | ||||
-rw-r--r-- | i686/boot.S | 2 | ||||
-rw-r--r-- | rules.mk | 5 | ||||
-rw-r--r-- | src/Makefile | 14 | ||||
-rw-r--r-- | src/kernel.cpp | 12 | ||||
-rw-r--r-- | src/mem/vmm.c | 2 | ||||
-rw-r--r-- | src/mmap.h | 2 |
8 files changed, 24 insertions, 26 deletions
diff --git a/devices/Makefile b/devices/Makefile index c799df7..711e103 100644 --- a/devices/Makefile +++ b/devices/Makefile @@ -1,10 +1,10 @@ include ../Makefile.config +INCLUDES := -I../${ARCH} +CFLAGS += ${INCLUDES} +CXXFLAGS += ${INCLUDES} + devs.SRCS = pic_8259.c uart_16550.cpp vga.cpp i8042.c pckbd.c mouse.c -devs.OBJS = include include ../rules.mk -include: - mkdir -p $@ - ln -sTf ../../${ARCH}/sys $@/sys diff --git a/i686/Makefile b/i686/Makefile index 6bbc642..9aa0ed1 100644 --- a/i686/Makefile +++ b/i686/Makefile @@ -1,9 +1,12 @@ include ../Makefile.config +INCLUDES := -isystem../grub +CFLAGS += ${INCLUDES} +CXXFLAGS += ${INCLUDES} + arch.SRCS = boot.S init.s \ gdt.c lgdt.c \ lidt.c isr.c -arch.OBJS = include include ../rules.mk diff --git a/i686/boot.S b/i686/boot.S index 16d54a3..1eea9a3 100644 --- a/i686/boot.S +++ b/i686/boot.S @@ -1,5 +1,5 @@ #define ASM_FILE -#include <grub/multiboot2.h> +#include <multiboot2.h> #include "macros.s" /* Declare a multiboot header that marks this program as a kernel */ @@ -6,9 +6,9 @@ $(foreach V,$(filter %.SRCS, ${.VARIABLES}),\ ) # extra flags -CFLAGS += -isysteminclude -I../lib \ +CFLAGS += -I../lib \ -Werror=implicit-function-declaration -CXXFLAGS += -isysteminclude -I../lib -Drestrict=__restrict__ \ +CXXFLAGS += -I../lib -Drestrict=__restrict__ \ -Werror=shadow # Suffix rules @@ -57,7 +57,6 @@ clean.base: FORCE @echo " -> Cleaning $(shell pwd | xargs basename)" @$(foreach V,$(filter %.OBJS, ${.VARIABLES}), rm -rf $($(V))) @rm -rf *.a - @rm -rf include @rm -rf tst/test_* %: %.base ; diff --git a/src/Makefile b/src/Makefile index c3e4931..1aa8617 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,7 +1,11 @@ include ../Makefile.config +INCLUDES := -isystem../grub -I../${ARCH} -I../devices +CFLAGS += ${INCLUDES} +CXXFLAGS += ${INCLUDES} + kernel.SRCS := multiboot2.c mmap.c kernel.cpp mem/vmm.c -kernel.OBJS := include conf.h +kernel.OBJS := conf.h TESTS += tst/test_taskqueue tst/test_roundrobin @@ -13,11 +17,3 @@ conf.h: conf.h.in @sed -i 's/@VERSION@/$(shell git describe)/' conf.h @sed -i 's/@CC@/$(shell ${CC} --version | head -n1)/' conf.h -include: - mkdir -p $@ - ln -sTf ../../grub $@/grub - ln -sTf ../../${ARCH} $@/arch - ln -sTf ../../${ARCH}/sys $@/sys - ln -sTf ../../devices $@/devices - ln -sTf ../../lib $@/lib - diff --git a/src/kernel.cpp b/src/kernel.cpp index 751bcb0..063fe11 100644 --- a/src/kernel.cpp +++ b/src/kernel.cpp @@ -7,15 +7,15 @@ extern "C" { #include "conf.h" #include "mem.h" -#include <devices/keyboard.h> -#include <devices/mouse.h> -#include <devices/pic.h> -#include <devices/ps2_controller.h> +#include <keyboard.h> +#include <mouse.h> +#include <pic.h> +#include <ps2_controller.h> #include <stdio.h> #include <sys/cpuid.h> } -#include <devices/uart.hpp> -#include <devices/vga.hpp> +#include <uart.hpp> +#include <vga.hpp> FILE *stdin; FILE *stdout; diff --git a/src/mem/vmm.c b/src/mem/vmm.c index 3d34a0a..77b06a8 100644 --- a/src/mem/vmm.c +++ b/src/mem/vmm.c @@ -1,5 +1,5 @@ #include "../mem.h" -#include <arch/paging.h> +#include <paging.h> extern struct DirectoryEntry k_pagedir[1024]; extern struct TableEntry k_ptable0x300[1024]; @@ -1,7 +1,7 @@ #pragma once #include "boot.h" -#include <grub/multiboot2.h> +#include <multiboot2.h> __attribute__((section(".multiboot.text"))) unsigned multiboot2_mmap(const struct multiboot_mmap_entry entries[], unsigned entry_count, unsigned bitmap[1024 * 32]); |