*** empty log message ***

git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@238 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
ikits 2004-02-19 17:53:59 +00:00
parent 055a3884a7
commit 289f546734
4 changed files with 87 additions and 67 deletions

View File

@ -61,7 +61,11 @@ $(I.DEST)/glew.h: $(EXT)/.dummy
cp -f $(SRC)/glew_pre.h $@ cp -f $(SRC)/glew_pre.h $@
$(BIN)/make_header.pl GLAPIENTRY GL $(CORE)/GL_VERSION* >> $@ $(BIN)/make_header.pl GLAPIENTRY GL $(CORE)/GL_VERSION* >> $@
$(BIN)/make_header.pl GLAPIENTRY GL $(EXT)/GL_* >> $@ $(BIN)/make_header.pl GLAPIENTRY GL $(EXT)/GL_* >> $@
$(BIN)/make_struct.pl GL $(CORE)/GL_VERSION* $(EXT)/GL_* >> $@ echo -e "/* ------------------------------------------------------------------------- */\n\n#ifdef GLEW_MX\n#define GLEW_EXPORT\n#else\n#define GLEW_EXPORT GLEWAPI\n#endif /* GLEW_MX */\n\n#if defined(GLEW_MX) && defined(_WIN32)\nstruct GLEWContextStruct\n{\n#endif /* GLEW_MX */" >> $@
$(BIN)/make_struct_fun.pl GLEW_EXPORT $(CORE)/GL_VERSION* $(EXT)/GL_* >> $@
echo -e "\n#if defined(GLEW_MX) && !defined(_WIN32)\nstruct GLEWContextStruct\n{\n#endif /* GLEW_MX */\n" >> $@
$(BIN)/make_struct_var.pl GLEW_EXPORT $(CORE)/GL_VERSION* $(EXT)/GL_* >> $@
echo -e "\n#ifdef GLEW_MX\n}; /* GLEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@
perl -e 's/GLEW_EXPORT GLboolean __GLEW_VERSION_1_2;/GLEW_EXPORT GLboolean __GLEW_VERSION_1_1;\nGLEW_EXPORT GLboolean __GLEW_VERSION_1_2;/' -pi.bak $@ perl -e 's/GLEW_EXPORT GLboolean __GLEW_VERSION_1_2;/GLEW_EXPORT GLboolean __GLEW_VERSION_1_1;\nGLEW_EXPORT GLboolean __GLEW_VERSION_1_2;/' -pi.bak $@
rm -f $@.bak rm -f $@.bak
cat $(SRC)/glew_post.h >> $@ cat $(SRC)/glew_post.h >> $@
@ -69,14 +73,21 @@ $(I.DEST)/glew.h: $(EXT)/.dummy
$(I.DEST)/wglew.h: $(EXT)/.dummy $(I.DEST)/wglew.h: $(EXT)/.dummy
cp -f $(SRC)/wglew_pre.h $@ cp -f $(SRC)/wglew_pre.h $@
$(BIN)/make_header.pl WINAPI WGL $(EXT)/WGL_* >> $@ $(BIN)/make_header.pl WINAPI WGL $(EXT)/WGL_* >> $@
$(BIN)/make_struct.pl WGL $(EXT)/WGL_* >> $@ echo -e "/* ------------------------------------------------------------------------- */\n\n#ifdef GLEW_MX\n#define WGLEW_EXPORT\n#else\n#define WGLEW_EXPORT GLEWAPI\n#endif /* GLEW_MX */\n\n#ifdef GLEW_MX\nstruct WGLEWContextStruct\n{\n#endif /* GLEW_MX */" >> $@
$(BIN)/make_struct_fun.pl WGLEW_EXPORT $(EXT)/WGL_* >> $@
$(BIN)/make_struct_var.pl WGLEW_EXPORT $(EXT)/WGL_* >> $@
echo -e "\n#ifdef GLEW_MX\n}; /* WGLEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@
cat $(SRC)/wglew_post.h >> $@ cat $(SRC)/wglew_post.h >> $@
$(I.DEST)/glxew.h: $(EXT)/.dummy $(I.DEST)/glxew.h: $(EXT)/.dummy
cp -f $(SRC)/glxew_pre.h $@ cp -f $(SRC)/glxew_pre.h $@
$(BIN)/make_header.pl '' GLX $(CORE)/GLX_VERSION* >> $@ $(BIN)/make_header.pl '' GLX $(CORE)/GLX_VERSION* >> $@
$(BIN)/make_header.pl '' GLX $(EXT)/GLX_* >> $@ $(BIN)/make_header.pl '' GLX $(EXT)/GLX_* >> $@
$(BIN)/make_struct.pl GLX $(CORE)/GLX_VERSION* $(EXT)/GLX_* >> $@ echo -e "/* ------------------------------------------------------------------------- */\n\n#ifdef GLEW_MX\n#define GLXEW_EXPORT\n#else\n#define GLXEW_EXPORT extern\n#endif /* GLEW_MX */" >> $@
$(BIN)/make_struct_fun.pl GLXEW_EXPORT $(CORE)/GLX_VERSION* $(EXT)/GLX_* >> $@
echo -e "\n#if defined(GLEW_MX)\nstruct GLXEWContextStruct\n{\n#endif /* GLEW_MX */\n" >> $@
$(BIN)/make_struct_var.pl GLXEW_EXPORT $(CORE)/GLX_VERSION* $(EXT)/GLX_* >> $@
echo -e "\n#ifdef GLEW_MX\n}; /* GLXEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@
perl -e 's/GLEW_EXPORT GLboolean __GLXEW_VERSION_1_2;/GLEW_EXPORT GLboolean __GLXEW_VERSION_1_0;\nGLEW_EXPORT GLboolean __GLXEW_VERSION_1_1;\nGLEW_EXPORT GLboolean __GLXEW_VERSION_1_2;/' -pi.bak $@ perl -e 's/GLEW_EXPORT GLboolean __GLXEW_VERSION_1_2;/GLEW_EXPORT GLboolean __GLXEW_VERSION_1_0;\nGLEW_EXPORT GLboolean __GLXEW_VERSION_1_1;\nGLEW_EXPORT GLboolean __GLXEW_VERSION_1_2;/' -pi.bak $@
cat $(SRC)/glxew_post.h >> $@ cat $(SRC)/glxew_post.h >> $@
$(BIN)/fix_OML_sync_control.sh $@ $(BIN)/fix_OML_sync_control.sh $@

View File

@ -1,64 +0,0 @@
#!/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';
# function pointer declaration
sub make_pfn_decl($%)
{
return "GLEW_EXPORT PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . ";";
}
my @extlist = ();
my %extensions = ();
our $type = shift;
if (@ARGV)
{
@extlist = @ARGV;
} else {
local $/;
@extlist = split "\n", (<>);
}
print "/* ------------------------------------------------------------------------- */\n\n";
print "#ifdef GLEW_MX\n";
print "#define GLEW_EXPORT\n";
print "#else\n";
print "#define GLEW_EXPORT GLEWAPI\n";
print "#endif /* GLEW_MX */\n\n";
print "#if defined(GLEW_MX) && defined(_WIN32)\n";
print "struct " . $type . "EWContextStruct\n{\n";
print "#endif /* GLEW_MX */\n";
foreach my $ext (sort @extlist)
{
my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext);
output_decls($functions, \&make_pfn_decl);
}
print "\n#if defined(GLEW_MX) && !defined(_WIN32)\n";
print "struct " . $type . "EWContextStruct\n{\n";
print "#endif /* GLEW_MX */\n\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 "GLEW_EXPORT GLboolean " . prefix_varname($extvar) . ";\n";
}
print "\n#ifdef GLEW_MX\n";
print "}; /* " . $type . "EWContextStruct */\n";
print "#endif /* GLEW_MX */\n\n";

39
auto/bin/make_struct_fun.pl Executable file
View File

@ -0,0 +1,39 @@
#!/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';
# function pointer declaration
sub make_pfn_decl($%)
{
our $export;
return $export . " PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . ";";
}
my @extlist = ();
my %extensions = ();
our $export = 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);
output_decls($functions, \&make_pfn_decl);
}

34
auto/bin/make_struct_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 $export = 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 $export . " GLboolean " . prefix_varname($extvar) . ";\n";
}