From 8b9aa730c6cf91d13892ef8a68a2aeece4e627f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 10 Feb 2009 18:25:31 +0000 Subject: progs: Build rebook with scons too. --- progs/SConscript | 1 + progs/redbook/SConscript | 91 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 progs/redbook/SConscript (limited to 'progs') diff --git a/progs/SConscript b/progs/SConscript index 631923a38f..68a48b4728 100644 --- a/progs/SConscript +++ b/progs/SConscript @@ -2,5 +2,6 @@ SConscript([ 'util/SConscript', 'demos/SConscript', 'trivial/SConscript', + 'redbook/SConscript', 'vp/SConscript', ]) diff --git a/progs/redbook/SConscript b/progs/redbook/SConscript new file mode 100644 index 0000000000..242cb6647f --- /dev/null +++ b/progs/redbook/SConscript @@ -0,0 +1,91 @@ +Import('*') + +if not env['GLUT']: + Return() + +env = env.Clone() + +env.Prepend(CPPPATH = [ + '../util', +]) + +env.Prepend(LIBS = [ + util, + '$GLUT_LIB' +]) + +if env['platform'] == 'windows': + env.Append(CPPDEFINES = ['NOMINMAX']) + env.Prepend(LIBS = ['winmm']) + +progs = [ + 'aaindex', + 'aapoly', + 'aargb', + 'accanti', + 'accpersp', + 'alpha3D', + 'alpha', + 'anti', + 'bezcurve', + 'bezmesh', + 'checker', + 'clip', + 'colormat', + 'cube', + 'depthcue', + 'dof', + 'double', + 'drawf', + 'feedback', + 'fog', + 'fogindex', + 'font', + 'hello', + 'image', + 'light', + 'lines', + 'list', + 'material', + 'mipmap', + 'model', + 'movelight', + 'nurbs', + 'pickdepth', + 'picksquare', + 'plane', + 'planet', + 'polyoff', + 'polys', + 'quadric', + 'robot', + 'sccolorlight', + 'scenebamb', + 'scene', + 'sceneflat', + 'select', + 'smooth', + 'stencil', + 'stroke', + 'surface', + 'teaambient', + 'teapots', + 'tess', + 'tesswind', + 'texbind', + 'texgen', + 'texprox', + 'texsub', + 'texturesurf', + 'torus', + 'trim', + 'unproject', + 'varray', + 'wrap', +] + +for prog in progs: + env.Program( + target = prog, + source = prog + '.c', + ) -- cgit v1.2.3 From 52233f27bb99d21a085117990936d9c355e4ce08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 10 Feb 2009 20:27:49 +0000 Subject: progs: Build samples dir with scons and glew. --- progs/SConscript | 3 ++- progs/samples/Makefile | 2 +- progs/samples/SConscript | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ progs/samples/blendeq.c | 7 +++--- progs/samples/blendxor.c | 9 +++----- 5 files changed, 67 insertions(+), 12 deletions(-) create mode 100644 progs/samples/SConscript (limited to 'progs') diff --git a/progs/SConscript b/progs/SConscript index 68a48b4728..6484c761fc 100644 --- a/progs/SConscript +++ b/progs/SConscript @@ -1,7 +1,8 @@ SConscript([ 'util/SConscript', 'demos/SConscript', - 'trivial/SConscript', 'redbook/SConscript', + 'samples/SConscript', + 'trivial/SConscript', 'vp/SConscript', ]) diff --git a/progs/samples/Makefile b/progs/samples/Makefile index 63dca07d2e..b300e38b9c 100644 --- a/progs/samples/Makefile +++ b/progs/samples/Makefile @@ -7,7 +7,7 @@ INCDIR = $(TOP)/include LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME) -LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) +LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \ font line logo nurb olympic overlay point prim quad select \ diff --git a/progs/samples/SConscript b/progs/samples/SConscript new file mode 100644 index 0000000000..7a8a0d62d8 --- /dev/null +++ b/progs/samples/SConscript @@ -0,0 +1,58 @@ +Import('*') + +if not env['GLUT']: + Return() + +env = env.Clone() + +env.Prepend(CPPPATH = [ + '../util', +]) + +env.Prepend(LIBS = [ + util, + '$GLUT_LIB' +]) + +if env['platform'] == 'windows': + env.Append(CPPDEFINES = ['NOMINMAX']) + env.Prepend(LIBS = ['winmm']) + +progs = [ + 'accum', + 'bitmap1', + 'bitmap2', + 'blendeq', + 'blendxor', + 'copy', + 'cursor', + 'depth', + 'eval', + 'fog', + 'font', + 'line', + 'logo', + 'nurb', + #'oglinfo', + 'olympic', + 'overlay', + 'point', + 'prim', + 'quad', + 'rgbtoppm', + 'select', + 'shape', + 'sphere', + 'star', + 'stencil', + 'stretch', + 'texture', + 'tri', + 'wave', +] + +for prog in progs: + env.Program( + target = prog, + source = prog + '.c', + ) diff --git a/progs/samples/blendeq.c b/progs/samples/blendeq.c index d5143ecdf5..cd0474c5ce 100644 --- a/progs/samples/blendeq.c +++ b/progs/samples/blendeq.c @@ -11,10 +11,7 @@ #include #include #include -#ifdef _WIN32 -#include -#endif -#define GL_GLEXT_PROTOTYPES +#include #include GLenum doubleBuffer; @@ -274,6 +271,8 @@ int main(int argc, char **argv) exit(1); } + glewInit(); + /* Make sure blend_logic_op extension is there. */ s = (char *) glGetString(GL_EXTENSIONS); version = (char*) glGetString(GL_VERSION); diff --git a/progs/samples/blendxor.c b/progs/samples/blendxor.c index 5bc4aa9bea..057143651f 100644 --- a/progs/samples/blendxor.c +++ b/progs/samples/blendxor.c @@ -10,13 +10,8 @@ #include #endif #include -#ifdef _WIN32 -#include -#endif -#define GL_GLEXT_LEGACY -#define GL_GLEXT_PROTOTYPES +#include #include -#include GLenum doubleBuffer; @@ -176,6 +171,8 @@ int main(int argc, char **argv) exit(1); } + glewInit(); + /* Make sure blend_logic_op extension is there. */ s = (char *) glGetString(GL_EXTENSIONS); version = (char*) glGetString(GL_VERSION); -- cgit v1.2.3