All pastes #2128282 Raw Edit

SConscript-gentoo

public python v1 · immutable
#2128282 ·published 2012-03-15 02:10 UTC
rendered paste body
# -*- mode: python -*-from sys import platformimport osimport SCons.Utilsrc_dll = ["basics.cpp","command_line.cpp","enabler.cpp","files.cpp",           "find_files_posix.cpp","graphics.cpp","init.cpp","interface.cpp",           "keybindings.cpp","music_and_sound_openal.cpp", "random.cpp",           "textlines.cpp","glew.c","enabler_input.cpp","ViewBase.cpp",           "KeybindingScreen.cpp", "win32_compat.cpp", "textures.cpp",           "resize++.cpp", "renderer_offscreen.cpp",           "ttf_manager.cpp"]dll  = '#libs/libgraphics.so'libgraphics = Truetetris = False# Propagate PATH. We'll just take our chances with non-repeatable builds.env = Environment(ENV = {'PATH' : os.environ['PATH']})# Libraries and linkingenv['LIBS']=["SDL_image","z","SDL_ttf","sndfile"]# env['LINKFLAGS']=['-Wl,-rpath=\$$ORIGIN/libs']# GLEW# latest portage version is incompatible, lets stick to the bundled oneenv.Append(CPPPATH = ['glext/'])env["CCFLAGS"].append('-DGLEW_STATIC') # Should only be needed on windows, but can't hurt.# Generic unix, including Linuxenv.ParseConfig('pkg-config gtk+-2.0 --cflags --libs')env.ParseConfig('pkg-config openal --cflags')env.ParseConfig('pkg-config sndfile --cflags')env.ParseConfig('pkg-config sdl --cflags --libs')env.ParseConfig('pkg-config glu --cflags --libs')# compiler flagsenv['CCFLAGS']=["-Dunix"]env['CXXFLAGS'].append("-std=gnu++0x")# this is gentoo, respect my flagsenv['CC'] = os.environ['CC']env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])env['CXX'] = os.environ['CXX']env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])# Finally, do the buildif libgraphics:   env.SharedLibrary(dll, src_dll)if tetris:   env.Program("#tetris", src_dll + ["tetris.cpp"])