cleanup
This commit is contained in:
parent
dacdc0ae8d
commit
fc1bde4e60
9
Makefile
9
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 $@
|
||||
|
|
Loading…
Reference in New Issue
Block a user