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