Convert to Android.bp

See build/soong/README.md for more information

Test: mmma hardware/libhardware
Change-Id: Ibb7e2af9d55f581e951d8996cea5e52cd0766b04
This commit is contained in:
Dan Willemsen 2017-12-18 21:10:37 -08:00
parent 1d83294190
commit 86e247ae89
46 changed files with 788 additions and 830 deletions

View file

@ -6,13 +6,13 @@ cc_library_headers {
"libaudio_system_headers",
"libsystem_headers",
"libcutils_headers",
"libbluetooth-types-header",
"libbluetooth-types-header",
],
export_header_lib_headers: [
"libaudio_system_headers",
"libsystem_headers",
"libcutils_headers",
"libbluetooth-types-header",
"libbluetooth-types-header",
],
export_include_dirs: ["include"],
@ -44,8 +44,3 @@ cc_library_shared {
support_system_process: true,
},
}
subdirs = [
"modules/*",
"tests/*",
]

View file

@ -1,3 +1,3 @@
# Copyright 2006 The Android Open Source Project
include $(call all-named-subdir-makefiles,modules tests)
include $(call all-named-subdir-makefiles,modules)

View file

@ -1,14 +1,5 @@
hardware_modules := \
audio_remote_submix \
camera \
gralloc \
hwcomposer \
input \
radio \
sensors \
thermal \
usbaudio \
usbcamera \
vehicle \
vr
sensors
include $(call all-named-subdir-makefiles,$(hardware_modules))

View file

@ -0,0 +1,34 @@
// Copyright (C) 2012 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "audio.r_submix.default",
relative_install_path: "hw",
vendor: true,
srcs: ["audio_hw.cpp"],
include_dirs: [
"system/media/audio_utils/include",
],
shared_libs: [
"liblog",
"libcutils",
"libutils",
"libnbaio_mono",
],
static_libs: ["libmedia_helper"],
cflags: ["-Wno-unused-parameter"],
header_libs: ["libhardware_headers"],
}

View file

@ -1,35 +0,0 @@
# Copyright (C) 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := audio.r_submix.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_PROPRIETARY_MODULE := true
LOCAL_SRC_FILES := \
audio_hw.cpp
LOCAL_C_INCLUDES += \
frameworks/av/include/ \
frameworks/native/include/ \
$(call include-path-for, audio-utils)
LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libnbaio_mono
LOCAL_STATIC_LIBRARIES := libmedia_helper
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_HEADER_LIBRARIES += libhardware_headers
include $(BUILD_SHARED_LIBRARY)

View file

@ -0,0 +1,47 @@
// Copyright (C) 2012 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "camera.default",
relative_install_path: "hw",
include_dirs: [
"system/core/include",
"system/media/camera/include",
],
srcs: [
"CameraHAL.cpp",
"Camera.cpp",
"ExampleCamera.cpp",
"Metadata.cpp",
"Stream.cpp",
"VendorTags.cpp",
],
shared_libs: [
"libcamera_metadata",
"libcutils",
"liblog",
"libsync",
"libutils",
],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
"-fvisibility=hidden",
],
}

View file

@ -1,45 +0,0 @@
# Copyright (C) 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := camera.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_C_INCLUDES += \
system/core/include \
system/media/camera/include \
LOCAL_SRC_FILES := \
CameraHAL.cpp \
Camera.cpp \
ExampleCamera.cpp \
Metadata.cpp \
Stream.cpp \
VendorTags.cpp \
LOCAL_SHARED_LIBRARIES := \
libcamera_metadata \
libcutils \
liblog \
libsync \
libutils \
LOCAL_CFLAGS += -Wall -Wextra -Werror -fvisibility=hidden
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

View file

@ -0,0 +1,32 @@
// Copyright (C) 2008 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// HAL module implemenation stored in
// hw/<OVERLAY_HARDWARE_MODULE_ID>.<ro.product.board>.so
cc_library_shared {
name: "hwcomposer.default",
relative_install_path: "hw",
vendor: true,
shared_libs: [
"liblog",
"libEGL",
],
srcs: ["hwcomposer.cpp"],
header_libs: ["libhardware_headers"],
cflags: [
"-DLOG_TAG=\"hwcomposer\"",
"-Wall",
"-Werror",
],
}

View file

@ -1,31 +0,0 @@
# Copyright (C) 2008 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
# HAL module implemenation stored in
# hw/<OVERLAY_HARDWARE_MODULE_ID>.<ro.product.board>.so
include $(CLEAR_VARS)
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_PROPRIETARY_MODULE := true
LOCAL_SHARED_LIBRARIES := liblog libEGL
LOCAL_SRC_FILES := hwcomposer.cpp
LOCAL_HEADER_LIBRARIES := libhardware_headers
LOCAL_MODULE := hwcomposer.default
LOCAL_CFLAGS:= -DLOG_TAG=\"hwcomposer\"
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS += -Wall -Werror
include $(BUILD_SHARED_LIBRARY)

View file

@ -1,19 +0,0 @@
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(call all-makefiles-under,$(LOCAL_PATH))

View file

@ -0,0 +1,60 @@
// Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Evdev module implementation
cc_library_shared {
name: "libinput_evdev",
srcs: [
"BitUtils.cpp",
"InputHub.cpp",
"InputDevice.cpp",
"InputDeviceManager.cpp",
"InputHost.cpp",
"InputMapper.cpp",
"MouseInputMapper.cpp",
"SwitchInputMapper.cpp",
],
shared_libs: [
"libhardware_legacy",
"liblog",
"libutils",
],
export_include_dirs: ["."],
cppflags: [
"-Wno-unused-parameter",
],
}
// HAL module
cc_library_shared {
name: "input.evdev.default",
relative_install_path: "hw",
srcs: ["EvdevModule.cpp"],
shared_libs: [
"libinput_evdev",
"liblog",
],
cppflags: [
"-Wall",
"-Werror",
"-Wno-unused-parameter",
],
}

View file

@ -1,61 +0,0 @@
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
# Evdev module implementation
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
BitUtils.cpp \
InputHub.cpp \
InputDevice.cpp \
InputDeviceManager.cpp \
InputHost.cpp \
InputMapper.cpp \
MouseInputMapper.cpp \
SwitchInputMapper.cpp
LOCAL_SHARED_LIBRARIES := \
libhardware_legacy \
liblog \
libutils
LOCAL_CLANG := true
LOCAL_CPPFLAGS += -Wno-unused-parameter
LOCAL_MODULE := libinput_evdev
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
# HAL module
include $(CLEAR_VARS)
LOCAL_MODULE := input.evdev.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SRC_FILES := \
EvdevModule.cpp
LOCAL_SHARED_LIBRARIES := \
libinput_evdev \
liblog
LOCAL_CLANG := true
LOCAL_CPPFLAGS += -Wall -Werror -Wno-unused-parameter
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

View file

@ -3,7 +3,7 @@ cc_library_static {
vendor: true,
srcs: [
"multihal.cpp",
"SensorEventQueue.cpp"
"SensorEventQueue.cpp",
],
header_libs: [
"libhardware_headers",
@ -12,8 +12,28 @@ cc_library_static {
"liblog",
"libcutils",
"libutils",
"libdl"
"libdl",
],
export_include_dirs: ["."],
cflags: ["-Wall", "-Werror"],
cflags: [
"-Wall",
"-Werror",
],
}
cc_test_host {
name: "sensorstests",
gtest: false,
srcs: [
"SensorEventQueue.cpp",
"tests/SensorEventQueue_test.cpp",
],
static_libs: [
"libcutils",
"libutils",
],
cflags: [
"-Wall",
"-Werror",
],
}

View file

@ -45,5 +45,3 @@ LOCAL_STRIP_MODULE := false
include $(BUILD_SHARED_LIBRARY)
endif # USE_SENSOR_MULTI_HAL
include $(call all-makefiles-under, $(LOCAL_PATH))

View file

@ -0,0 +1,134 @@
// Copyright (C) 2017 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_defaults {
name: "dynamic_sensor_defaults",
// intended to be integrated into hal, thus vendor
vendor: true,
cflags: [
"-Wall",
"-Werror",
"-Wextra",
],
export_include_dirs: ["."],
shared_libs: [
"libhidparser",
],
target: {
android: {
srcs: [
"BaseDynamicSensorDaemon.cpp",
"BaseSensorObject.cpp",
"ConnectionDetector.cpp",
"DummyDynamicAccelDaemon.cpp",
"DynamicSensorManager.cpp",
"HidRawDevice.cpp",
"HidRawSensor.cpp",
"HidRawSensorDaemon.cpp",
"HidRawSensorDevice.cpp",
"RingBuffer.cpp",
],
shared_libs: [
"libbase",
"libcutils",
"liblog",
"libutils",
],
header_libs: [
"libhardware_headers",
"libstagefright_foundation_headers",
],
},
host: {
local_include_dirs: [
"test",
"HidUtils/test",
],
},
// host test is targeting linux host only
darwin: {
enabled: false,
},
},
}
//
// There are two ways to utilize the dynamic sensor module:
// 1. Use as an extension in an existing hal: declare dependency on libdynamic_sensor_ext shared
// library in existing sensor hal.
// 2. Use as a standalone sensor HAL and configure multihal to combine it with sensor hal that
// hosts other sensors: add dependency on sensors.dynamic_sensor_hal in device level makefile and
// write multihal configuration file accordingly.
//
// Please take only one of these two options to avoid conflict over hardware resource.
//
//
// Option 1: sensor extension module
//
cc_library_shared {
name: "libdynamic_sensor_ext",
defaults: ["dynamic_sensor_defaults"],
cflags: ["-DLOG_TAG=\"DynamicSensorExt\""],
}
//
// Option 2: independent sensor hal
//
cc_library_shared {
name: "sensors.dynamic_sensor_hal",
defaults: ["dynamic_sensor_defaults"],
relative_install_path: "hw",
cflags: ["-DLOG_TAG=\"DynamicSensorHal\""],
srcs: ["sensors.cpp"],
}
//
// Host test for HidRawSensor. Test with dummy test HID descriptors.
//
cc_binary_host {
name: "hidrawsensor_host_test",
defaults: ["dynamic_sensor_defaults"],
srcs: [
"HidRawSensor.cpp",
"BaseSensorObject.cpp",
"HidUtils/test/TestHidDescriptor.cpp",
"test/HidRawSensorTest.cpp",
],
}
//
// Host test for HidRawDevice and HidRawSensor. Test with hidraw
// device node.
//
cc_binary_host {
name: "hidrawdevice_host_test",
defaults: ["dynamic_sensor_defaults"],
srcs: [
"HidRawDevice.cpp",
"HidRawSensor.cpp",
"BaseSensorObject.cpp",
"test/HidRawDeviceTest.cpp",
],
}

View file

@ -1,138 +0,0 @@
# Copyright (C) 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
COMMON_CFLAGS := -Wall -Werror -Wextra
dynamic_sensor_src := \
BaseDynamicSensorDaemon.cpp \
BaseSensorObject.cpp \
ConnectionDetector.cpp \
DummyDynamicAccelDaemon.cpp \
DynamicSensorManager.cpp \
HidRawDevice.cpp \
HidRawSensor.cpp \
HidRawSensorDaemon.cpp \
HidRawSensorDevice.cpp \
RingBuffer.cpp
dynamic_sensor_shared_lib := \
libbase \
libcutils \
libhidparser \
liblog \
libutils
#
# There are two ways to utilize the dynamic sensor module:
# 1. Use as an extension in an existing hal: declare dependency on libdynamic_sensor_ext shared
# library in existing sensor hal.
# 2. Use as a standalone sensor HAL and configure multihal to combine it with sensor hal that
# hosts other sensors: add dependency on sensors.dynamic_sensor_hal in device level makefile and
# write multihal configuration file accordingly.
#
# Please take only one of these two options to avoid conflict over hardware resource.
#
#
# Option 1: sensor extension module
#
include $(CLEAR_VARS)
LOCAL_MODULE := libdynamic_sensor_ext
LOCAL_MODULE_TAGS := optional
# intended to be integrated into hal, thus proprietary
LOCAL_PROPRIETARY_MODULE := true
LOCAL_CFLAGS += $(COMMON_CFLAGS) -DLOG_TAG=\"DynamicSensorExt\"
LOCAL_SRC_FILES := $(dynamic_sensor_src)
LOCAL_HEADER_LIBRARIES := \
libhardware_headers \
libstagefright_foundation_headers \
LOCAL_SHARED_LIBRARIES := $(dynamic_sensor_shared_lib)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
include $(BUILD_SHARED_LIBRARY)
#
# Option 2: independent sensor hal
#
include $(CLEAR_VARS)
LOCAL_MODULE := sensors.dynamic_sensor_hal
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_MODULE_TAGS := optional
# hal module, thus proprietary
LOCAL_PROPRIETARY_MODULE := true
LOCAL_CFLAGS += $(COMMON_CFLAGS) -DLOG_TAG=\"DynamicSensorHal\"
LOCAL_SRC_FILES := $(dynamic_sensor_src) sensors.cpp
LOCAL_HEADER_LIBRARIES := \
libhardware_headers \
libstagefright_foundation_headers \
LOCAL_SHARED_LIBRARIES := $(dynamic_sensor_shared_lib)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
include $(BUILD_SHARED_LIBRARY)
#
# Host test for HidRawSensor. Test with dummy test HID descriptors.
#
include $(CLEAR_VARS)
LOCAL_MODULE := hidrawsensor_host_test
LOCAL_MODULE_TAGS := optional
# host test is targeting linux host only
LOCAL_MODULE_HOST_OS := linux
LOCAL_CFLAGS += $(COMMON_CFLAGS)
LOCAL_SRC_FILES := \
HidRawSensor.cpp \
BaseSensorObject.cpp \
HidUtils/test/TestHidDescriptor.cpp \
test/HidRawSensorTest.cpp
LOCAL_SHARED_LIBRARIES := libhidparser_host
LOCAL_C_INCLUDES += $(LOCAL_PATH)/test $(LOCAL_PATH)/HidUtils/test
include $(BUILD_HOST_EXECUTABLE)
#
# Host test for HidRawDevice and HidRawSensor. Test with hidraw
# device node.
#
include $(CLEAR_VARS)
LOCAL_MODULE := hidrawdevice_host_test
LOCAL_MODULE_TAGS := optional
# host test is targeting linux host only
LOCAL_MODULE_HOST_OS := linux
LOCAL_CFLAGS += $(COMMON_CFLAGS)
LOCAL_SRC_FILES := \
HidRawDevice.cpp \
HidRawSensor.cpp \
BaseSensorObject.cpp \
test/HidRawDeviceTest.cpp
LOCAL_SHARED_LIBRARIES := libhidparser_host
LOCAL_C_INCLUDES += $(LOCAL_PATH)/test $(LOCAL_PATH)/HidUtils/test
include $(BUILD_HOST_EXECUTABLE)
include $(LOCAL_PATH)/HidUtils/Android.mk

View file

@ -0,0 +1,92 @@
// Copyright (C) 2017 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_defaults {
name: "hid_defaults",
cflags: [
"-Wall",
"-Werror",
"-Wextra",
],
}
cc_library {
name: "libhidparser",
defaults: ["hid_defaults"],
host_supported: true,
// indended to be used by hal components, thus vendor
vendor: true,
srcs: [
"HidGlobal.cpp",
"HidItem.cpp",
"HidLocal.cpp",
"HidParser.cpp",
"HidReport.cpp",
"HidTree.cpp",
],
export_include_dirs: ["."],
target: {
android: {
cflags: ["-DLOG_TAG=\"HidUtil\""],
shared_libs: ["libbase"],
},
},
}
//
// Example of HidParser
//
cc_binary_host {
name: "hidparser_example",
defaults: ["hid_defaults"],
srcs: [
"test/HidParserExample.cpp",
"test/TestHidDescriptor.cpp",
],
static_libs: ["libhidparser"],
local_include_dirs: ["test"],
}
//
// Another example of HidParser
//
cc_binary_host {
name: "hidparser_example2",
defaults: ["hid_defaults"],
srcs: [
"test/HidParserExample2.cpp",
"test/TestHidDescriptor.cpp",
],
static_libs: ["libhidparser"],
local_include_dirs: ["test"],
}
//
// Test for TriState template
//
cc_test_host {
name: "tristate_test",
defaults: ["hid_defaults"],
srcs: ["test/TriStateTest.cpp"],
local_include_dirs: ["test"],
}

View file

@ -1,99 +0,0 @@
# Copyright (C) 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
COMMON_CFLAGS := -Wall -Werror -Wextra
hidparser_src := \
HidGlobal.cpp \
HidItem.cpp \
HidLocal.cpp \
HidParser.cpp \
HidReport.cpp \
HidTree.cpp
include $(CLEAR_VARS)
LOCAL_MODULE := libhidparser
LOCAL_MODULE_TAGS := optional
# indended to be used by hal components, thus propietary
LOCAL_PROPRIETARY_MODULE := true
LOCAL_CFLAGS += $(COMMON_CFLAGS) -DLOG_TAG=\"HidUtil\"
LOCAL_SRC_FILES := $(hidparser_src)
LOCAL_SHARED_LIBRARIES := libbase
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
include $(BUILD_SHARED_LIBRARY)
#
# host side shared library (for host test, example, etc)
#
include $(CLEAR_VARS)
LOCAL_MODULE := libhidparser_host
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS += $(COMMON_CFLAGS)
LOCAL_SRC_FILES := $(hidparser_src)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
include $(BUILD_HOST_SHARED_LIBRARY)
#
# Example of HidParser
#
include $(CLEAR_VARS)
LOCAL_MODULE := hidparser_example
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS += $(COMMON_CFLAGS)
LOCAL_SRC_FILES := \
$(hidparser_src) \
test/HidParserExample.cpp \
test/TestHidDescriptor.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)/test
include $(BUILD_HOST_EXECUTABLE)
#
# Another example of HidParser
#
include $(CLEAR_VARS)
LOCAL_MODULE := hidparser_example2
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS += $(COMMON_CFLAGS)
LOCAL_SRC_FILES := \
$(hidparser_src) \
test/HidParserExample2.cpp \
test/TestHidDescriptor.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)/test
include $(BUILD_HOST_EXECUTABLE)
#
# Test for TriState template
#
include $(CLEAR_VARS)
LOCAL_MODULE := tristate_test
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS += $(COMMON_CFLAGS)
LOCAL_SRC_FILES := test/TriStateTest.cpp
LOCAL_STATIC_LIBRARIES := \
libgtest \
libgtest_main
LOCAL_C_INCLUDES += $(LOCAL_PATH)/test
include $(BUILD_HOST_NATIVE_TEST)

View file

@ -1,17 +0,0 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
SensorEventQueue_test.cpp
LOCAL_CFLAGS := -Wall -Werror
LOCAL_MODULE := sensorstests
LOCAL_STATIC_LIBRARIES := libcutils libutils
LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. bionic
LOCAL_LDLIBS += -lpthread
include $(BUILD_HOST_EXECUTABLE)

View file

@ -4,14 +4,14 @@
#include <pthread.h>
#include <cutils/atomic.h>
#include "SensorEventQueue.cpp"
#include "SensorEventQueue.h"
// Unit tests for the SensorEventQueue.
// Run it like this:
//
// make sensorstests -j32 && \
// out/host/linux-x86/obj/EXECUTABLES/sensorstests_intermediates/sensorstests
// m sensorstests && \
// out/host/linux-x86/nativetest64/sensorstests/sensorstests
bool checkWritableBufferSize(SensorEventQueue* queue, int requested, int expected) {
sensors_event_t* buffer;

View file

@ -0,0 +1,32 @@
// Copyright (C) 2011 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Stub sound_trigger HAL module, used for tests
cc_library_shared {
name: "sound_trigger.stub.default",
relative_install_path: "hw",
vendor: true,
srcs: ["sound_trigger_hw.c"],
shared_libs: [
"liblog",
"libcutils",
],
header_libs: ["libhardware_headers"],
cflags: [
"-Wno-error=incompatible-pointer-types",
"-Wno-unused-function",
"-Wno-unused-parameter",
"-Wno-unused-variable",
],
}

View file

@ -1,27 +0,0 @@
# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
# Stub sound_trigger HAL module, used for tests
include $(CLEAR_VARS)
LOCAL_MODULE := sound_trigger.stub.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_PROPRIETARY_MODULE := true
LOCAL_SRC_FILES := sound_trigger_hw.c
LOCAL_SHARED_LIBRARIES := liblog libcutils
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

View file

@ -0,0 +1,27 @@
// Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "thermal.default",
relative_install_path: "hw",
vendor: true,
srcs: ["thermal.c"],
shared_libs: [
"liblog",
"libcutils",
"libutils",
],
header_libs: ["libhardware_headers"],
cflags: ["-Wno-unused-parameter"],
}

View file

@ -1,28 +0,0 @@
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := thermal.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_PROPRIETARY_MODULE := true
LOCAL_SRC_FILES := thermal.c
LOCAL_SHARED_LIBRARIES := liblog libcutils libutils
LOCAL_HEADER_LIBRARIES := libhardware_headers
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := -Wno-unused-parameter
include $(BUILD_SHARED_LIBRARY)

View file

@ -0,0 +1,29 @@
// Copyright (C) 2012 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "audio.usb.default",
relative_install_path: "hw",
vendor: true,
srcs: ["audio_hal.c"],
shared_libs: [
"liblog",
"libcutils",
"libtinyalsa",
"libaudioutils",
"libalsautils",
],
cflags: ["-Wno-unused-parameter"],
header_libs: ["libhardware_headers"],
}

View file

@ -1,34 +0,0 @@
# Copyright (C) 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := audio.usb.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_PROPRIETARY_MODULE := true
LOCAL_SRC_FILES := \
audio_hal.c
LOCAL_C_INCLUDES += \
external/tinyalsa/include \
$(call include-path-for, audio-utils) \
$(call include-path-for, alsa-utils)
LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioutils libalsautils
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_HEADER_LIBRARIES += libhardware_headers
include $(BUILD_SHARED_LIBRARY)

View file

@ -0,0 +1,42 @@
// Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "camera.usb.default",
relative_install_path: "hw",
srcs: [
"CameraHAL.cpp",
"Camera.cpp",
"UsbCamera.cpp",
"Metadata.cpp",
"Stream.cpp",
"HotplugThread.cpp",
],
shared_libs: [
"libcamera_metadata",
"libcutils",
"liblog",
"libsync",
"libutils",
],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
"-fvisibility=hidden",
],
}

View file

@ -1,45 +0,0 @@
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := camera.usb.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_C_INCLUDES += \
system/core/include \
system/media/camera/include \
LOCAL_SRC_FILES := \
CameraHAL.cpp \
Camera.cpp \
UsbCamera.cpp \
Metadata.cpp \
Stream.cpp \
HotplugThread.cpp \
LOCAL_SHARED_LIBRARIES := \
libcamera_metadata \
libcutils \
liblog \
libsync \
libutils \
LOCAL_CFLAGS += -Wall -Wextra -Werror -fvisibility=hidden
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

View file

@ -0,0 +1,34 @@
// Copyright (C) 2012 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "vehicle.default",
relative_install_path: "hw",
vendor: true,
srcs: [
"vehicle.c",
"timeUtil.cpp",
],
cflags: [
"-Wall",
"-Werror",
],
header_libs: ["libhardware_headers"],
shared_libs: [
"liblog",
"libcutils",
"libutils",
],
}

View file

@ -1,30 +0,0 @@
# Copyright (C) 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := vehicle.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_PROPRIETARY_MODULE := true
LOCAL_SRC_FILES := vehicle.c timeUtil.cpp
LOCAL_CFLAGS := -Wall -Werror
LOCAL_HEADER_LIBRARIES := libhardware_headers
LOCAL_SHARED_LIBRARIES := liblog libcutils libutils
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

28
modules/vr/Android.bp Normal file
View file

@ -0,0 +1,28 @@
// Copyright (C) 2016 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_shared {
name: "vr.default",
relative_install_path: "hw",
vendor: true,
srcs: ["vr.c"],
header_libs: ["libhardware_headers"],
shared_libs: ["libcutils"],
cflags: [
"-Wall",
"-Werror",
"-Wno-unused-parameter",
],
}

View file

@ -1,28 +0,0 @@
# Copyright (C) 2016 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := vr.default
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_PROPRIETARY_MODULE := true
LOCAL_SRC_FILES := vr.c
LOCAL_HEADER_LIBRARIES := libhardware_headers
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS += -Wall -Werror -Wno-unused-parameter
include $(BUILD_SHARED_LIBRARY)

View file

@ -1 +0,0 @@
include $(call all-subdir-makefiles)

16
tests/camera3/Android.bp Normal file
View file

@ -0,0 +1,16 @@
cc_test {
name: "camera3_tests",
srcs: ["camera3tests.cpp"],
shared_libs: [
"liblog",
"libhardware",
"libcamera_metadata",
],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
],
}

View file

@ -1,20 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
camera3tests.cpp \
LOCAL_SHARED_LIBRARIES := \
liblog \
libhardware \
libcamera_metadata \
LOCAL_C_INCLUDES += \
system/media/camera/include \
LOCAL_CFLAGS += -Wall -Wextra -Werror
LOCAL_MODULE:= camera3_tests
LOCAL_MODULE_TAGS := tests
include $(BUILD_NATIVE_TEST)

16
tests/hardware/Android.bp Normal file
View file

@ -0,0 +1,16 @@
cc_library_static {
name: "static-hal-check",
srcs: [
"struct-size.cpp",
"struct-offset.cpp",
"struct-last.cpp",
],
shared_libs: ["libhardware"],
cflags: [
"-O0",
"-Wall",
"-Werror",
],
include_dirs: ["system/media/camera/include"],
}

View file

@ -1,12 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := static-hal-check
LOCAL_SRC_FILES := struct-size.cpp struct-offset.cpp struct-last.cpp
LOCAL_SHARED_LIBRARIES := libhardware
LOCAL_CFLAGS := -O0 -Wall -Werror
LOCAL_C_INCLUDES += \
system/media/camera/include
include $(BUILD_STATIC_LIBRARY)

37
tests/hwc/Android.bp Normal file
View file

@ -0,0 +1,37 @@
cc_library_static {
name: "libcnativewindow",
srcs: [
"cnativewindow.c",
"util.c",
],
cflags: [
"-Wall",
"-Werror",
"-Wno-unused-parameter",
],
shared_libs: [
"libEGL",
"libGLESv2",
"libdl",
"libhardware",
"libnativewindow",
],
}
cc_binary {
name: "hwc-test-arrows",
srcs: ["test-arrows.c"],
static_libs: ["libcnativewindow"],
shared_libs: [
"libEGL",
"libGLESv2",
"libdl",
"libhardware",
"libnativewindow",
],
cflags: [
"-DGL_GLEXT_PROTOTYPES",
"-Wall",
"-Werror",
],
}

View file

@ -1,16 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libcnativewindow
LOCAL_SRC_FILES := cnativewindow.c util.c
LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter
LOCAL_SHARED_LIBRARIES := libEGL libGLESv2 libdl libhardware libnativewindow
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := hwc-test-arrows
LOCAL_SRC_FILES := test-arrows.c
LOCAL_STATIC_LIBRARIES := libcnativewindow
LOCAL_SHARED_LIBRARIES := libEGL libGLESv2 libdl libhardware libnativewindow
LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -Wall -Werror
include $(BUILD_EXECUTABLE)

View file

@ -1,19 +0,0 @@
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(call all-makefiles-under,$(LOCAL_PATH))

View file

@ -0,0 +1,33 @@
cc_test {
name: "libinput_evdevtests",
srcs: [
"BitUtils_test.cpp",
"InputDevice_test.cpp",
"InputHub_test.cpp",
"InputMocks.cpp",
"MouseInputMapper_test.cpp",
"SwitchInputMapper_test.cpp",
"TestHelpers.cpp",
],
static_libs: ["libgmock"],
shared_libs: [
"libinput_evdev",
"liblog",
"libutils",
],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
"-Wno-unused-parameter",
// TestHelpers uses mktemp. As the path is given to TempFile, we can't do too much
// here (e.g., use mkdtemp first). At least races will lead to an early failure, as
// mkfifo fails on existing files.
"-Wno-deprecated-declarations",
],
}

View file

@ -1,33 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_C_INCLUDES += hardware/libhardware/modules/input/evdev
LOCAL_SRC_FILES:= \
BitUtils_test.cpp \
InputDevice_test.cpp \
InputHub_test.cpp \
InputMocks.cpp \
MouseInputMapper_test.cpp \
SwitchInputMapper_test.cpp \
TestHelpers.cpp
LOCAL_STATIC_LIBRARIES := libgmock
LOCAL_SHARED_LIBRARIES := \
libinput_evdev \
liblog \
libutils
LOCAL_CLANG := true
LOCAL_CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter
# TestHelpers uses mktemp. As the path is given to TempFile, we can't do too much
# here (e.g., use mkdtemp first). At least races will lead to an early failure, as
# mkfifo fails on existing files.
LOCAL_CFLAGS += -Wno-deprecated-declarations
LOCAL_MODULE := libinput_evdevtests
LOCAL_MODULE_TAGS := tests
include $(BUILD_NATIVE_TEST)

View file

@ -0,0 +1,17 @@
// Build the keymaster unit tests
cc_test {
name: "keymaster_test",
srcs: ["keymaster_test.cpp"],
shared_libs: [
"liblog",
"libutils",
"libcrypto",
"libhardware",
],
cflags: [
"-Wall",
"-Werror",
],
}

View file

@ -1,21 +0,0 @@
# Build the keymaster unit tests
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
keymaster_test.cpp
LOCAL_SHARED_LIBRARIES := \
liblog \
libutils \
libcrypto \
libhardware \
LOCAL_MODULE := keymaster_test
LOCAL_CFLAGS := -Wall -Werror
LOCAL_MODULE_TAGS := tests
include $(BUILD_NATIVE_TEST)

48
tests/vehicle/Android.bp Normal file
View file

@ -0,0 +1,48 @@
//
// Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Build native tests.
cc_test {
name: "vehicle_tests",
srcs: ["vehicle_tests.cpp"],
shared_libs: [
"liblog",
"libhardware",
],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
],
}
// Build HAL command line utility.
cc_binary {
name: "vehicle-hal-tool",
srcs: ["vehicle-hal-tool.c"],
cflags: [
"-Wall",
"-Wno-unused-parameter",
"-Werror",
],
shared_libs: [
"libcutils",
"libhardware",
"liblog",
],
}

View file

@ -1,45 +0,0 @@
#
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH:= $(call my-dir)
# Build native tests.
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
vehicle_tests.cpp \
LOCAL_SHARED_LIBRARIES := \
liblog \
libhardware \
LOCAL_CFLAGS += -Wall -Wextra -Werror
LOCAL_MODULE:= vehicle_tests
LOCAL_MODULE_TAGS := tests
include $(BUILD_NATIVE_TEST)
# Build HAL command line utility.
include $(CLEAR_VARS)
LOCAL_SRC_FILES := vehicle-hal-tool.c
LOCAL_MODULE := vehicle-hal-tool
LOCAL_CFLAGS := -Wall -Wno-unused-parameter -Werror
LOCAL_MODULE_TAGS := tests
LOCAL_SHARED_LIBRARIES := libcutils libhardware liblog
include $(BUILD_EXECUTABLE)