egl: drop unused _EGLDriver from WaitClient()
[mesa.git] / bin / update-android-headers.sh
1 #!/bin/sh
2
3 set -eu
4
5 if [ ! -e .git ]; then
6 echo must run from top-level directory;
7 exit 1
8 fi
9
10 if [ ! -d platform-hardware-libhardware ]; then
11 git clone --depth 1 https://android.googlesource.com/platform/hardware/libhardware platform-hardware-libhardware
12 git clone --depth 1 https://android.googlesource.com/platform/system/core platform-system-core
13 git clone --depth 1 https://android.googlesource.com/platform/frameworks/native platform-frameworks-native
14 fi
15
16 dest=include/android_stub
17
18 rm -rf ${dest}
19 mkdir ${dest}
20
21
22 # These directories contains mostly only the files we need, so copy wholesale
23
24 cp -av platform-frameworks-native/libs/nativewindow/include/vndk \
25 platform-system-core/libsync/include/sync \
26 platform-system-core/libsync/include/ndk \
27 platform-system-core/libbacktrace/include/backtrace \
28 platform-system-core/libsystem/include/system \
29 platform-system-core/liblog/include/log \
30 platform-frameworks-native/libs/nativewindow/include/system \
31 platform-frameworks-native/libs/nativebase/include/nativebase \
32 ${dest}
33
34
35 # We only need a few files from these big directories so just copy those
36
37 mkdir ${dest}/hardware
38 cp -av platform-hardware-libhardware/include/hardware/{hardware,gralloc,fb}.h ${dest}/hardware
39 cp -av platform-frameworks-native/vulkan/include/hardware/hwvulkan.h ${dest}/hardware
40
41 mkdir ${dest}/cutils
42 cp -av platform-system-core/libcutils/include/cutils/{log,native_handle,properties}.h ${dest}/cutils
43
44
45 # include/android has files from a few different projects
46
47 mkdir ${dest}/android
48 cp -av platform-frameworks-native/libs/nativewindow/include/android/* \
49 platform-frameworks-native/libs/arect/include/android/* \
50 platform-system-core/liblog/include/android/* \
51 platform-system-core/libsync/include/android/* \
52 ${dest}/android
53