blob: f92c9abd339eea4582370a8cfc4daea9325a7cdc [file] [log] [blame]
Mathias Agopianb519abb2009-04-23 18:05:44 -07001#! /bin/sh
2#
3# Copyright (C) 2008 Google Inc.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
Jesse Hall2b6694f2013-02-04 16:15:39 -080017# Force a specific locale for sorting to avoid irrelevant differences
18# in the generated files that could hide real differences.
19export LC_ALL=POSIX
20
Mathias Agopian618fa102009-10-14 02:06:37 -070021./glapigen ../../include/GLES/gl.h > ../GLES_CM/gl_api.in
22./glapigen ../../include/GLES/glext.h > ../GLES_CM/glext_api.in
23./glapigen ../../include/GLES2/gl2.h > ../GLES2/gl2_api.in
24./glapigen ../../include/GLES2/gl2ext.h > ../GLES2/gl2ext_api.in
Jesse Hall47743382013-02-08 11:13:46 -080025./glapigen ../../include/GLES3/gl3.h > ../GLES2/gl3_api.in
26./glapigen ../../include/GLES3/gl3ext.h > ../GLES2/gl3ext_api.in
Mathias Agopianb1a39d62009-05-27 20:38:06 -070027
Mathias Agopian618fa102009-10-14 02:06:37 -070028./glentrygen ../../include/GLES/gl.h > /tmp/gl_entries.in
29./glentrygen ../../include/GLES/glext.h > /tmp/glext_entries.in
30./glentrygen ../../include/GLES2/gl2.h > /tmp/gl2_entries.in
31./glentrygen ../../include/GLES2/gl2ext.h > /tmp/gl2ext_entries.in
Jesse Hall47743382013-02-08 11:13:46 -080032./glentrygen ../../include/GLES3/gl3.h > /tmp/gl3_entries.in
33./glentrygen ../../include/GLES3/gl3ext.h > /tmp/gl3ext_entries.in
Mathias Agopianb1a39d62009-05-27 20:38:06 -070034
Jesse Hall2b6694f2013-02-04 16:15:39 -080035# The awk command removes lines with the same function name as an earlier
36# line, even if the rest of the line differs. Although signatures of
Jesse Hall47743382013-02-08 11:13:46 -080037# functions with the same name should be the same, the different versions
38# have some irrelevant whitespace and parameter name differences.
Mathias Agopian618fa102009-10-14 02:06:37 -070039cat /tmp/gl_entries.in \
40 /tmp/glext_entries.in \
41 /tmp/gl2_entries.in \
42 /tmp/gl2ext_entries.in \
Jesse Hall47743382013-02-08 11:13:46 -080043 /tmp/gl3_entries.in \
44 /tmp/gl3ext_entries.in \
Mathias Agopian618fa102009-10-14 02:06:37 -070045 | sort -t, -k2 \
46 | awk -F, '!_[$2]++' \
47 > ../entries.in
Jack Palevicha2dd6cf2010-10-26 15:21:24 -070048
49./gltracegen ../entries.in >../trace.in
50
51cat ../../include/GLES/gl.h \
52 ../../include/GLES/glext.h \
53 ../../include/GLES2/gl2.h \
54 ../../include/GLES2/gl2ext.h \
Jesse Hall47743382013-02-08 11:13:46 -080055 ../../include/GLES3/gl3.h \
56 ../../include/GLES3/gl3ext.h \
Jack Palevicha2dd6cf2010-10-26 15:21:24 -070057 | ./glenumsgen \
58 | sort \
59 > ../enums.in
60