Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 290294 | Differences between
and this patch

Collapse All | Expand All

(-)a/g_src/SConscript (-19 / +19 lines)
Lines 1-6 Link Here
1
# -*- mode: python -*-
1
# -*- mode: python -*-
2
from sys import platform
2
from sys import platform
3
import os
3
import os
4
import SCons.Util
4
5
5
src_dll = ["basics.cpp","command_line.cpp","enabler_sdl.cpp","files.cpp",
6
src_dll = ["basics.cpp","command_line.cpp","enabler_sdl.cpp","files.cpp",
6
           "find_files_posix.cpp","graphics.cpp","init.cpp","interface.cpp",
7
           "find_files_posix.cpp","graphics.cpp","init.cpp","interface.cpp",
Lines 17-58 profile = False Link Here
17
# Propagate PATH. We'll just take our chances with non-repeatable builds.
18
# Propagate PATH. We'll just take our chances with non-repeatable builds.
18
env = Environment(ENV = {'PATH' : os.environ['PATH']})
19
env = Environment(ENV = {'PATH' : os.environ['PATH']})
19
20
21
if optimize:
22
   env["CCFLAGS"]+=["-O3"]
23
24
if os.environ.has_key('CC'):
25
	env['CC'] = os.environ['CC']
26
if os.environ.has_key('CFLAGS'):
27
	env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
28
if os.environ.has_key('CXX'):
29
	env['CXX'] = os.environ['CXX']
30
if os.environ.has_key('CXXFLAGS'):
31
	env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
32
if os.environ.has_key('LDFLAGS'):
33
	env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
34
20
# Init variables, and make sure they're around for appending to
35
# Init variables, and make sure they're around for appending to
21
# These variables are the ones used by the actual compilation. We construct
36
# These variables are the ones used by the actual compilation. We construct
22
# them from ccflags/libs in varying ways depending on which compiler is used,
37
# them from ccflags/libs in varying ways depending on which compiler is used,
23
# below.
38
# below.
24
env['CPPPATH']=["#g_src/fmodexinclude"]
25
env['CCFLAGS']=["-Dunix"]
39
env['CCFLAGS']=["-Dunix"]
26
env['LIBS']=["ncursesw", "SDL_image", "boost_regex"]
40
env['LIBS']=["ncursesw", "SDL_image"]
27
# If there's a library in the libs folder it will get linked over a system one.
41
# If there's a library in the libs folder it will get linked over a system one.
28
env['LIBPATH']=["#libs"]
42
env['LINKFLAGS']=["-Wl,--as-needed",'-Wl,-rpath=\$$ORIGIN/libs','-lSDL','-lSDL_image','-lsndfile','-lz']
29
env['LINKFLAGS']=["-Wl,--as-needed",'-Wl,-rpath=\$$ORIGIN/libs','-Wl,-static','-lSDL','-lSDL_image','-lsndfile','-Wl,-Bdynamic']
30
31
# GLEW
32
env["CPPPATH"].append('#g_src/glext')
33
env["CCFLAGS"].append('-DGLEW_STATIC') # Should only be needed on windows, but can't hurt.
34
43
35
# Generic unix, including Linux
44
# Generic unix, including Linux
36
env['ASFLAGS']="--32"
37
env['LINKFLAGS'].append("-m32")
38
env["CCFLAGS"].append("-m32")
39
env.ParseConfig('pkg-config gtk+-2.0 --cflags --libs')
45
env.ParseConfig('pkg-config gtk+-2.0 --cflags --libs')
40
env.ParseConfig('pkg-config openal --cflags --libs')
46
env.ParseConfig('pkg-config openal --cflags --libs')
41
env.ParseConfig('pkg-config sndfile --static --cflags')
47
env.ParseConfig('pkg-config sndfile --cflags')
42
env.ParseConfig('pkg-config sdl --static --cflags')
48
env.ParseConfig('pkg-config sdl --cflags')
43
env.ParseConfig('pkg-config zlib --cflags --libs')
44
env.ParseConfig('pkg-config glu --cflags --libs')
49
env.ParseConfig('pkg-config glu --cflags --libs')
45
50
46
47
if profile:
51
if profile:
48
   env["CCFLAGS"].append("-pg")
52
   env["CCFLAGS"].append("-pg")
49
   env['LINKFLAGS'].append("-pg")
53
   env['LINKFLAGS'].append("-pg")
50
54
51
if optimize:
52
   env["CCFLAGS"]+=["-O3","-march=pentium3","-mfpmath=sse"]
53
54
if debug:
55
if debug:
55
   env["CCFLAGS"].append("-ggdb")
56
   env["CCFLAGS"].append("-DDEBUG")
56
   env["CCFLAGS"].append("-DDEBUG")
57
   
57
   
58
# Finally, do the build
58
# Finally, do the build

Return to bug 290294