diff options
Diffstat (limited to 'kernel/Makefile')
| -rw-r--r-- | kernel/Makefile | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index 3427449..6cf8ae4 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -2,10 +2,10 @@ TARGET = kernel SRCS = $(wildcard *.c) ASMS = $(wildcard *.s) -OBJS = $(SRCS:.c=.o) $(ASMS:.s=.o) usrbin/usrbin.o +OBJS = $(SRCS:.c=.o) $(ASMS:.s=.o) usrbin/usrbin_blob.o -CFLAGS = -m32 -I../include -ffreestanding -nostdinc -nostdlib -fno-stack-protector -gstabs+ -LDFLAGS = -m elf_i386 -Tlink.ld +CFLAGS = -m32 -I../include -ffreestanding -nostdinc -nostdlib -fno-stack-protector -fno-pie -gstabs+ +LDFLAGS = -m elf_i386 -T link.ld ASMFLAGS = -f elf32 CC = gcc $(CFLAGS) @@ -16,8 +16,8 @@ all: build build: $(TARGET) -usrbin/usrbin.o: usrbin/usrbin.s - make -C usrbin +usrbin/usrbin_blob.o: $(wildcard usrbin/*.s) $(wildcard usrbin/*.c) + $(MAKE) -C usrbin .s.o: $(ASM) -o $*.o $^ @@ -31,6 +31,7 @@ $(TARGET): $(OBJS) clean: rm -f $(OBJS) rm -f $(TARGET) + $(MAKE) -C usrbin clean run: $(TARGET) qemu-system-x86_64 -s -kernel $(TARGET) |
