2021-04-28 02:18:12 +02:00
|
|
|
ifndef GCC
|
|
|
|
GCC=kos32-gcc
|
|
|
|
endif
|
2021-04-27 18:33:31 +02:00
|
|
|
|
|
|
|
KPACK=kpack
|
|
|
|
FASM=fasm
|
|
|
|
|
|
|
|
CFLAGS = -c -nostdinc -I../include -DGNUC -D_KOLIBRI_LIBC_OBJ -Os -fno-common -fno-builtin -fno-leading-underscore -fno-pie
|
|
|
|
|
|
|
|
SRC=libc.c
|
2021-04-27 19:40:25 +02:00
|
|
|
LIB=../lib/libc.obj
|
2021-04-27 18:33:31 +02:00
|
|
|
|
|
|
|
all:
|
|
|
|
$(MAKE) -C ../linuxtools/src
|
|
|
|
mkdir -p exports ../lib
|
|
|
|
../linuxtools/ExportGen symbols.txt exports/exports.c
|
|
|
|
$(FASM) crt/crt0.asm ../lib/crt0.o
|
2021-04-28 02:18:12 +02:00
|
|
|
$(GCC) $(CFLAGS) $(SRC) -o $(LIB)
|
2021-04-27 18:33:31 +02:00
|
|
|
$(KPACK) $(LIB)
|
2021-04-28 02:18:12 +02:00
|
|
|
../linuxtools/LoaderGen symbols.txt ../loader
|
|
|
|
../linuxtools/LoaderBuild ../loader
|
2021-05-10 00:12:43 +02:00
|
|
|
$(MAKE) -C libtcc
|
2021-04-28 02:18:12 +02:00
|
|
|
rm -rf exports
|
2021-04-27 18:33:31 +02:00
|
|
|
install:
|
|
|
|
cp -f ../lib/libc.obj ~/.kex/root/RD/1/LIB
|
|
|
|
|
|
|
|
clean:
|
2021-05-10 00:12:43 +02:00
|
|
|
rm ../lib/*
|