Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b5b6fdd authored by Wonsik Kim's avatar Wonsik Kim
Browse files

codec2: switch to Android.bp

Test: builds
Change-Id: Id9cde46377182ea297962ef8cef89799548e6a77
parent 43be9048
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -161,6 +161,7 @@ cc_library_shared {
}

subdirs = [
    "codec2",
    "codecs/*",
    "colorconversion",
    "filters",
+27 −0
Original line number Diff line number Diff line
cc_library_shared {
    name: "libstagefright_codec2",

    srcs: ["C2.cpp"],

    include_dirs: [
        "frameworks/av/media/libstagefright/codec2/include",
        "frameworks/native/include/media/hardware",
    ],

    sanitize: {
        misc_undefined: [
            "unsigned-integer-overflow",
            "signed-integer-overflow",
        ],
        cfi: true,
        diag: {
            cfi: true,
        },
    },

    ldflags: ["-Wl,-Bsymbolic"],
}

subdirs = [
    "tests",
]
+0 −21
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES:= \
        C2.cpp    \

LOCAL_C_INCLUDES += \
        $(TOP)/frameworks/av/media/libstagefright/codec2/include \
        $(TOP)/frameworks/native/include/media/hardware \

LOCAL_MODULE:= libstagefright_codec2
LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
LOCAL_SANITIZE := unsigned-integer-overflow signed-integer-overflow cfi
LOCAL_SANITIZE_DIAG := cfi

include $(BUILD_SHARED_LIBRARY)

################################################################################

include $(call all-makefiles-under,$(LOCAL_PATH))
+31 −0
Original line number Diff line number Diff line
cc_test {
    name: "codec2_test",

    tags: [
        "tests",
    ],

    srcs: [
        "vndk/C2UtilTest.cpp",
        "C2_test.cpp",
        "C2Param_test.cpp",
    ],

    include_dirs: [
        "frameworks/av/media/libstagefright/codec2/include",
        "frameworks/av/media/libstagefright/codec2/vndk/include",
        "frameworks/native/include/media/openmax",
    ],

    shared_libs: [
        "libcutils",
        "liblog",
        "libstagefright_codec2",
    ],

    cflags: [
        "-Werror",
        "-Wall",
        "-std=c++14",
    ],
}
+0 −37
Original line number Diff line number Diff line
# Build the unit tests.
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk

LOCAL_MODULE := codec2_test

LOCAL_MODULE_TAGS := tests

LOCAL_SRC_FILES := \
	vndk/C2UtilTest.cpp \
	C2_test.cpp \
	C2Param_test.cpp \

LOCAL_SHARED_LIBRARIES := \
	libcutils \
	libstagefright_codec2 \
	liblog

LOCAL_C_INCLUDES := \
	frameworks/av/media/libstagefright/codec2/include \
	frameworks/av/media/libstagefright/codec2/vndk/include \
	$(TOP)/frameworks/native/include/media/openmax \

LOCAL_CFLAGS += -Werror -Wall -std=c++14
LOCAL_CLANG := true

include $(BUILD_NATIVE_TEST)

# Include subdirectory makefiles
# ============================================================

# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
# team really wants is to build the stuff defined by this makefile.
ifeq (,$(ONE_SHOT_MAKEFILE))
include $(call first-makefiles-under,$(LOCAL_PATH))
endif