Get all programs building using the new hosted cross-compiler

This commit is contained in:
pjht 2019-08-28 08:26:42 -05:00
parent 1727e2c44b
commit 54ab300502
4 changed files with 8 additions and 5 deletions

View File

@ -35,7 +35,10 @@ os.iso: kernel/kernel.elf init vfs fsdrv initrd
@cd initrd; tar -f ../sysroot/boot/initrd.tar -c *
@grub-mkrescue -o $@ sysroot >/dev/null 2>/dev/null
init: init/* kernel/start.o
crts: kernel/crt0.o
cp $^ sysroot/usr/lib
init: init/* crts
@cd $@ && make
@cp $@/$@ initrd/$@

View File

@ -1,10 +1,10 @@
C_SOURCES = $(wildcard *.c)
OBJ = $(C_SOURCES:.c=.o )
CFLAGS = -Wall -g --sysroot=../sysroot -isystem=/usr/include -nostdlib
CFLAGS = -Wall -g
CC = i386-myos-gcc
fsdrv: $(OBJ) ../libc/*
@$(CC) -z max-page-size=4096 -Xlinker -n -o $@ $(CFLAGS) $(OBJ) ../kernel/start.o ../sysroot/usr/lib/libc.a -lgcc
@$(CC) -o $@ $(CFLAGS) $(OBJ)
%.o: %.c
@$(CC) $(CFLAGS) -c $< -o $@

View File

@ -1,10 +1,10 @@
C_SOURCES = $(wildcard *.c)
OBJ = $(C_SOURCES:.c=.o)
CFLAGS = -Wall -g --sysroot=../sysroot -isystem=/usr/include -nostdlib
CFLAGS = -Wall -g
CC = i386-myos-gcc
vfs: $(OBJ) ../libc/*
@$(CC) -z max-page-size=4096 -Xlinker -n -o $@ $(CFLAGS) $(OBJ) ../kernel/start.o ../sysroot/usr/lib/libc.a -lgcc
@$(CC) -o $@ $(CFLAGS) $(OBJ)
%.o: %.c
@$(CC) $(CFLAGS) -c $< -o $@