diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000000..4c1cafcef5 --- /dev/null +++ b/Android.bp @@ -0,0 +1,6 @@ +subdirs = [ + "cmds/*", + "libs/*", + "opengl/*", + "services/*", +] diff --git a/cmds/atrace/Android.bp b/cmds/atrace/Android.bp new file mode 100644 index 0000000000..6bfb0a4cb2 --- /dev/null +++ b/cmds/atrace/Android.bp @@ -0,0 +1,16 @@ +// Copyright 2012 The Android Open Source Project + +cc_binary { + name: "atrace", + srcs: ["atrace.cpp"], + + shared_libs: [ + "libbinder", + "libcutils", + "libutils", + "libz", + "libbase", + ], + + init_rc: ["atrace.rc"], +} diff --git a/cmds/atrace/Android.mk b/cmds/atrace/Android.mk deleted file mode 100644 index bfb3838dd1..0000000000 --- a/cmds/atrace/Android.mk +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2012 The Android Open Source Project - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= atrace.cpp - -LOCAL_C_INCLUDES += external/zlib - -LOCAL_MODULE:= atrace - -LOCAL_MODULE_TAGS:= optional - -LOCAL_SHARED_LIBRARIES := \ - libbinder \ - libcutils \ - libutils \ - libz \ - libbase - -LOCAL_INIT_RC := atrace.rc - -include $(BUILD_EXECUTABLE) diff --git a/cmds/bugreport/Android.bp b/cmds/bugreport/Android.bp new file mode 100644 index 0000000000..139e4b2bf1 --- /dev/null +++ b/cmds/bugreport/Android.bp @@ -0,0 +1,6 @@ +cc_binary { + name: "bugreport", + srcs: ["bugreport.cpp"], + cflags: ["-Wall"], + shared_libs: ["libcutils"], +} diff --git a/cmds/bugreport/Android.mk b/cmds/bugreport/Android.mk deleted file mode 100644 index ced5d30378..0000000000 --- a/cmds/bugreport/Android.mk +++ /dev/null @@ -1,12 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= bugreport.cpp - -LOCAL_MODULE:= bugreport - -LOCAL_CFLAGS := -Wall - -LOCAL_SHARED_LIBRARIES := libcutils - -include $(BUILD_EXECUTABLE) diff --git a/cmds/dumpstate/Android.bp b/cmds/dumpstate/Android.bp new file mode 100644 index 0000000000..3db41c20cf --- /dev/null +++ b/cmds/dumpstate/Android.bp @@ -0,0 +1,4 @@ +cc_library_static { + name: "libdumpstate.default", + srcs: ["libdumpstate_default.cpp"], +} diff --git a/cmds/dumpstate/Android.mk b/cmds/dumpstate/Android.mk index 45604159b2..577d5b2064 100644 --- a/cmds/dumpstate/Android.mk +++ b/cmds/dumpstate/Android.mk @@ -1,8 +1,4 @@ LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) -LOCAL_SRC_FILES := libdumpstate_default.cpp -LOCAL_MODULE := libdumpstate.default -include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) diff --git a/cmds/dumpsys/Android.bp b/cmds/dumpsys/Android.bp new file mode 100644 index 0000000000..a633b1e363 --- /dev/null +++ b/cmds/dumpsys/Android.bp @@ -0,0 +1,14 @@ +cc_binary { + name: "dumpsys", + + srcs: ["dumpsys.cpp"], + + shared_libs: [ + "libutils", + "liblog", + "libbinder", + ], + + cflags: ["-DXP_UNIX"], + //shared_libs: ["librt"], +} diff --git a/cmds/dumpsys/Android.mk b/cmds/dumpsys/Android.mk deleted file mode 100644 index 9be0901946..0000000000 --- a/cmds/dumpsys/Android.mk +++ /dev/null @@ -1,20 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - dumpsys.cpp - -LOCAL_SHARED_LIBRARIES := \ - libutils \ - liblog \ - libbinder - - -ifeq ($(TARGET_OS),linux) - LOCAL_CFLAGS += -DXP_UNIX - #LOCAL_SHARED_LIBRARIES += librt -endif - -LOCAL_MODULE:= dumpsys - -include $(BUILD_EXECUTABLE) diff --git a/cmds/installd/Android.bp b/cmds/installd/Android.bp new file mode 100644 index 0000000000..67362dece6 --- /dev/null +++ b/cmds/installd/Android.bp @@ -0,0 +1,48 @@ +cc_defaults { + name: "installd_defaults", + + cflags: [ + "-Wall", + "-Werror", + ], + srcs: [ + "commands.cpp", + "utils.cpp", + ], + shared_libs: [ + "libbase", + "libcutils", + "liblog", + "liblogwrap", + "libselinux", + ], + + clang: true, +} + +// +// Static library used in testing and executable +// + +cc_library_static { + name: "libinstalld", + defaults: ["installd_defaults"], + + export_include_dirs: ["."], +} + +// +// Executable +// + +cc_binary { + name: "installd", + defaults: ["installd_defaults"], + srcs: ["installd.cpp"], + + static_libs: ["libdiskusage"], + + init_rc: ["installd.rc"], +} + +subdirs = ["tests"] diff --git a/cmds/installd/Android.mk b/cmds/installd/Android.mk deleted file mode 100644 index d0bd4a806d..0000000000 --- a/cmds/installd/Android.mk +++ /dev/null @@ -1,44 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -common_src_files := commands.cpp utils.cpp -common_cflags := -Wall -Werror - -# -# Static library used in testing and executable -# - -include $(CLEAR_VARS) -LOCAL_MODULE := libinstalld -LOCAL_MODULE_TAGS := eng tests -LOCAL_SRC_FILES := $(common_src_files) -LOCAL_CFLAGS := $(common_cflags) -LOCAL_SHARED_LIBRARIES := \ - libbase \ - liblogwrap \ - libselinux \ - -LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk -LOCAL_CLANG := true -include $(BUILD_STATIC_LIBRARY) - -# -# Executable -# - -include $(CLEAR_VARS) -LOCAL_MODULE := installd -LOCAL_MODULE_TAGS := optional -LOCAL_CFLAGS := $(common_cflags) -LOCAL_SRC_FILES := installd.cpp $(common_src_files) -LOCAL_SHARED_LIBRARIES := \ - libbase \ - libcutils \ - liblog \ - liblogwrap \ - libselinux \ - -LOCAL_STATIC_LIBRARIES := libdiskusage -LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk -LOCAL_INIT_RC := installd.rc -LOCAL_CLANG := true -include $(BUILD_EXECUTABLE) diff --git a/cmds/installd/tests/Android.bp b/cmds/installd/tests/Android.bp new file mode 100644 index 0000000000..05ddf8ed3e --- /dev/null +++ b/cmds/installd/tests/Android.bp @@ -0,0 +1,15 @@ +// Build the unit tests for installd +cc_test { + name: "installd_utils_test", + clang: true, + srcs: ["installd_utils_test.cpp"], + shared_libs: [ + "libbase", + "libutils", + "libcutils", + ], + static_libs: [ + "libinstalld", + "libdiskusage", + ], +} diff --git a/cmds/installd/tests/Android.mk b/cmds/installd/tests/Android.mk deleted file mode 100644 index 38a9f69964..0000000000 --- a/cmds/installd/tests/Android.mk +++ /dev/null @@ -1,31 +0,0 @@ -# Build the unit tests for installd -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk - -# Build the unit tests. -test_src_files := \ - installd_utils_test.cpp - -shared_libraries := \ - libbase \ - libutils \ - libcutils \ - -static_libraries := \ - libinstalld \ - libdiskusage \ - -c_includes := \ - frameworks/native/cmds/installd - -$(foreach file,$(test_src_files), \ - $(eval include $(CLEAR_VARS)) \ - $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \ - $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \ - $(eval LOCAL_SRC_FILES := $(file)) \ - $(eval LOCAL_C_INCLUDES := $(c_includes)) \ - $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ - $(eval LOCAL_CLANG := true) \ - $(eval include $(BUILD_NATIVE_TEST)) \ -) diff --git a/cmds/service/Android.bp b/cmds/service/Android.bp new file mode 100644 index 0000000000..8cffb3c701 --- /dev/null +++ b/cmds/service/Android.bp @@ -0,0 +1,13 @@ +cc_binary { + name: "service", + + srcs: ["service.cpp"], + + shared_libs: [ + "libutils", + "libbinder", + ], + + cflags: ["-DXP_UNIX"], + //shared_libs: ["librt"], +} diff --git a/cmds/service/Android.mk b/cmds/service/Android.mk deleted file mode 100644 index 275bbb2e17..0000000000 --- a/cmds/service/Android.mk +++ /dev/null @@ -1,16 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - service.cpp - -LOCAL_SHARED_LIBRARIES := libutils libbinder - -ifeq ($(TARGET_OS),linux) - LOCAL_CFLAGS += -DXP_UNIX - #LOCAL_SHARED_LIBRARIES += librt -endif - -LOCAL_MODULE:= service - -include $(BUILD_EXECUTABLE) diff --git a/cmds/servicemanager/Android.bp b/cmds/servicemanager/Android.bp new file mode 100644 index 0000000000..82dd6c4e03 --- /dev/null +++ b/cmds/servicemanager/Android.bp @@ -0,0 +1,35 @@ +cc_defaults { + name: "servicemanager_flags", + + cflags: [ + "-Wall", + "-Wextra", + ], + product_variables: { + binder32bit: { + cflags: ["-DBINDER_IPC_32BIT=1"], + }, + }, + + shared_libs: ["liblog"], +} + +cc_binary { + name: "bctest", + defaults: ["servicemanager_flags"], + srcs: [ + "bctest.c", + "binder.c", + ], +} + +cc_binary { + name: "servicemanager", + defaults: ["servicemanager_flags"], + srcs: [ + "service_manager.c", + "binder.c", + ], + shared_libs: ["libselinux"], + init_rc: ["servicemanager.rc"], +} diff --git a/cmds/servicemanager/Android.mk b/cmds/servicemanager/Android.mk deleted file mode 100644 index 7ee0dd184e..0000000000 --- a/cmds/servicemanager/Android.mk +++ /dev/null @@ -1,26 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -svc_c_flags = \ - -Wall -Wextra \ - -ifneq ($(TARGET_USES_64_BIT_BINDER),true) -ifneq ($(TARGET_IS_64_BIT),true) -svc_c_flags += -DBINDER_IPC_32BIT=1 -endif -endif - -include $(CLEAR_VARS) -LOCAL_SHARED_LIBRARIES := liblog -LOCAL_SRC_FILES := bctest.c binder.c -LOCAL_CFLAGS += $(svc_c_flags) -LOCAL_MODULE := bctest -LOCAL_MODULE_TAGS := optional -include $(BUILD_EXECUTABLE) - -include $(CLEAR_VARS) -LOCAL_SHARED_LIBRARIES := liblog libselinux -LOCAL_SRC_FILES := service_manager.c binder.c -LOCAL_CFLAGS += $(svc_c_flags) -LOCAL_MODULE := servicemanager -LOCAL_INIT_RC := servicemanager.rc -include $(BUILD_EXECUTABLE) diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp new file mode 100644 index 0000000000..a2b114ccca --- /dev/null +++ b/libs/binder/Android.bp @@ -0,0 +1,74 @@ +// Copyright (C) 2009 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 { + name: "libbinder", + + srcs: [ + "AppOpsManager.cpp", + "Binder.cpp", + "BpBinder.cpp", + "BufferedTextOutput.cpp", + "Debug.cpp", + "IAppOpsCallback.cpp", + "IAppOpsService.cpp", + "IBatteryStats.cpp", + "IInterface.cpp", + "IMemory.cpp", + "IPCThreadState.cpp", + "IPermissionController.cpp", + "IProcessInfoService.cpp", + "IServiceManager.cpp", + "MemoryBase.cpp", + "MemoryDealer.cpp", + "MemoryHeapBase.cpp", + "Parcel.cpp", + "PermissionCache.cpp", + "PersistableBundle.cpp", + "ProcessInfoService.cpp", + "ProcessState.cpp", + "Static.cpp", + "Status.cpp", + "TextOutput.cpp", + ], + + cflags: [ + "-Wall", + "-Wextra", + "-Werror", + ], + product_variables: { + binder32bit: { + cflags: ["-DBINDER_IPC_32BIT=1"], + }, + }, + + shared_libs: [ + "libbase", + "liblog", + "libcutils", + "libutils", + ], + export_shared_lib_headers: [ + "libbase", + "libutils", + ], + + clang: true, + sanitize: { + misc_undefined: ["integer"], + }, +} + +subdirs = ["tests"] diff --git a/libs/binder/Android.mk b/libs/binder/Android.mk deleted file mode 100644 index f0368a04f4..0000000000 --- a/libs/binder/Android.mk +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright (C) 2009 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. - -# we have the common sources, plus some device-specific stuff -sources := \ - AppOpsManager.cpp \ - Binder.cpp \ - BpBinder.cpp \ - BufferedTextOutput.cpp \ - Debug.cpp \ - IAppOpsCallback.cpp \ - IAppOpsService.cpp \ - IBatteryStats.cpp \ - IInterface.cpp \ - IMemory.cpp \ - IPCThreadState.cpp \ - IPermissionController.cpp \ - IProcessInfoService.cpp \ - IServiceManager.cpp \ - MemoryBase.cpp \ - MemoryDealer.cpp \ - MemoryHeapBase.cpp \ - Parcel.cpp \ - PermissionCache.cpp \ - PersistableBundle.cpp \ - ProcessInfoService.cpp \ - ProcessState.cpp \ - Static.cpp \ - Status.cpp \ - TextOutput.cpp \ - -LOCAL_PATH:= $(call my-dir) - -binder_cflags := -Wall -Wextra -Werror -ifneq ($(TARGET_USES_64_BIT_BINDER),true) -ifneq ($(TARGET_IS_64_BIT),true) -binder_cflags += -DBINDER_IPC_32BIT=1 -endif -endif - -include $(CLEAR_VARS) -LOCAL_MODULE := libbinder -LOCAL_SHARED_LIBRARIES := libbase liblog libcutils libutils -LOCAL_EXPORT_SHARED_LIBRARY_HEADERS := libbase libutils - -LOCAL_SANITIZE := integer -LOCAL_SRC_FILES := $(sources) -LOCAL_CFLAGS := $(binder_cflags) -include $(BUILD_SHARED_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := libbinder -LOCAL_STATIC_LIBRARIES := libbase libutils -LOCAL_EXPORT_STATIC_LIBRARY_HEADERS := libbase libutils -LOCAL_SRC_FILES := $(sources) -LOCAL_CFLAGS := $(binder_cflags) -include $(BUILD_STATIC_LIBRARY) diff --git a/libs/binder/tests/Android.bp b/libs/binder/tests/Android.bp new file mode 100644 index 0000000000..e354b11f6d --- /dev/null +++ b/libs/binder/tests/Android.bp @@ -0,0 +1,54 @@ +// +// Copyright (C) 2014 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_test { + product_variables: { + binder32bit: { + cflags: ["-DBINDER_IPC_32BIT=1"], + }, + }, + + name: "binderDriverInterfaceTest", + srcs: ["binderDriverInterfaceTest.cpp"], +} + +cc_test { + name: "binderLibTest", + srcs: ["binderLibTest.cpp"], + shared_libs: [ + "libbinder", + "libutils", + ], +} + +cc_test { + name: "binderThroughputTest", + srcs: ["binderThroughputTest.cpp"], + shared_libs: [ + "libbinder", + "libutils", + ], + clang: true, + cflags: [ + "-g", + "-Wall", + "-Werror", + "-std=c++11", + "-Wno-missing-field-initializers", + "-Wno-sign-compare", + "-O3", + ], +} diff --git a/libs/binder/tests/Android.mk b/libs/binder/tests/Android.mk deleted file mode 100644 index a40523d4b3..0000000000 --- a/libs/binder/tests/Android.mk +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (C) 2014 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) -ifneq ($(TARGET_USES_64_BIT_BINDER),true) -ifneq ($(TARGET_IS_64_BIT),true) -LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -endif -endif - -LOCAL_MODULE := binderDriverInterfaceTest -LOCAL_SRC_FILES := binderDriverInterfaceTest.cpp -include $(BUILD_NATIVE_TEST) - -include $(CLEAR_VARS) -LOCAL_MODULE := binderLibTest -LOCAL_SRC_FILES := binderLibTest.cpp -LOCAL_SHARED_LIBRARIES := libbinder libutils -include $(BUILD_NATIVE_TEST) - -include $(CLEAR_VARS) -LOCAL_MODULE := binderThroughputTest -LOCAL_SRC_FILES := binderThroughputTest.cpp -LOCAL_SHARED_LIBRARIES := libbinder libutils -LOCAL_CLANG := true -LOCAL_CFLAGS += -g -Wall -Werror -std=c++11 -Wno-missing-field-initializers -Wno-sign-compare -O3 -include $(BUILD_NATIVE_TEST) diff --git a/libs/binder/tests/binderDriverInterfaceTest.cpp b/libs/binder/tests/binderDriverInterfaceTest.cpp index 0277550258..e02844e4ec 100644 --- a/libs/binder/tests/binderDriverInterfaceTest.cpp +++ b/libs/binder/tests/binderDriverInterfaceTest.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include diff --git a/libs/diskusage/Android.bp b/libs/diskusage/Android.bp new file mode 100644 index 0000000000..156ddff2c6 --- /dev/null +++ b/libs/diskusage/Android.bp @@ -0,0 +1,18 @@ +// Copyright (C) 2010 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_static { + name: "libdiskusage", + srcs: ["dirsize.c"], +} diff --git a/libs/diskusage/Android.mk b/libs/diskusage/Android.mk deleted file mode 100644 index d54f8adf60..0000000000 --- a/libs/diskusage/Android.mk +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2010 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 := libdiskusage - -LOCAL_MODULE_TAGS := optional - -LOCAL_SRC_FILES := dirsize.c - -include $(BUILD_STATIC_LIBRARY) \ No newline at end of file diff --git a/libs/input/Android.bp b/libs/input/Android.bp new file mode 100644 index 0000000000..28df1cf6ed --- /dev/null +++ b/libs/input/Android.bp @@ -0,0 +1,60 @@ +// 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. + +// libinput is partially built for the host (used by build time keymap validation tool) + +cc_library { + name: "libinput", + host_supported: true, + + srcs: [ + "Input.cpp", + "InputDevice.cpp", + "Keyboard.cpp", + "KeyCharacterMap.cpp", + "KeyLayoutMap.cpp", + "VirtualKeyMap.cpp", + ], + + clang: true, + sanitize: { + misc_undefined: ["integer"], + }, + + shared_libs: [ + "liblog", + "libcutils", + ], + + target: { + android: { + srcs: [ + "IInputFlinger.cpp", + "InputTransport.cpp", + "VelocityControl.cpp", + "VelocityTracker.cpp", + ], + + shared_libs: [ + "libutils", + "libbinder", + ], + }, + host: { + shared: { + enabled: false, + }, + }, + }, +} diff --git a/libs/input/Android.mk b/libs/input/Android.mk index 746de66d62..e7dbe79ef9 100644 --- a/libs/input/Android.mk +++ b/libs/input/Android.mk @@ -14,64 +14,6 @@ LOCAL_PATH:= $(call my-dir) -# libinput is partially built for the host (used by build time keymap validation tool) -# These files are common to host and target builds. - -commonSources := \ - Input.cpp \ - InputDevice.cpp \ - Keyboard.cpp \ - KeyCharacterMap.cpp \ - KeyLayoutMap.cpp \ - VirtualKeyMap.cpp - -deviceSources := \ - $(commonSources) \ - IInputFlinger.cpp \ - InputTransport.cpp \ - VelocityControl.cpp \ - VelocityTracker.cpp - -hostSources := \ - $(commonSources) - -# For the host -# ===================================================== - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= $(hostSources) - -LOCAL_MODULE:= libinput - -LOCAL_MODULE_TAGS := optional - -include $(BUILD_HOST_STATIC_LIBRARY) - - -# For the device -# ===================================================== - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= $(deviceSources) - -LOCAL_CLANG := true -LOCAL_SANITIZE := integer - -LOCAL_SHARED_LIBRARIES := \ - liblog \ - libcutils \ - libutils \ - libbinder - -LOCAL_MODULE:= libinput - -LOCAL_MODULE_TAGS := optional - -include $(BUILD_SHARED_LIBRARY) - - # Include subdirectory makefiles # ============================================================ diff --git a/opengl/libs/Android.bp b/opengl/libs/Android.bp new file mode 100644 index 0000000000..f28d4ffc20 --- /dev/null +++ b/opengl/libs/Android.bp @@ -0,0 +1,22 @@ +// Build the ETC1 library +cc_library { + name: "libETC1", + srcs: ["ETC1/etc1.cpp"], + host_supported: true, + + target: { + android: { + static: { + enabled: false, + }, + }, + host: { + shared: { + enabled: false, + }, + }, + windows: { + enabled: true, + }, + }, +} diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk index 4cbca63ca6..e06ce58e16 100644 --- a/opengl/libs/Android.mk +++ b/opengl/libs/Android.mk @@ -149,33 +149,4 @@ LOCAL_LDFLAGS_arm += -Wl,--hash-style,both include $(BUILD_SHARED_LIBRARY) -############################################################################### -# Build the ETC1 host static library -# - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - ETC1/etc1.cpp \ -# - -LOCAL_MODULE:= libETC1 -LOCAL_MODULE_HOST_OS := darwin linux windows - -include $(BUILD_HOST_STATIC_LIBRARY) - -############################################################################### -# Build the ETC1 device library -# - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - ETC1/etc1.cpp \ -# - -LOCAL_MODULE:= libETC1 - -include $(BUILD_SHARED_LIBRARY) - include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/services/batteryservice/Android.bp b/services/batteryservice/Android.bp new file mode 100644 index 0000000000..79db871d4e --- /dev/null +++ b/services/batteryservice/Android.bp @@ -0,0 +1,22 @@ +cc_library_static { + name: "libbatteryservice", + + srcs: [ + "BatteryProperties.cpp", + "BatteryProperty.cpp", + "IBatteryPropertiesListener.cpp", + "IBatteryPropertiesRegistrar.cpp", + ], + + static_libs: [ + "libutils", + "libbinder", + ], + + cflags: [ + "-Wall", + "-Werror", + "-Wunused", + "-Wunreachable-code", + ], +} diff --git a/services/batteryservice/Android.mk b/services/batteryservice/Android.mk deleted file mode 100644 index e4097d7104..0000000000 --- a/services/batteryservice/Android.mk +++ /dev/null @@ -1,20 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - BatteryProperties.cpp \ - BatteryProperty.cpp \ - IBatteryPropertiesListener.cpp \ - IBatteryPropertiesRegistrar.cpp - -LOCAL_STATIC_LIBRARIES := \ - libutils \ - libbinder - -LOCAL_MODULE:= libbatteryservice - -LOCAL_MODULE_TAGS := optional - -LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code - -include $(BUILD_STATIC_LIBRARY) diff --git a/services/powermanager/Android.bp b/services/powermanager/Android.bp new file mode 100644 index 0000000000..7b3af70927 --- /dev/null +++ b/services/powermanager/Android.bp @@ -0,0 +1,17 @@ +cc_library_shared { + name: "libpowermanager", + + srcs: ["IPowerManager.cpp"], + + shared_libs: [ + "libutils", + "libbinder", + ], + + cflags: [ + "-Wall", + "-Werror", + "-Wunused", + "-Wunreachable-code", + ], +} diff --git a/services/powermanager/Android.mk b/services/powermanager/Android.mk deleted file mode 100644 index 4deb115eee..0000000000 --- a/services/powermanager/Android.mk +++ /dev/null @@ -1,19 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - IPowerManager.cpp - -LOCAL_SHARED_LIBRARIES := \ - libutils \ - libbinder - -LOCAL_MODULE:= libpowermanager - -LOCAL_MODULE_TAGS := optional - -LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code - -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/../../include - -include $(BUILD_SHARED_LIBRARY)