Fix sysroot and an issue with making the usermode programs hosted
This commit is contained in:
parent
916ffea498
commit
e59c3e9dae
2
Makefile
2
Makefile
@ -14,7 +14,7 @@ AR = $(shell cat psinfo/$(PLAT)/ar.txt)
|
||||
NASM = $(shell cat psinfo/$(PLAT)/nasm.txt)
|
||||
EMU = $(shell cat psinfo/$(PLAT)/emu.txt)
|
||||
GDB = $(shell cat psinfo/$(PLAT)/gdb.txt)
|
||||
CFLAGS = -Isysroot/usr/include -Wextra -Wall -Wno-unused-parameter -g -ffreestanding
|
||||
CFLAGS = --sysroot=../sysroot -isystem=/usr/include -Wextra -Wall -Wno-unused-parameter -g -ffreestanding
|
||||
QFLAGS = -hda ext2.img -m 2G -boot d -cdrom os.iso -serial file:serout #-chardev socket,id=s1,port=3000,host=localhost -serial chardev:s1
|
||||
CWD = $(shell pwd)
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
C_SOURCES = $(wildcard *.c)
|
||||
OBJ = $(C_SOURCES:.c=.o )
|
||||
CFLAGS = -I../sysroot/usr/include -Wall -g
|
||||
CFLAGS = -Wall -g --sysroot=../sysroot -isystem=/usr/include -nostdlib
|
||||
CC = i386-elf-gcc
|
||||
|
||||
fsdrv: $(OBJ) ../libc/*
|
||||
@i386-elf-ld -o $@ $(OBJ) ../kernel/start.o ../libc/libc.a
|
||||
@$(CC) -z max-page-size=4096 -Xlinker -n -o $@ $(CFLAGS) $(OBJ) ../kernel/start.o ../libc/libc.a -lgcc
|
||||
|
||||
%.o: %.c
|
||||
@$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
@ -1,13 +1,13 @@
|
||||
C_SOURCES = $(wildcard *.c)
|
||||
OBJ = $(C_SOURCES:.c=.o )
|
||||
CFLAGS = -I../sysroot/usr/include -Wall -g
|
||||
CFLAGS = -Wall -g --sysroot=../sysroot -isystem=/usr/include -nostdlib
|
||||
CC = i386-elf-gcc
|
||||
|
||||
init: $(OBJ) ../libc/*
|
||||
@i386-elf-ld -o $@ $(OBJ) ../kernel/start.o ../libc/libc.a
|
||||
@$(CC) -z max-page-size=4096 -Xlinker -n -o $@ $(CFLAGS) $(OBJ) ../kernel/start.o ../libc/libc.a -lgcc
|
||||
|
||||
%.o: %.c
|
||||
@$(CC) $(CFLAGS) -c $< -o $@
|
||||
@$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
@rm -rf *.o init
|
||||
|
@ -1,10 +1,10 @@
|
||||
C_SOURCES = $(wildcard *.c)
|
||||
OBJ = $(C_SOURCES:.c=.o)
|
||||
CFLAGS = -I../sysroot/usr/include -Wall -g
|
||||
CFLAGS = -Wall -g --sysroot=../sysroot -isystem=/usr/include -nostdlib
|
||||
CC = i386-elf-gcc
|
||||
|
||||
vfs: $(OBJ) ../libc/*
|
||||
@i386-elf-ld -o $@ $(OBJ) ../kernel/start.o ../libc/libc.a
|
||||
@$(CC) -z max-page-size=4096 -Xlinker -n -o $@ $(CFLAGS) $(OBJ) ../kernel/start.o ../libc/libc.a -lgcc
|
||||
|
||||
%.o: %.c
|
||||
@$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
Loading…
Reference in New Issue
Block a user