fix init and vfs having no rule to make start.o

This commit is contained in:
pjht 2019-05-25 10:25:15 -05:00
parent b28234806b
commit 7f58cdf2b6
3 changed files with 6 additions and 6 deletions

View File

@ -27,11 +27,11 @@ os.iso: kernel.elf initrd/* initrd/init initrd/vfs
.PHONY: kernel.elf initrd/init initrd/vfs
initrd/init:
initrd/init: kernel.elf #Programs must have this so the current start.o is built
$(MAKE) -C init
cp init/init initrd/init
initrd/vfs:
initrd/vfs: kernel.elf #Programs must have this so the current start.o is built
$(MAKE) -C vfs
cp vfs/vfs initrd/vfs

View File

@ -1,10 +1,10 @@
C_SOURCES = $(wildcard *.c)
OBJ = $(C_SOURCES:.c=.o ../kernel/start.o)
OBJ = $(C_SOURCES:.c=.o )
CFLAGS = -I../sysroot/usr/include -Wall -g -ffreestanding
CC = i386-elf-gcc
init: $(OBJ)
@i386-elf-ld -o $@ $^ ../libc/libc.a
@i386-elf-ld -o $@ $^ ../kernel/start.o ../libc/libc.a
%.o: %.c
@$(CC) $(CFLAGS) -c $< -o $@

View File

@ -1,10 +1,10 @@
C_SOURCES = $(wildcard *.c)
OBJ = $(C_SOURCES:.c=.o ../kernel/start.o)
OBJ = $(C_SOURCES:.c=.o)
CFLAGS = -I../sysroot/usr/include -Wall -g -ffreestanding
CC = i386-elf-gcc
vfs: $(OBJ)
@i386-elf-ld -o $@ $^ ../libc/libc.a
@i386-elf-ld -o $@ $^ ../kernel/start.o ../libc/libc.a
%.o: %.c
@$(CC) $(CFLAGS) -c $< -o $@