mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-01 21:17:05 +03:00
16f5992719
New functions for work with system calls KolibriOS are added. Functions for format output are added: printf (), fprintf (), sprintf (), snprintf (), vsnprintf (). For material numbers it is meanwhile supported only format output the (%f), and exponential output a (%e) is not realized yet. Functions for format output correctly work only in GCC because TinyC incorrectly works with the functions containing variable number of arguments. git-svn-id: svn://kolibrios.org@647 a494cfbc-eb01-0410-851d-a64ba20cac60
68 lines
1.6 KiB
Batchfile
68 lines
1.6 KiB
Batchfile
@echo off
|
|
echo ####################################################
|
|
echo # Melibc builder #
|
|
echo # usage: build [clean] #
|
|
echo ####################################################
|
|
rem #### CONFIG SECTION ####
|
|
set LIBNAME=libck.a
|
|
set INCLUDE=include
|
|
set CC=
|
|
set CFLAGS=-c -nostdinc -DGNUC -I"%cd%\%INCLUDE%"
|
|
set AR=
|
|
set ASM=
|
|
set dirs=stdio memory kolibrisys string stdlib
|
|
rem #### END OF CONFIG SECTION ####
|
|
|
|
set objs=
|
|
set target=%1
|
|
if not "%1"=="clean" set target=all
|
|
|
|
set INCLUDE="%cd%"
|
|
call :Target_%target%
|
|
|
|
if ERRORLEVEL 0 goto Exit_OK
|
|
|
|
echo Probably at runing has been created error
|
|
echo For help send a report...
|
|
pause
|
|
goto :eof
|
|
|
|
:Compile_C
|
|
%CC% %CFLAGS% %1 -o "%~dpn1.o"
|
|
if not %errorlevel%==0 goto Error_Failed
|
|
set objs=%objs% "%~dpn1.o"
|
|
goto :eof
|
|
|
|
:Compile_Asm
|
|
%ASM% %1 "%~dpn1.o"
|
|
if not %errorlevel%==0 goto Error_Failed
|
|
set objs=%objs% "%~dpn1.o"
|
|
goto :eof
|
|
|
|
:Target_clean
|
|
echo cleaning ...
|
|
for %%a in (%dirs%) do del /Q "%%a\*.o"
|
|
goto :Exit_OK
|
|
|
|
:Target_all
|
|
echo building all ...
|
|
for %%a in (%dirs%) do (
|
|
for %%f in ("%%a\*.asm") do call :Compile_Asm "%%f"
|
|
for %%f in ("%%a\*.c") do call :Compile_C "%%f"
|
|
)
|
|
%AR% -ru %LIBNAME% %objs%
|
|
if not %errorlevel%==0 goto Error_Failed
|
|
goto Exit_OK
|
|
|
|
:Error_Failed
|
|
echo error: execution failed
|
|
pause
|
|
exit 1
|
|
|
|
:Exit_OK
|
|
echo ####################################################
|
|
echo # All operations has been done... #
|
|
echo # For cleaning run this script with param " clean" #
|
|
echo ####################################################
|
|
pause
|
|
exit 0 |