Introduce libuKernel

This commit is contained in:
Pierre Pronchery 2018-03-21 22:45:11 +01:00
parent 22b23c8521
commit 9a2cf8af5c

View File

@ -1,38 +1,37 @@
subdirs=drivers
targets=uKernel.bin
targets=libuKernel,uKernel.bin
cppflags_force=-nostdinc -isystem ../include
as=$(CC)
asflags_force=$(CFLAGSF) $(CFLAGS) -c
cflags_force=-ffreestanding
cflags_force=-ffreestanding -m32
cflags=-W -Wall -g -O2 -fstack-protector
ldflags_force=-T uKernel.ld -nostdlib -static
ldflags_force=-T uKernel.ld -nostdlib -static -m32
dist=Makefile,arch/i386/boot.S,ssp.h,uKernel.ld
[libuKernel]
type=library
sources=ssp.c,stdlib.c,string.c
[uKernel.bin]
type=binary
sources=boot.S,drivers/console.c,main.c,ssp.c,stdlib.c,string.c
ldflags=-m32
depends=uKernel.ld
sources=boot.S,drivers/console.c,main.c
ldflags=$(OBJDIR)libuKernel.a
depends=$(OBJDIR)libuKernel.a,uKernel.ld
[boot.S]
depends=arch/i386/boot.S
asflags=-m32
[drivers/console.c]
depends=drivers/console/vga.h,drivers/console/vga.c
cflags=-m32
[main.c]
cflags=-m32
depends=drivers/console.h
[ssp.c]
cflags=-m32
depends=../include/stdlib.h,ssp.h
[stdlib.c]
cflags=-m32
depends=../include/stdlib.h,../include/unistd.h
[string.c]
cflags=-m32
depends=../include/string.h