-
Notifications
You must be signed in to change notification settings - Fork 1
/
SConstruct
22 lines (22 loc) · 1.15 KB
/
SConstruct
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
env = Environment()
env.Replace( CXX = "clang++" )
env.Append( CXXFLAGS = "-stdlib=libc++ -fcolor-diagnostics")
env.Append( CCFLAGS = '-pedantic -Wall -Wextra -Werror -std=c++11' )
env.Append( LIBS = ['c++','SDL', 'SDL_image', 'SDL_gfx', 'SDL_mixer', 'SDL_ttf',] )
env.Append( CPPPATH = '.' )
debug = ARGUMENTS.get('debug', 0)
if int(debug)==1:
env.SetOption('num_jobs', 1)
env.Append(LINKFLAGS='-faddress-sanitizer ')
env.Append(CCFLAGS = '-faddress-sanitizer -fcatch-undefined-behavior -g -ggdb -O0')
else:
env.SetOption('num_jobs', 4)
env.Append(CCFLAGS = '-O3 -mmmx -msse -msse2 -msse3')
env.Program("game_name.bin", [ env.Object(Glob('game_name/*.cpp')),
env.Object(Glob('game_name/GameLogic/*.cpp')),
env.Object(Glob('game_name/Objects/*.cpp')),
env.Object(Glob('pic-gl/Util/*.cpp')),
env.Object(Glob('pic-gl/Ui/*.cpp')),
env.Object(Glob('pic-gl/Resources/*.cpp')),
env.Object(Glob('pic-gl/Gameflow/*.cpp')),
] )