See build/soong/README.md for more information.
Test: mma -j
Test: camera_metadata_test on flounder
Change-Id: I0f699a2a0d120783a5f543cf6d454109a5fc624b
--- /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: "libalsautils",
+ srcs: [
+ "alsa_device_profile.c",
+ "alsa_device_proxy.c",
+ "alsa_logging.c",
+ "alsa_format.c",
+ ],
+ export_include_dirs: ["include"],
+ shared_libs: [
+ "liblog",
+ "libcutils",
+ "libtinyalsa",
+ "libaudioutils",
+ ],
+ cflags: [
+ "-Werror",
+ "-Wall",
+ "-Wno-unused-parameter",
+ ],
+}
+++ /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_MODULE := libalsautils
-LOCAL_SRC_FILES := \
- alsa_device_profile.c \
- alsa_device_proxy.c \
- alsa_logging.c \
- alsa_format.c
-LOCAL_C_INCLUDES += \
- external/tinyalsa/include
-LOCAL_EXPORT_C_INCLUDE_DIRS := system/media/alsa_utils/include
-LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioutils
-LOCAL_MODULE_TAGS := optional
-LOCAL_CFLAGS := -Werror -Wall
-LOCAL_CFLAGS += -Wno-unused-parameter
-
-include $(BUILD_SHARED_LIBRARY)
-
--- /dev/null
+cc_library_shared {
+ name: "libaudioroute",
+ srcs: ["audio_route.c"],
+ shared_libs: [
+ "liblog",
+ "libcutils",
+ "libutils",
+ "libexpat",
+ "libtinyalsa",
+ ],
+ cflags: [
+ "-Werror",
+ "-Wall",
+ ],
+}
+++ /dev/null
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_C_INCLUDES += \
- external/tinyalsa/include \
- external/expat/lib
-LOCAL_SRC_FILES:= audio_route.c
-LOCAL_MODULE := libaudioroute
-LOCAL_SHARED_LIBRARIES:= liblog libcutils libutils libexpat libtinyalsa
-LOCAL_MODULE_TAGS := optional
-LOCAL_CFLAGS := -Werror -Wall
-include $(BUILD_SHARED_LIBRARY)
--- /dev/null
+subdirs = ["tests"]
+
+cc_library_shared {
+ name: "libcamera_metadata",
+ srcs: ["src/camera_metadata.c"],
+
+ include_dirs: ["system/media/private/camera/include"],
+ local_include_dirs: ["include"],
+ export_include_dirs: ["include"],
+
+ shared_libs: [
+ "libcutils",
+ "liblog",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ "-fvisibility=hidden",
+ "-std=c99",
+ ],
+
+ product_variables: {
+ debuggable: {
+ // Enable assert()
+ cflags: [
+ "-UNDEBUG",
+ "-DLOG_NDEBUG=1",
+ ],
+ },
+ },
+}
+++ /dev/null
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- camera_metadata.c
-
-LOCAL_C_INCLUDES:= \
- system/media/camera/include \
- system/media/private/camera/include
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- liblog
-
-LOCAL_MODULE := libcamera_metadata
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS += \
- -Wall \
- -Wextra \
- -Werror \
- -fvisibility=hidden \
- -std=c99
-
-ifneq ($(filter userdebug eng,$(TARGET_BUILD_VARIANT)),)
- # Enable assert()
- LOCAL_CFLAGS += -UNDEBUG -DLOG_NDEBUG=1
-endif
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/../include
-
-include $(BUILD_SHARED_LIBRARY)
--- /dev/null
+// Build the unit tests.
+cc_test {
+ name: "camera_metadata_tests",
+ srcs: ["camera_metadata_tests.cpp"],
+
+ shared_libs: [
+ "libutils",
+ "libcamera_metadata",
+ ],
+
+ include_dirs: ["system/media/private/camera/include"],
+
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ ],
+
+ multilib: {
+ lib32: {
+ stem: "camera_metadata_tests",
+ },
+ lib64: {
+ stem: "camera_metadata_tests64",
+ },
+ },
+}
+++ /dev/null
-# Build the unit tests.
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-
-LOCAL_SHARED_LIBRARIES := \
- libutils \
- libcamera_metadata
-
-LOCAL_C_INCLUDES := \
- system/media/camera/include \
- system/media/private/camera/include
-
-LOCAL_SRC_FILES := \
- camera_metadata_tests.cpp
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-
-LOCAL_MODULE := camera_metadata_tests
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE_STEM_32 := camera_metadata_tests
-LOCAL_MODULE_STEM_64 := camera_metadata_tests64
-LOCAL_MULTILIB := both
-
-include $(BUILD_NATIVE_TEST)
--- /dev/null
+cc_library_shared {
+ name: "libradio_metadata",
+
+ srcs: ["src/radio_metadata.c"],
+
+ cflags: [
+ "-Werror",
+ "-Wall",
+ "-fvisibility=hidden",
+ ],
+
+ local_include_dirs: ["include"],
+ export_include_dirs: ["include"],
+
+ shared_libs: [
+ "libcutils",
+ "liblog",
+ ],
+}
+++ /dev/null
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- radio_metadata.c
-
-LOCAL_C_INCLUDES:= \
- system/media/radio/include \
- system/media/private/radio/include
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- liblog
-
-LOCAL_MODULE := libradio_metadata
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -Werror -Wall
-LOCAL_CFLAGS += -fvisibility=hidden
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/../include
-
-include $(BUILD_SHARED_LIBRARY)
#include <limits.h>
#include <system/radio.h>
#include <system/radio_metadata.h>
-#include <radio_metadata_hidden.h>
#include <cutils/log.h>
+#include "radio_metadata_hidden.h"
+
const radio_metadata_type_t metadata_key_type_table[] =
{
RADIO_METADATA_TYPE_TEXT,