diff --git a/Makefile b/Makefile index 6fbc9b9..ae19953 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ CC = i686-elf-gcc -INCLUDE = -I./ +INCLUDE = -I./include -I./lib CFLAGS = -Wall -Wextra -Werror -ffreestanding $(INCLUDE) LDFLAGS = -T kernel.ld -ffreestanding -O3 -nostdlib -lgcc @@ -11,11 +11,6 @@ KERNELOBJ := $(addprefix $(BUILDDIR)/, \ $(patsubst %.c,%.o,\ $(patsubst %.asm,%.o,$(KERNELSRC))))) -LIBSRC := $(shell find ./lib -name '*.c') -LIBOBJ := $(addprefix $(BUILDDIR)/, \ - $(notdir \ - $(patsubst %.c,%.o,$(LIBSRC)))) - KERNELIMG := $(BUILDDIR)/kernel.bin QEMUFLAGS = -d int -s \ @@ -31,7 +26,7 @@ qemu: kernel kernel: $(KERNELIMG) -$(KERNELIMG): $(KERNELOBJ) $(LIBOBJ) +$(KERNELIMG): $(KERNELOBJ) $(CC) $^ -o $@ $(LDFLAGS) $(BUILDDIR)/%.o: %.c $(CC) $(CFLAGS) -c $^ -o $@ diff --git a/acpi.h b/include/acpi.h similarity index 100% rename from acpi.h rename to include/acpi.h diff --git a/gdt.h b/include/gdt.h similarity index 100% rename from gdt.h rename to include/gdt.h diff --git a/ide.h b/include/ide.h similarity index 100% rename from ide.h rename to include/ide.h diff --git a/idt.h b/include/idt.h similarity index 100% rename from idt.h rename to include/idt.h diff --git a/io.h b/include/io.h similarity index 100% rename from io.h rename to include/io.h diff --git a/multiboot.h b/include/multiboot.h similarity index 100% rename from multiboot.h rename to include/multiboot.h diff --git a/pci.h b/include/pci.h similarity index 100% rename from pci.h rename to include/pci.h diff --git a/pic8259.h b/include/pic8259.h similarity index 100% rename from pic8259.h rename to include/pic8259.h diff --git a/printf.h b/include/printf.h similarity index 100% rename from printf.h rename to include/printf.h diff --git a/ps2.h b/include/ps2.h similarity index 100% rename from ps2.h rename to include/ps2.h diff --git a/strcmp.h b/include/strcmp.h similarity index 100% rename from strcmp.h rename to include/strcmp.h diff --git a/vga.h b/include/vga.h similarity index 100% rename from vga.h rename to include/vga.h