--- /dev/null
+// 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",
+]
+++ /dev/null
-# 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))
--- /dev/null
+// 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"],
+}
+++ /dev/null
-# 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)
--- /dev/null
+// 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",
+ ],
+}
+++ /dev/null
-# 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))