From 6e1c761ed8f0d25f4e3ee89e36b066bdb4f6ba67 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 19 Apr 2017 16:56:46 -0700 Subject: [PATCH] Convert inputflinger to Android.bp See build/soong/README.md for more information. Test: m -j checkbuild Change-Id: Iebdc3f4d2d560b0fdf5447dde0ac06df64826bb5 Merged-In: Iebdc3f4d2d560b0fdf5447dde0ac06df64826bb5 (cherry picked from commit 45a1b9c95de619785b68ce51b1a3e271abc4ffd9) --- services/inputflinger/Android.bp | 51 +++++++++++++++++++++++++++ services/inputflinger/Android.mk | 49 -------------------------- services/inputflinger/host/Android.bp | 57 ++++++++++++++++++++++++++++++ services/inputflinger/host/Android.mk | 63 ---------------------------------- services/inputflinger/tests/Android.bp | 23 +++++++++++++ services/inputflinger/tests/Android.mk | 40 --------------------- 6 files changed, 131 insertions(+), 152 deletions(-) create mode 100644 services/inputflinger/Android.bp delete mode 100644 services/inputflinger/Android.mk create mode 100644 services/inputflinger/host/Android.bp delete mode 100644 services/inputflinger/host/Android.mk create mode 100644 services/inputflinger/tests/Android.bp delete mode 100644 services/inputflinger/tests/Android.mk diff --git a/services/inputflinger/Android.bp b/services/inputflinger/Android.bp new file mode 100644 index 0000000000..4fd98e2a7e --- /dev/null +++ b/services/inputflinger/Android.bp @@ -0,0 +1,51 @@ +// Copyright (C) 2013 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: "libinputflinger", + + srcs: [ + "EventHub.cpp", + "InputApplication.cpp", + "InputDispatcher.cpp", + "InputListener.cpp", + "InputManager.cpp", + "InputReader.cpp", + "InputWindow.cpp", + ], + + shared_libs: [ + "libbinder", + "libcrypto", + "libcutils", + "libinput", + "liblog", + "libutils", + "libui", + "libhardware_legacy", + ], + + cflags: [ + "-Wno-unused-parameter", + // TODO: Move inputflinger to its own process and mark it hidden + //-fvisibility=hidden + ], + + export_include_dirs: ["."], +} + +subdirs = [ + "host", + "tests", +] diff --git a/services/inputflinger/Android.mk b/services/inputflinger/Android.mk deleted file mode 100644 index ed867d8441..0000000000 --- a/services/inputflinger/Android.mk +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (C) 2013 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_SRC_FILES:= \ - EventHub.cpp \ - InputApplication.cpp \ - InputDispatcher.cpp \ - InputListener.cpp \ - InputManager.cpp \ - InputReader.cpp \ - InputWindow.cpp - -LOCAL_SHARED_LIBRARIES := \ - libbinder \ - libcrypto \ - libcutils \ - libinput \ - liblog \ - libutils \ - libui \ - libhardware_legacy - - -# TODO: Move inputflinger to its own process and mark it hidden -#LOCAL_CFLAGS += -fvisibility=hidden - -LOCAL_CFLAGS += -Wno-unused-parameter - -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) - -LOCAL_MODULE := libinputflinger - -include $(BUILD_SHARED_LIBRARY) - -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/services/inputflinger/host/Android.bp b/services/inputflinger/host/Android.bp new file mode 100644 index 0000000000..b8e9bce4bd --- /dev/null +++ b/services/inputflinger/host/Android.bp @@ -0,0 +1,57 @@ +// 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: "libinputflingerhost", + + srcs: [ + "InputFlinger.cpp", + "InputDriver.cpp", + "InputHost.cpp", + ], + + shared_libs: [ + "libbinder", + "libcrypto", + "libcutils", + "libinput", + "liblog", + "libutils", + "libhardware", + ], + + cflags: [ + "-Wno-unused-parameter", + // TODO: Move inputflinger to its own process and mark it hidden + //-fvisibility=hidden + ], + + export_include_dirs: ["."], +} + +//####################################################################### +// build input flinger executable +cc_binary { + name: "inputflinger", + + srcs: ["main.cpp"], + + shared_libs: [ + "libbinder", + "libinputflingerhost", + "libutils", + ], + + init_rc: ["inputflinger.rc"], +} diff --git a/services/inputflinger/host/Android.mk b/services/inputflinger/host/Android.mk deleted file mode 100644 index 0a7fc27ade..0000000000 --- a/services/inputflinger/host/Android.mk +++ /dev/null @@ -1,63 +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_CLANG := true - -LOCAL_SRC_FILES:= \ - InputFlinger.cpp \ - InputDriver.cpp \ - InputHost.cpp - -LOCAL_SHARED_LIBRARIES := \ - libbinder \ - libcrypto \ - libcutils \ - libinput \ - liblog \ - libutils \ - libhardware - - -# TODO: Move inputflinger to its own process and mark it hidden -#LOCAL_CFLAGS += -fvisibility=hidden - -LOCAL_CFLAGS += -Wno-unused-parameter - -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) - -LOCAL_MODULE := libinputflingerhost - -include $(BUILD_SHARED_LIBRARY) - -######################################################################## -# build input flinger executable -include $(CLEAR_VARS) - -LOCAL_CLANG := true - -LOCAL_SRC_FILES:= \ - main.cpp - -LOCAL_SHARED_LIBRARIES := \ - libbinder \ - libinputflingerhost \ - libutils - -LOCAL_MODULE := inputflinger -LOCAL_INIT_RC := inputflinger.rc - -include $(BUILD_EXECUTABLE) diff --git a/services/inputflinger/tests/Android.bp b/services/inputflinger/tests/Android.bp new file mode 100644 index 0000000000..29d93f034b --- /dev/null +++ b/services/inputflinger/tests/Android.bp @@ -0,0 +1,23 @@ +// Build the unit tests. + +cc_test { + name: "inputflinger_tests", + srcs: [ + "InputReader_test.cpp", + "InputDispatcher_test.cpp", + ], + test_per_src: true, + cflags: ["-Wno-unused-parameter"], + shared_libs = [ + "libcutils", + "liblog", + "libutils", + "libhardware", + "libhardware_legacy", + "libui", + "libskia", + "libinput", + "libinputflinger", + "libinputservice", + ], +} diff --git a/services/inputflinger/tests/Android.mk b/services/inputflinger/tests/Android.mk deleted file mode 100644 index 4c433929ef..0000000000 --- a/services/inputflinger/tests/Android.mk +++ /dev/null @@ -1,40 +0,0 @@ -# Build the unit tests. -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -# Build the unit tests. -test_src_files := \ - InputReader_test.cpp \ - InputDispatcher_test.cpp - -shared_libraries := \ - libcutils \ - liblog \ - libutils \ - libhardware \ - libhardware_legacy \ - libui \ - libskia \ - libinput \ - libinputflinger \ - libinputservice - -c_includes := \ - external/skia/include/core - - -module_tags := tests - -$(foreach file,$(test_src_files), \ - $(eval include $(CLEAR_VARS)) \ - $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \ - $(eval LOCAL_C_INCLUDES := $(c_includes)) \ - $(eval LOCAL_CFLAGS += -Wno-unused-parameter) \ - $(eval LOCAL_SRC_FILES := $(file)) \ - $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ - $(eval LOCAL_MODULE_TAGS := $(module_tags)) \ - $(eval include $(BUILD_NATIVE_TEST)) \ -) - -# Build the manual test programs. -include $(call all-makefiles-under, $(LOCAL_PATH)) -- 2.11.0