forked from KolibriOS/kolibrios
forget about "spaces&dos-paths"
git-svn-id: svn://kolibrios.org@236 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
79e75903db
commit
46d4105bf9
@ -3,7 +3,7 @@ rem #### CONFIG SECTION ####
|
|||||||
set LIBNAME=melibc.a
|
set LIBNAME=melibc.a
|
||||||
set INCLUDE=include
|
set INCLUDE=include
|
||||||
set CC=gcc
|
set CC=gcc
|
||||||
set CFLAGS=-c -nostdinc -DGNUC -I%cd%\%INCLUDE%
|
set CFLAGS=-c -nostdinc -DGNUC -I"%cd%\%INCLUDE%"
|
||||||
set AR=ar
|
set AR=ar
|
||||||
set ASM=fasm
|
set ASM=fasm
|
||||||
set dirs=file mem mesys string
|
set dirs=file mem mesys string
|
||||||
@ -13,7 +13,7 @@ set objs=
|
|||||||
set target=%1
|
set target=%1
|
||||||
if not "%1"=="clean" set target=all
|
if not "%1"=="clean" set target=all
|
||||||
|
|
||||||
set INCLUDE=%cd%
|
set INCLUDE="%cd%"
|
||||||
call :Target_%target%
|
call :Target_%target%
|
||||||
|
|
||||||
if ERRORLEVEL 0 goto Exit_OK
|
if ERRORLEVEL 0 goto Exit_OK
|
||||||
@ -24,27 +24,27 @@ pause
|
|||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
:Compile_C
|
:Compile_C
|
||||||
%CC% %CFLAGS% %1 -o %~dpn1.o
|
%CC% %CFLAGS% %1 -o "%~dpn1.o"
|
||||||
if not %errorlevel%==0 goto Error_Failed
|
if not %errorlevel%==0 goto Error_Failed
|
||||||
set objs=%objs% %~dpn1.o
|
set objs=%objs% "%~dpn1.o"
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
:Compile_Asm
|
:Compile_Asm
|
||||||
%ASM% %1 %~dpn1.o
|
%ASM% %1 "%~dpn1.o"
|
||||||
if not %errorlevel%==0 goto Error_Failed
|
if not %errorlevel%==0 goto Error_Failed
|
||||||
set objs=%objs% %~dpn1.o
|
set objs=%objs% "%~dpn1.o"
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
:Target_clean
|
:Target_clean
|
||||||
echo cleaning ...
|
echo cleaning ...
|
||||||
for %%a in (%dirs%) do del /Q %%a\*.o
|
for %%a in (%dirs%) do del /Q "%%a\*.o"
|
||||||
goto :Exit_OK
|
goto :Exit_OK
|
||||||
|
|
||||||
:Target_all
|
:Target_all
|
||||||
echo building all ...
|
echo building all ...
|
||||||
for %%a in (%dirs%) do (
|
for %%a in (%dirs%) do (
|
||||||
for %%f in (%%a\*.asm) do call :Compile_Asm %%f
|
for %%f in ("%%a\*.asm") do call :Compile_Asm "%%f"
|
||||||
for %%f in (%%a\*.c) do call :Compile_C %%f
|
for %%f in ("%%a\*.c") do call :Compile_C "%%f"
|
||||||
)
|
)
|
||||||
%AR% -ru %LIBNAME% %objs%
|
%AR% -ru %LIBNAME% %objs%
|
||||||
if not %errorlevel%==0 goto Error_Failed
|
if not %errorlevel%==0 goto Error_Failed
|
||||||
|
Loading…
Reference in New Issue
Block a user