-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_engine_lib.bat
42 lines (34 loc) · 1.6 KB
/
build_engine_lib.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
@echo off
set includes= /I src ^
/I dependencies\glad\include ^
/I dependencies\wglext\include ^
/I dependencies\stb\include ^
/I dependencies\OpenFBX\src ^
/I dependencies\SimplexNoise\src
set libs= Shell32.lib ^
msvcrt.lib ^
dependencies\glad\lib\glad.lib ^
dependencies\stb\lib\stb.lib ^
dependencies\OpenFBX\lib\OpenFBX.lib ^
dependencies\SimplexNoise\lib\SimplexNoise.lib
set compile_flags= /O2 /EHsc /std:c++17 /cgthreads8 /MP7 /GL
if "%1"=="release" (
set defines= /DGN_USE_OPENGL /DGN_PLATFORM_WINDOWS /DGN_USE_DEDICATED_GPU /DGN_RELEASE /DNDEBUG /DGN_COMPILER_MSVC
) else (
set defines= /DGN_USE_OPENGL /DGN_PLATFORM_WINDOWS /DGN_USE_DEDICATED_GPU /DGN_DEBUG /DGN_COMPILER_MSVC
)
rem Source
cl /c %compile_flags% src/containers/*.cpp %defines% %includes% & ^
cl /c %compile_flags% src/fileio/*.cpp %defines% %includes% & ^
cl /c %compile_flags% src/serialization/json/*.cpp %defines% %includes% & ^
cl /c %compile_flags% src/math/constants.cpp %defines% %includes% & ^
cl /c %compile_flags% src/core/application_internal.cpp %defines% %includes% & ^
cl /c %compile_flags% src/core/input_processing.cpp %defines% %includes% & ^
cl /c %compile_flags% src/platform/*.cpp %defines% %includes% & ^
cl /c %compile_flags% src/engine/*.cpp %defines% %includes% & ^
cl /c %compile_flags% src/graphics/*.cpp %defines% %includes%
if not exist lib md lib
rem Link and Make Library
lib *.obj %libs% /OUT:lib\engine.lib
rem Delete Intermediate Files
del *.obj *.exp