X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=progs%2FSConstruct;h=4d268cc6d7bc0c34ef1f9a5f5287689bfb292028;hb=abbe96cb6e7581a52652030e40442b943a482840;hp=ac5314fac57b7a3b6b9083cd5a52ec5d89b5a30e;hpb=b0caa10a85b39f0e657dc0c4816884c9356b0b1a;p=mesa.git diff --git a/progs/SConstruct b/progs/SConstruct index ac5314fac57..4d268cc6d7b 100644 --- a/progs/SConstruct +++ b/progs/SConstruct @@ -10,9 +10,23 @@ env = Environment( # Use Mesa's headers and libs -if 0: +if 1: + build_topdir = 'build' + build_subdir = env['platform'] + if env['machine'] != 'generic': + build_subdir += '-' + env['machine'] + if env['debug']: + build_subdir += "-debug" + if env['profile']: + build_subdir += "-profile" + build_dir = os.path.join(build_topdir, build_subdir) + + env.Append(CPPDEFINES = ['GLEW_STATIC']) env.Append(CPPPATH = ['#../include']) - env.Append(LIBPATH = ['#../lib']) + env.Append(LIBPATH = [ + '#../' + build_dir + '/glew/', + '#../' + build_dir + '/glut/glx', + ]) conf = Configure(env) @@ -32,6 +46,13 @@ if conf.CheckCHeader('GL/glut.h'): env['GLUT_LIB'] = 'glut' env['GLUT'] = True +# GLEW +env['GLEW'] = False +if conf.CheckCHeader('GL/glew.h'): + env['GLEW_LIB'] = 'glew' + env['GLEW'] = True + env.Prepend(LIBS = ['glew']) + conf.Finish() @@ -39,5 +60,6 @@ Export('env') SConscript( 'SConscript', + build_dir = env['build'], duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html )