mirror of
https://github.com/mirror/tinycc.git
synced 2025-03-18 09:30:06 +08:00
31 lines
475 B
Batchfile
31 lines
475 B
Batchfile
|
@echo off
|
||
|
setlocal enabledelayedexpansion
|
||
|
|
||
|
pushd %~dp0
|
||
|
|
||
|
path %~dp0;%path%
|
||
|
|
||
|
set EXT=.exe
|
||
|
echo %*|findstr /R /C:"\<-c\>" >nul &&set EXT=.o
|
||
|
echo %*|findstr /R /C:"\<-shared\>" >nul &&set EXT=.dll
|
||
|
|
||
|
::1st file found must be the main c file to get output file name
|
||
|
set OUTF=
|
||
|
call :FINDFN %*
|
||
|
|
||
|
if "%OUTF%"=="" goto :EXIT
|
||
|
|
||
|
call _parseLibs -vv -o "%OUTF%" %*
|
||
|
|
||
|
:EXIT
|
||
|
popd
|
||
|
pause
|
||
|
exit /b
|
||
|
|
||
|
:FINDFN
|
||
|
for %%i in (%*) do (
|
||
|
if exist %%i set OUTF=%%~dpni%EXT%&goto :ENDFDF
|
||
|
)
|
||
|
:ENDFDF
|
||
|
exit /b
|