37 lines
815 B
Batchfile
37 lines
815 B
Batchfile
@echo off
|
|
rem Set variables
|
|
set SRC_DIR=src
|
|
set LIB_DIR=lib
|
|
|
|
rem Create the %LIB_DIR% directory if it does not exist
|
|
if not exist %LIB_DIR% mkdir %LIB_DIR%
|
|
|
|
if "%1"=="/clean" (
|
|
goto clean
|
|
)
|
|
|
|
rem Configure the environment for Visual Studio
|
|
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
|
|
|
|
rem Build %SRC_DIR%\*.c files
|
|
cl /c /Fd:%LIB_DIR%\ /Fo:%LIB_DIR%\ /Iinclude\ /I%SRC_DIR%\ %SRC_DIR%\*.c
|
|
|
|
rem Link the object files into a static library
|
|
lib %LIB_DIR%\*.obj
|
|
|
|
rem Create a ssvw64.lib file from a ssvw64.def file
|
|
lib /def:%SRC_DIR%\ssvw64.def /out:%LIB_DIR%\ssvw64.lib /machine:x64
|
|
|
|
rem Build complete
|
|
pause
|
|
exit /b 0
|
|
|
|
:clean
|
|
del %LIB_DIR%\*.obj
|
|
del %LIB_DIR%\*.lib
|
|
del %LIB_DIR%\*.exp
|
|
|
|
rem Clean complete
|
|
pause
|
|
exit /b 0
|