diff options
author | 2018-11-19 23:39:03 -0800 | |
---|---|---|
committer | 2018-11-19 23:39:47 -0800 | |
commit | efc3e37c9b2dc1599cf75b49514665049951d7de (patch) | |
tree | ac711546597a70cfe30c26a85c53864ec01630df /cmds/bootanimation | |
parent | 6dc4e652a7b10e5fb7862096223266c8955d467a (diff) |
Convert bootanimation to Android.bp
See build/soong/README.md for more information.
Test: cd frameworks/base/cmds/bootanimation; mma
Change-Id: I7e023ffc42f61ce9a215a958fbbd158a6a8352d7
Diffstat (limited to 'cmds/bootanimation')
-rw-r--r-- | cmds/bootanimation/Android.bp | 90 | ||||
-rw-r--r-- | cmds/bootanimation/Android.mk | 103 | ||||
-rw-r--r-- | cmds/bootanimation/iot/Android.bp | 49 | ||||
-rw-r--r-- | cmds/bootanimation/iot/Android.mk | 43 |
4 files changed, 139 insertions, 146 deletions
diff --git a/cmds/bootanimation/Android.bp b/cmds/bootanimation/Android.bp new file mode 100644 index 000000000000..31bd612cc2c7 --- /dev/null +++ b/cmds/bootanimation/Android.bp @@ -0,0 +1,90 @@ +cc_defaults { + name: "bootanimation_defaults", + + cflags: [ + "-DGL_GLEXT_PROTOTYPES", + "-DEGL_EGLEXT_PROTOTYPES", + + "-Wall", + "-Werror", + "-Wunused", + "-Wunreachable-code", + ], + + shared_libs: [ + "libandroidfw", + "libbase", + "libbinder", + "libcutils", + "liblog", + "libutils", + ], +} + +// bootanimation executable +// ========================================================= + +cc_binary { + name: "bootanimation", + defaults: ["bootanimation_defaults"], + + shared_libs: [ + "libOpenSLES", + "libbootanimation", + ], + + srcs: [ + "BootAnimationUtil.cpp", + + "bootanimation_main.cpp", + "audioplay.cpp", + ], + + product_variables: { + product_is_iot: { + shared_libs: [ + "libandroidthings", + "libandroidthings_protos", + "libchrome", + "libprotobuf-cpp-lite", + ], + static_libs: ["libjsoncpp"], + srcs: [ + "iot/iotbootanimation_main.cpp", + "iot/BootAction.cpp", + "iot/BootParameters.cpp", + ], + exclude_srcs: [ + "bootanimation_main.cpp", + "audioplay.cpp", + ], + }, + }, + + init_rc: ["bootanim.rc"], +} + +// libbootanimation +// =========================================================== + +cc_library_shared { + name: "libbootanimation", + defaults: ["bootanimation_defaults"], + + srcs: ["BootAnimation.cpp"], + + shared_libs: [ + "libui", + "libhwui", + "libEGL", + "libGLESv1_CM", + "libgui", + "libtinyalsa", + ], + + product_variables: { + product_is_iot: { + init_rc: ["iot/bootanim_iot.rc"], + }, + }, +} diff --git a/cmds/bootanimation/Android.mk b/cmds/bootanimation/Android.mk deleted file mode 100644 index 6943dab0acbe..000000000000 --- a/cmds/bootanimation/Android.mk +++ /dev/null @@ -1,103 +0,0 @@ -bootanimation_CommonCFlags = -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES -bootanimation_CommonCFlags += -Wall -Werror -Wunused -Wunreachable-code - - -# bootanimation executable -# ========================================================= - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_CFLAGS += ${bootanimation_CommonCFlags} - -LOCAL_SHARED_LIBRARIES := \ - libOpenSLES \ - libandroidfw \ - libbase \ - libbinder \ - libbootanimation \ - libcutils \ - liblog \ - libutils \ - -LOCAL_SRC_FILES:= \ - BootAnimationUtil.cpp \ - -ifeq ($(PRODUCT_IOT),true) - -LOCAL_SHARED_LIBRARIES += \ - libandroidthings \ - libandroidthings_protos \ - libchrome \ - libprotobuf-cpp-lite \ - -LOCAL_STATIC_LIBRARIES += \ - libjsoncpp - -LOCAL_SRC_FILES += \ - iot/iotbootanimation_main.cpp \ - iot/BootAction.cpp \ - iot/BootParameters.cpp \ - -else - -LOCAL_SRC_FILES += \ - bootanimation_main.cpp \ - audioplay.cpp \ - -endif # PRODUCT_IOT - -LOCAL_MODULE:= bootanimation - -LOCAL_INIT_RC := bootanim.rc - -ifdef TARGET_32_BIT_SURFACEFLINGER -LOCAL_32_BIT_ONLY := true -endif - -include $(BUILD_EXECUTABLE) - - -# libbootanimation -# =========================================================== - -include $(CLEAR_VARS) -LOCAL_MODULE := libbootanimation -LOCAL_CFLAGS += ${bootanimation_CommonCFlags} - -LOCAL_SRC_FILES:= \ - BootAnimation.cpp - -LOCAL_CFLAGS += ${bootanimation_CommonCFlags} - -LOCAL_C_INCLUDES += \ - external/tinyalsa/include \ - frameworks/wilhelm/include - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - liblog \ - libandroidfw \ - libutils \ - libbinder \ - libui \ - libhwui \ - libEGL \ - libGLESv1_CM \ - libgui \ - libtinyalsa \ - libbase - -ifeq ($(PRODUCT_IOT),true) - -LOCAL_INIT_RC := iot/bootanim_iot.rc - -endif # PRODUCT_IOT - -ifdef TARGET_32_BIT_SURFACEFLINGER -LOCAL_32_BIT_ONLY := true -endif - -include ${BUILD_SHARED_LIBRARY} - -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/cmds/bootanimation/iot/Android.bp b/cmds/bootanimation/iot/Android.bp new file mode 100644 index 000000000000..1f248adcb9e1 --- /dev/null +++ b/cmds/bootanimation/iot/Android.bp @@ -0,0 +1,49 @@ +// Copyright (C) 2018 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. +// + +// libbootanimation_iot_test +// =========================================================== +cc_test { + name: "libbootanimation_iot_test", + cflags: [ + "-Wall", + "-Werror", + "-Wunused", + "-Wunreachable-code", + ], + + shared_libs: [ + "libandroidthings", + "libandroidthings_protos", + "libbase", + "libchrome", + "liblog", + "libprotobuf-cpp-lite", + ], + + static_libs: ["libjsoncpp"], + + srcs: [ + "BootParameters.cpp", + "BootParameters_test.cpp", + ], + + enabled: false, + product_variables: { + product_is_iot: { + enabled: true, + }, + }, +} diff --git a/cmds/bootanimation/iot/Android.mk b/cmds/bootanimation/iot/Android.mk deleted file mode 100644 index 3d288e4e111b..000000000000 --- a/cmds/bootanimation/iot/Android.mk +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2018 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) - -ifeq ($(PRODUCT_IOT),true) - -# libbootanimation_iot_test -# =========================================================== -include $(CLEAR_VARS) -LOCAL_MODULE := libbootanimation_iot_test -LOCAL_CFLAGS := -Wall -Werror -Wunused -Wunreachable-code - -LOCAL_SHARED_LIBRARIES := \ - libandroidthings \ - libandroidthings_protos \ - libbase \ - libchrome \ - liblog \ - libprotobuf-cpp-lite \ - -LOCAL_STATIC_LIBRARIES += \ - libjsoncpp - -LOCAL_SRC_FILES := \ - BootParameters.cpp \ - BootParameters_test.cpp \ - -include $(BUILD_NATIVE_TEST) - -endif # PRODUCT_IOT |