forked from KolibriOS/kolibrios
de30a03cac
git-svn-id: svn://kolibrios.org@8803 a494cfbc-eb01-0410-851d-a64ba20cac60
29 lines
665 B
Makefile
29 lines
665 B
Makefile
ifndef GCC
|
|
GCC=kos32-gcc
|
|
endif
|
|
|
|
KPACK=kpack
|
|
FASM=fasm
|
|
|
|
CFLAGS = -c -nostdinc -I../include -DGNUC -D_BUILD_LIBC -fno-common -Os -fno-builtin -fno-leading-underscore -fno-pie
|
|
|
|
SRC=libc.c
|
|
LIB=libc.obj
|
|
|
|
all:
|
|
$(MAKE) -C ../linuxtools/src
|
|
mkdir -p exports
|
|
../linuxtools/ExportGen symbols.txt exports/exports.c
|
|
$(FASM) crt/crt0.asm ../../bin/lib/crt0.o
|
|
$(GCC) $(CFLAGS) $(SRC) -o $(LIB)
|
|
$(KPACK) $(LIB)
|
|
../linuxtools/LoaderGen symbols.txt ../loader
|
|
../linuxtools/LoaderBuild ../loader
|
|
$(MAKE) -C libtcc
|
|
rm -rf exports
|
|
install:
|
|
cp -f ../lib/libc.obj ~/.kex/root/RD/1/LIB
|
|
|
|
clean:
|
|
rm ../../bin/lib/libc.obj.a ../../bin/lib/libtcc.a
|