fixed problems with mx builds; update project files

git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@320 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
ikits 2004-12-29 07:24:49 +00:00
parent a576f04909
commit 6e35a3c7a5
21 changed files with 158 additions and 35 deletions

View File

@ -95,14 +95,18 @@ $(I.DEST)/glxew.h: $(EXT)/.dummy
$(S.DEST)/glew_gl.c: $(EXT)/.dummy
cp -f $(SRC)/glew_gl_head.c $@
$(BIN)/make_def.pl GL $(CORE)/GL_VERSION* $(EXT)/GL_* >> $@
$(BIN)/make_def_fun.pl GL $(CORE)/GL_VERSION* >> $@
$(BIN)/make_def_fun.pl GL $(EXT)/GL_* >> $@
cat $(SRC)/glew_gl_fun.c >> $@
$(BIN)/make_def_var.pl GL $(CORE)/GL_VERSION* >> $@
$(BIN)/make_def_var.pl GL $(EXT)/GL_* >> $@
cat $(SRC)/glew_gl_var.c >> $@
$(BIN)/make_init.pl GL $(CORE)/GL_VERSION* >> $@
$(BIN)/make_init.pl GL $(EXT)/GL_* >> $@
cat $(SRC)/glew_gl_init.c >> $@
$(BIN)/make_list.pl $(CORE)/GL_VERSION* | grep -v '\"GL_VERSION' >> $@
$(BIN)/make_list.pl $(EXT)/GL_* >> $@
cat $(SRC)/glew_gl_tail.c >> $@
# $(BIN)/fix_OML_sync_control.sh $@
perl -e "s/GLEW_VERSION_STRING/$(GLEW_MAJOR)\.$(GLEW_MINOR)\.$(GLEW_MICRO)/g" -pi $@
perl -e "s/GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader\(GLEW_CONTEXT_ARG_VAR_INIT\);/{ GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(GLEW_CONTEXT_ARG_VAR_INIT); _glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); }/g" -pi $@
rm -f $@.bak
@ -110,19 +114,21 @@ $(S.DEST)/glew_gl.c: $(EXT)/.dummy
$(S.DEST)/glew_wgl.c: $(EXT)/.dummy
cp -f $(SRC)/glew_wgl_head.c $@
$(BIN)/make_def.pl WGL $(EXT)/WGL_* >> $@
echo -e "\n#endif /* !GLEW_MX */\n" >> $@
cat $(SRC)/glew_wgl_def.c >> $@
$(BIN)/make_init.pl WGL $(EXT)/WGL_* >> $@
cat $(SRC)/glew_wgl_init.c >> $@
$(BIN)/make_list.pl $(EXT)/WGL_* >> $@
cat $(SRC)/glew_wgl_tail.c >> $@
$(BIN)/fix_OML_sync_control.sh $@
rm -f $@.bak
$(S.DEST)/glew_glx.c: $(EXT)/.dummy
cp -f $(SRC)/glew_glx_head.c $@
echo -e "#if !defined(__APPLE__) || defined(GLEW_APPLE_GLX)" >> $@
$(BIN)/make_def.pl GLX $(CORE)/GLX_VERSION* $(EXT)/GLX_* >> $@
echo -e "\n#endif /* !__APPLE__ */\n" >> $@
$(BIN)/make_def_fun.pl GLX $(CORE)/GLX_VERSION* >> $@
$(BIN)/make_def_fun.pl GLX $(EXT)/GLX_* >> $@
cat $(SRC)/glew_glx_fun.c >> $@
$(BIN)/make_def_var.pl GLX $(CORE)/GLX_VERSION* >> $@
$(BIN)/make_def_var.pl GLX $(EXT)/GLX_* >> $@
cat $(SRC)/glew_glx_var.c >> $@
$(BIN)/make_init.pl GLX $(CORE)/GLX_VERSION* >> $@
$(BIN)/make_init.pl GLX $(EXT)/GLX_* >> $@
cat $(SRC)/glew_glx_init.c >> $@

View File

@ -36,13 +36,3 @@ foreach my $ext (sort @extlist)
my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext);
output_decls($functions, \&make_pfn_decl);
}
print "\n";
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext);
my $extvar = $extname;
$extvar =~ s/GL(X*)_/GL$1EW_/;
print "GLboolean " . prefix_varname($extvar) . " = GL_FALSE;\n";
}

34
auto/bin/make_def_var.pl Executable file
View File

@ -0,0 +1,34 @@
#!/usr/bin/perl
##
## Copyright (C) 2004, 2003 Marcelo E. Magallon <mmagallo[at]debian org>
## Copyright (C) 2004, 2003 Milan Ikits <milan ikits[at]ieee org>
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
use strict;
use warnings;
do 'bin/make.pl';
my @extlist = ();
my %extensions = ();
our $type = shift;
if (@ARGV)
{
@extlist = @ARGV;
} else {
local $/;
@extlist = split "\n", (<>);
}
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext);
my $extvar = $extname;
$extvar =~ s/GL(X*)_/GL$1EW_/;
print "GLboolean " . prefix_varname($extvar) . " = GL_FALSE;\n";
}

6
auto/src/glew_gl_fun.c Normal file
View File

@ -0,0 +1,6 @@
#endif /* !WIN32 || !GLEW_MX */
#if !defined(GLEW_MX)
GLboolean __GLEW_VERSION_1_1 = GL_FALSE;

View File

@ -32,5 +32,3 @@
#include "glew_utils.h"
#if !defined(_WIN32) || !defined(GLEW_MX)
GLboolean __GLEW_VERSION_1_1 = GL_FALSE;

View File

@ -1,8 +1,6 @@
return GLEW_OK;
}
#endif /* _WIN32 */
/* ------------------------------------------------------------------------ */
const GLubyte* glewGetErrorString (GLenum error)
@ -55,8 +53,5 @@ GLenum glewInit ()
#endif /* _WIN32 */
}
#else
#endif

5
auto/src/glew_gl_var.c Normal file
View File

@ -0,0 +1,5 @@
#endif /* !GLEW_MX */
/* ------------------------------------------------------------------------- */

5
auto/src/glew_glx_fun.c Normal file
View File

@ -0,0 +1,5 @@
#if !defined(GLEW_MX)
GLboolean __GLXEW_VERSION_1_0 = GL_FALSE;
GLboolean __GLXEW_VERSION_1_1 = GL_FALSE;

View File

@ -31,6 +31,4 @@
#include "glew_utils.h"
GLboolean __GLXEW_VERSION_1_0 = GL_FALSE;
GLboolean __GLXEW_VERSION_1_1 = GL_FALSE;
#if !defined(__APPLE__) || defined(GLEW_APPLE_GLX)

View File

@ -1,6 +1,3 @@
#if !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */
GLboolean glxewGetExtension (const char* name)
{
GLubyte* p;

View File

@ -1,2 +1,4 @@
return GLEW_OK;
}
#endif /* !__APPLE__ || GLEW_APPLE_GLX */

5
auto/src/glew_glx_var.c Normal file
View File

@ -0,0 +1,5 @@
#endif /* !GLEW_MX */
/* ------------------------------------------------------------------------- */

View File

@ -1,4 +1,16 @@
}
return GL_FALSE;
}
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
else if(_glewStrSame2(&pos, &len, (const GLubyte*)"GLX_", 4))
#if defined(GLEW_MX)
GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name)
#else
GLboolean glxewIsSupported (const char* name)
#endif
{
GLubyte* pos = (GLubyte*)name;
GLuint len = _glewStrLen(pos);
if(_glewStrSame2(&pos, &len, (const GLubyte*)"GLX_", 4))
{

View File

@ -1,4 +1,5 @@
}
#endif /* */
return GL_FALSE;
}
#endif /* _WIN32 */

View File

@ -1,4 +1,16 @@
}
return GL_FALSE;
}
#if defined(_WIN32)
else if(_glewStrSame2(&pos, &len, (const GLubyte*)"WGL_", 4))
#if defined(GLEW_MX)
GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name)
#else
GLboolean wglewIsSupported (const char* name)
#endif
{
GLubyte* pos = (GLubyte*)name;
GLuint len = _glewStrLen(pos);
if(_glewStrSame2(&pos, &len, (const GLubyte*)"WGL_", 4))
{

5
auto/src/glew_wgl_var.c Normal file
View File

@ -0,0 +1,5 @@
#endif /* !GLEW_MX */
/* ------------------------------------------------------------------------- */

View File

@ -4,6 +4,10 @@
typedef struct GLXEWContextStruct GLXEWContext;
extern GLenum glxewContextInit (GLXEWContext* ctx);
extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name);
#define glxewInit() glxewContextInit(glxewGetContext())
#define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x)
#define GLXEW_GET_VAR(x) glxewGetContext()->x
#define GLXEW_GET_FUN(x) x
@ -13,6 +17,8 @@ extern GLenum glxewContextInit (GLXEWContext* ctx);
#define GLXEW_GET_VAR(x) x
#define GLXEW_GET_FUN(x) x
extern GLboolean glxewIsSupported (const char* name);
#endif /* GLEW_MX */
extern GLboolean glxewGetExtension (const char* name);

View File

@ -4,6 +4,10 @@
typedef struct WGLEWContextStruct WGLEWContext;
GLEWAPI GLenum wglewContextInit (WGLEWContext* ctx);
GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name);
#define wglewInit() wglewContextInit(wglewGetContext())
#define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x)
#define WGLEW_GET_VAR(x) wglewGetContext()->x
#define WGLEW_GET_FUN(x) wglewGetContext()->x
@ -13,6 +17,8 @@ GLEWAPI GLenum wglewContextInit (WGLEWContext* ctx);
#define WGLEW_GET_VAR(x) x
#define WGLEW_GET_FUN(x) x
GLEWAPI GLboolean wglewIsSupported (const char* name);
#endif /* GLEW_MX */
GLEWAPI GLboolean wglewGetExtension (const char* name);

View File

@ -8,6 +8,13 @@ default:
"glewinfo - Win32 Release" \
"visualinfo - Win32 Release" /build
mx:
$(MSDEV) glew.dsw /make \
"glew_static - Win32 Release MX" \
"glew_shared - Win32 Release MX" \
"glewinfo - Win32 Release MX" \
"visualinfo - Win32 Release MX" /build
debug:
$(MSDEV) glew.dsw /make \
"glew_static - Win32 Debug" \
@ -15,6 +22,7 @@ debug:
"glewinfo - Win32 Debug" \
"visualinfo - Win32 Debug" /build
clean:
$(MSDEV) glew.dsw /make all /clean
$(RM) static shared *.plg *.ncb *.opt

View File

@ -153,7 +153,19 @@ LINK32=link.exe
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\..\src\glew.c
SOURCE=..\..\src\glew_gl.c
# End Source File
# Begin Source File
SOURCE=..\..\src\glew_wgl.c
# End Source File
# Begin Source File
SOURCE=..\..\src\glew_str.c
# End Source File
# Begin Source File
SOURCE=..\..\src\glew_utils.c
# End Source File
# End Group
# Begin Group "Header Files"
@ -167,6 +179,10 @@ SOURCE=..\..\include\GL\glew.h
SOURCE=..\..\include\GL\wglew.h
# End Source File
# Begin Source File
SOURCE=..\..\src\glew_utils.h
# End Source File
# End Group
# End Target
# End Project

View File

@ -135,7 +135,19 @@ LIB32=link.exe -lib
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\..\src\glew.c
SOURCE=..\..\src\glew_gl.c
# End Source File
# Begin Source File
SOURCE=..\..\src\glew_wgl.c
# End Source File
# Begin Source File
SOURCE=..\..\src\glew_str.c
# End Source File
# Begin Source File
SOURCE=..\..\src\glew_utils.c
# End Source File
# End Group
# Begin Group "Header Files"
@ -149,6 +161,10 @@ SOURCE=..\..\include\GL\glew.h
SOURCE=..\..\include\GL\wglew.h
# End Source File
# Begin Source File
SOURCE=..\..\src\glew_utils.h
# End Source File
# End Group
# End Target
# End Project