diff --git a/Makefile b/Makefile index 23a8245..9ce84ab 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ all-kernel: make all -C arch I=$(shell pwd)/include clean-kernel: - make clean -C arch I=$(shell pwd)/include + make clean -C arch run-iso: all-kernel make run -C iso K=$(shell pwd)/arch/kernel @@ -17,4 +17,4 @@ all-iso: all-kernel make all -C iso K=$(shell pwd)/arch/kernel clean-iso: - make clean -C iso K=$(shell pwd)/arch/kernel + make clean -C iso diff --git a/arch/Makefile b/arch/Makefile index 017a148..6a9879c 100644 --- a/arch/Makefile +++ b/arch/Makefile @@ -1,7 +1,3 @@ -ifneq (ok, $(shell test -d '$(I)' && echo 'ok')) -$(error 'Include directory "$(I)" does not exist') -endif - CCPREFIX = i686-elf- AS = $(CCPREFIX)as @@ -19,7 +15,7 @@ kernel: $(OBJS) grub-file --is-x86-multiboot2 $@ %.c.o: %.c - $(CC) -c $< -o $@ -std=gnu99 -ffreestanding -nostdinc -fno-builtin -fno-stack-protector -Wall -Wextra -I$(I) + $(CC) -c $< -o $@ -std=gnu99 -ffreestanding -nostdinc -fno-builtin -fno-stack-protector -Wall -Wextra -I "$(I)" %.s.o: %.s $(AS) $< -o $@ diff --git a/iso/Makefile b/iso/Makefile index ed2bc88..67b3d3a 100644 --- a/iso/Makefile +++ b/iso/Makefile @@ -1,15 +1,8 @@ -ifneq (ok, $(shell test -f '$(K)' && echo 'ok')) -$(error 'Kernel "$(K)" does not exist') -endif - -ifneq (ok, $(shell grub-file --is-x86-multiboot2 '$(K)' && echo 'ok')) -$(error 'Kernel "$(K)" is not compliant with Multiboot 2') -endif - run: all qemu-system-i386 -cdrom image.iso all: + grub-file --is-x86-multiboot2 "$(K)" cp "$(K)" rootfs/boot/kernelmq grub-mkrescue rootfs -o image.iso