Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
9 | pmbaty | 1 | @echo off |
2 | setlocal enableextensions enabledelayedexpansion |
||
3 | |||
4 | rem // make sure we have the tools we need |
||
5 | if not defined VCINSTALLDIR ( |
||
6 | for %%v in (250 240 230 220 210 200 190 180 170 160 150 140 130 120 110 100 90 80) do ( |
||
7 | if exist "!VS%%vCOMNTOOLS!..\..\VC\Auxiliary\Build\vcvarsall.bat" ( call "!VS%%vCOMNTOOLS!..\..\VC\Auxiliary\Build\vcvarsall.bat" ) else if exist "!VS%%vCOMNTOOLS!..\..\VC\vcvarsall.bat" call "!VS%%vCOMNTOOLS!..\..\VC\vcvarsall.bat" |
||
8 | ) |
||
9 | if not defined VCINSTALLDIR echo No Microsoft C compiler was found on your system. Please install Visual Studio.& exit /b 1 |
||
10 | ) |
||
11 | set UNAME_S=Win32 |
||
12 | cl.exe 2>&1|powershell -noprofile -command "($Input|Select-Object -First 1) -replace '.+\s(.+)','$1'" > "%TEMP%\target-arch.txt"& set /p UNAME_M=< "%TEMP%\target-arch.txt"& del /f "%TEMP%\target-arch.txt" |
||
13 | |||
14 | rem // common compiler flags (use "-Od -DEBUG" for debug) |
||
15 | set CFLAGS= |
||
16 | |||
17 | rem // create an empty build directory and enter it |
||
18 | rmdir /s /q .build\minismackerplay > nul 2>&1 |
||
19 | mkdir .build\minismackerplay > nul 2>&1 |
||
20 | cd .build\minismackerplay |
||
21 | |||
22 | rem // build minismackerplay |
||
23 | echo Building minismackerplay... |
||
24 | cl -nologo ^ |
||
25 | -I../../lib/SDL2 ^ |
||
26 | -I../../lib/miniaudio/include/miniaudio ^ |
||
27 | -I../../lib/libsmacker ^ |
||
28 | ../../minismackerplay.c ^ |
||
29 | ../../lib/miniaudio/miniaudio.c ^ |
||
30 | ../../lib/libsmacker/smacker.c ^ |
||
31 | ../../lib/libsmacker/smk_bitstream.c ^ |
||
32 | ../../lib/libsmacker/smk_hufftree.c ^ |
||
33 | ../../lib/SDL2/SDL2.lib ^ |
||
34 | -o minismackerplay.exe || goto :end |
||
35 | copy /b /y minismackerplay.exe ..\..\minismackerplay.%UNAME_S%-%UNAME_M%.exe || goto :end |
||
36 | |||
37 | echo Done. |
||
38 | :end |
||
39 | cd ..\.. |