-
Notifications
You must be signed in to change notification settings - Fork 5
/
build-gcc-win64.bat
46 lines (33 loc) · 1.16 KB
/
build-gcc-win64.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@echo off
REM Output path (relative to build bat file)
SET OutputPath=.\build\win64
REM Assets path (relative to output folder)
SET AssetsPath=..\..\assets
REM Include path (relative to output folder)
SET IncludePath=..\..\deps\include
REM Lib path (relative to output folder)
SET LibPath=..\..\deps\lib\win64
REM Compiler flags
REM SET ProfilerFlags="-pg"
REM SET OptimizeFlags="-O2"
REM SET AssemblyFlags="-g -Wa,-ahl"
SET CommonCompilerFlags=-std=c99 -Wall -Wno-misleading-indentation -x c -static-libgcc %ProfilerFlags% %OptimizeFlags% %AssemblyFlags% -I %IncludePath%
SET CommonLinkerFlags=-L %LibPath% -l glfw3 -l opengl32 -l ws2_32
ctime -begin build_timings.ctm
REM Create output path if doesn't exists
IF NOT EXIST %OutputPath% MKDIR %OutputPath%
PUSHD %OutputPath%
REM Empty the build folder
DEL /Q *
REM Compile the project
gcc %CommonCompilerFlags% ..\..\src\war1.c ..\..\deps\include\glad\glad.c -o war1.exe %CommonLinkerFlags%
if %ERRORLEVEL% == 0 (
REM Copy assets
COPY %AssetsPath%\* .\
REM Copy dependencies
COPY %LibPath%\glfw3.dll .\glfw3.dll
)
POPD
ctime -end build_timings.ctm
REM ctime -stats build_timings.ctm
REM ctime -csv build_timings.ctm