blob: e2331f5da22da0e5b63877e2aa57c79b44b5efdd [file] [log] [blame]
Steven Moreland4e846442016-12-12 09:44:30 -08001#!/bin/bash
2
3if [ ! -d hardware/interfaces ] ; then
4 echo "Where is hardware/interfaces?";
5 exit 1;
6fi
7
8if [ ! -d system/libhidl/transport ] ; then
9 echo "Where is system/libhidl/transport?";
10 exit 1;
11fi
12
13echo "WARNING: This script changes files in many places."
14
15# These files only exist to facilitate the easy transition to hidl.
16
17options="-Lexport-header \
18 -randroid.hardware:hardware/interfaces \
19 -randroid.hidl:system/libhidl/transport"
20
21# hardware/libhardware
22hidl-gen $options \
23 -o hardware/libhardware/include/hardware/sensors-base.h \
24 android.hardware.sensors@1.0
25hidl-gen $options \
26 -o hardware/libhardware/include/hardware/nfc-base.h \
27 android.hardware.nfc@1.0
28
29# system/core
30hidl-gen $options \
31 -o system/core/include/system/graphics-base.h \
32 android.hardware.graphics.common@1.0
33
34# system/media
35hidl-gen $options \
36 -o system/media/audio/include/system/audio-base.h \
37 android.hardware.audio.common@2.0
38hidl-gen $options \
39 -o system/media/audio/include/system/audio_effect-base.h \
40 android.hardware.audio.effect@2.0