1#!/usr/bin/env perl
2##
3## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
4## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
5## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
6##
7## This program is distributed under the terms and conditions of the GNU
8## General Public License Version 2 as published by the Free Software
9## Foundation or, at your option, any later version.
10
11use strict;
12use warnings;
13
14use lib '.';
15do 'bin/make.pl';
16
17## Output declarations for the _glewInit_[extension] functions defined
18## by make_init.pl script.  These are necessary for for initializers to
19## call each other, such as a core GL 3 context that depends on certain
20## extensions.
21
22#-------------------------------------------------------------------------------
23
24my @extlist = ();
25my %extensions = ();
26
27our $type = shift;
28
29if (@ARGV)
30{
31    @extlist = @ARGV;
32
33	foreach my $ext (sort @extlist)
34	{
35		my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) =
36			parse_ext($ext);
37
38		#print "#ifdef $extname\n\n";
39		if (keys %$functions)
40		{
41			print "static GLboolean _glewInit_$extname ();\n";
42		}
43		#print "#endif /* $extname */\n\n";
44	}
45}
46