Get all programs building using the new hosted cross-compiler
This commit is contained in:
parent
1727e2c44b
commit
54ab300502
5
Makefile
5
Makefile
@ -35,7 +35,10 @@ os.iso: kernel/kernel.elf init vfs fsdrv initrd
|
|||||||
@cd initrd; tar -f ../sysroot/boot/initrd.tar -c *
|
@cd initrd; tar -f ../sysroot/boot/initrd.tar -c *
|
||||||
@grub-mkrescue -o $@ sysroot >/dev/null 2>/dev/null
|
@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
|
@cd $@ && make
|
||||||
@cp $@/$@ initrd/$@
|
@cp $@/$@ initrd/$@
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
C_SOURCES = $(wildcard *.c)
|
C_SOURCES = $(wildcard *.c)
|
||||||
OBJ = $(C_SOURCES:.c=.o )
|
OBJ = $(C_SOURCES:.c=.o )
|
||||||
CFLAGS = -Wall -g --sysroot=../sysroot -isystem=/usr/include -nostdlib
|
CFLAGS = -Wall -g
|
||||||
CC = i386-myos-gcc
|
CC = i386-myos-gcc
|
||||||
|
|
||||||
fsdrv: $(OBJ) ../libc/*
|
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
|
%.o: %.c
|
||||||
@$(CC) $(CFLAGS) -c $< -o $@
|
@$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
C_SOURCES = $(wildcard *.c)
|
C_SOURCES = $(wildcard *.c)
|
||||||
OBJ = $(C_SOURCES:.c=.o)
|
OBJ = $(C_SOURCES:.c=.o)
|
||||||
CFLAGS = -Wall -g --sysroot=../sysroot -isystem=/usr/include -nostdlib
|
CFLAGS = -Wall -g
|
||||||
CC = i386-myos-gcc
|
CC = i386-myos-gcc
|
||||||
|
|
||||||
vfs: $(OBJ) ../libc/*
|
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
|
%.o: %.c
|
||||||
@$(CC) $(CFLAGS) -c $< -o $@
|
@$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
Loading…
Reference in New Issue
Block a user