2016-06-03 05:07:40 +00:00
|
|
|
@echo OFF
|
2016-11-09 11:36:41 +00:00
|
|
|
|
|
|
|
REM Build tags file
|
|
|
|
ctags -R
|
|
|
|
|
|
|
|
REM Check if build tool is on path
|
|
|
|
REM >nul, 2>nul will remove the output text from the where command
|
|
|
|
where cl.exe >nul 2>nul
|
|
|
|
if %errorlevel%==1 call msvc86.bat
|
|
|
|
|
2016-06-03 05:07:40 +00:00
|
|
|
REM Drop compilation files into build folder
|
|
|
|
IF NOT EXIST ..\bin mkdir ..\bin
|
|
|
|
pushd ..\bin
|
|
|
|
|
|
|
|
set GLEW=..\extern\glew-1.13.0
|
2016-06-16 17:00:11 +00:00
|
|
|
set GLFW=..\extern\glfw-3.2.bin.WIN32
|
2016-06-03 05:07:40 +00:00
|
|
|
set STB=..\extern\stb-master
|
2016-07-24 12:19:25 +00:00
|
|
|
set OAL=..\extern\openal-soft
|
2016-06-03 05:07:40 +00:00
|
|
|
|
|
|
|
REM EHsc enables exception handling
|
|
|
|
REM MD uses dynamic runtime library
|
|
|
|
REM Zi enables debug data
|
2016-06-04 06:36:37 +00:00
|
|
|
set compileFlags=/EHsc /MD /Zi /W3
|
2016-06-03 05:07:40 +00:00
|
|
|
|
|
|
|
REM Include directories
|
2016-07-24 12:19:25 +00:00
|
|
|
set includeFlags=/I ..\src\include /I %GLEW%\include /I %GLFW%\include /I %STB%\include /I %OAL%\include
|
2016-06-03 05:07:40 +00:00
|
|
|
|
|
|
|
REM Link libraries
|
2016-07-24 12:19:25 +00:00
|
|
|
set linkLibraries=/link opengl32.lib %GLFW%\lib-vc2015\glfw3.lib %GLEW%\lib\Release\Win32\glew32s.lib %OAL%\lib\Win32\OpenAL32.lib gdi32.lib user32.lib shell32.lib
|
2016-06-04 12:42:22 +00:00
|
|
|
set ignoreLibraries=/NODEFAULTLIB:"libc.lib" /NODEFAULTLIB:"libcmt.lib" /NODEFAULTLIB:"libcd.lib" /NODEFAULTLIB:"libcmtd.lib" /NODEFAULTLIB:"msvcrtd.lib"
|
2016-06-03 05:07:40 +00:00
|
|
|
|
2016-06-18 09:12:09 +00:00
|
|
|
cl %compileFlags% ..\src\*.c %includeFlags% %linkLibraries% %ignoreLibraries% /OUT:"Dengine.exe"
|
2016-06-03 05:07:40 +00:00
|
|
|
REM /SUBSYSTEM:CONSOLE
|
|
|
|
|
|
|
|
popd
|