blob: 1c498612afadeb747ab1fd25af41819f5e634140 [file] [log] [blame]
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08001#!/bin/sh
2rm -rf out generated
3
4mkdir out
5mkdir -p out/javax/microedition/khronos/opengles
6mkdir -p out/com/google/android/gles_jni
7mkdir -p out/android/graphics
8
9echo "package android.graphics;" > out/android/graphics/Canvas.java
10echo "public interface Canvas {}" >> out/android/graphics/Canvas.java
11
12GLFILE=out/javax/microedition/khronos/opengles/GL.java
13cp stubs/GLHeader.java-if $GLFILE
14
15GLGEN_FILES="CFunc.java CType.java CodeEmitter.java GenerateGL.java JFunc.java JType.java JniCodeEmitter.java ParameterChecker.java"
16
17pushd src > /dev/null
18javac ${GLGEN_FILES}
19popd > /dev/null
20java -classpath src GenerateGL -c glspec-1.0 glspec-1.0ext glspec-1.1 glspec-1.1ext glspec-1.1extpack glspec-checks
21
22pushd out > /dev/null
23mkdir classes
24javac -d classes com/google/android/gles_jni/GLImpl.java javax/microedition/khronos/opengles/GL10.java javax/microedition/khronos/opengles/GL10Ext.java javax/microedition/khronos/opengles/GL11.java javax/microedition/khronos/opengles/GL11Ext.java javax/microedition/khronos/opengles/GL11ExtensionPack.java
25popd > /dev/null
26
27rm -rf generated
28mkdir -p generated/C
29cp out/com_google_android_gles_jni_GLImpl.cpp generated/C
30cp -r out/com generated
31cp -r out/javax generated
32
33rm -rf out
34
35# com_google_android_gles_jni_GLImpl.cpp
36if cmp ../../../frameworks/base/core/jni/com_google_android_gles_jni_GLImpl.cpp generated/C/com_google_android_gles_jni_GLImpl.cpp ; then
37echo com_google_android_gles_jni_GLImpl.cpp unchanged
38else
39echo Please edit ../../../frameworks/base/core/jni/com_google_android_gles_jni_GLImpl.cpp
40echo Please cp generated/C/com_google_android_gles_jni_GLImpl.cpp ../../../frameworks/base/core/jni
41fi
42
43# GLImpl.java
44if cmp ../../java/com/google/android/gles_jni/GLImpl.java generated/com/google/android/gles_jni/GLImpl.java ; then
45echo GLImpl.java unchanged
46else
47echo Please edit ../../java/com/google/android/gles_jni/GLImpl.java
48echo Please cp generated/com/google/android/gles_jni/GLImpl.java ../../java/com/google/android/gles_jni
49fi
50
51# GL.java
52if cmp ../../java/javax/microedition/khronos/opengles/GL.java generated/javax/microedition/khronos/opengles/GL.java ; then
53echo GL.java unchanged
54else
55echo Please edit ../../java/javax/microedition/khronos/opengles/GL.java
56echo Please cp generated/javax/microedition/khronos/opengles/GL.java ../../java/javax/microedition/khronos/opengles/GL.java
57fi
58
59# GL10.java
60if cmp ../../java/javax/microedition/khronos/opengles/GL10.java generated/javax/microedition/khronos/opengles/GL10.java ; then
61echo GL10.java unchanged
62else
63echo Please edit ../../java/javax/microedition/khronos/opengles/GL10.java
64echo Please cp generated/javax/microedition/khronos/opengles/GL10.java ../../java/javax/microedition/khronos/opengles/GL10.java
65fi
66
67# GL10Ext.java
68if cmp ../../java/javax/microedition/khronos/opengles/GL10Ext.java generated/javax/microedition/khronos/opengles/GL10Ext.java ; then
69echo GL10Ext.java unchanged
70else
71echo Please edit ../../java/javax/microedition/khronos/opengles/GL10Ext.java
72echo Please cp generated/javax/microedition/khronos/opengles/GL10Ext.java ../../java/javax/microedition/khronos/opengles/GL10Ext.java
73fi
74
75# GL11.java
76if cmp ../../java/javax/microedition/khronos/opengles/GL11.java generated/javax/microedition/khronos/opengles/GL11.java ; then
77echo GL11.java unchanged
78else
79echo Please edit ../../java/javax/microedition/khronos/opengles/GL11.java
80echo Please cp generated/javax/microedition/khronos/opengles/GL11.java ../../java/javax/microedition/khronos/opengles/GL11.java
81fi
82
83# GL11Ext.java
84if cmp ../../java/javax/microedition/khronos/opengles/GL11Ext.java generated/javax/microedition/khronos/opengles/GL11Ext.java ; then
85echo GL11Ext.java unchanged
86else
87echo Please edit ../../java/javax/microedition/khronos/opengles/GL11Ext.java
88echo Please cp generated/javax/microedition/khronos/opengles/GL11Ext.java ../../java/javax/microedition/khronos/opengles/GL11Ext.java
89fi
90
91# GL11ExtensionPack.java
92if cmp ../../java/javax/microedition/khronos/opengles/GL11ExtensionPack.java generated/javax/microedition/khronos/opengles/GL11ExtensionPack.java ; then
93echo GL11ExtensionPack.java unchanged
94else
95echo Please edit ../../java/javax/microedition/khronos/opengles/GL11ExtensionPack.java
96echo Please cp generated/javax/microedition/khronos/opengles/GL11ExtensionPack.java ../../java/javax/microedition/khronos/opengles/GL11ExtensionPack.java
97fi
98
99rm -rf generated