1# Build only if both hardware/google/av and device/google/cheets2/codec2 are 2# visible; otherwise, don't build any target under this repository. 3ifneq (,$(findstring hardware/google/av,$(PRODUCT_SOONG_NAMESPACES))) 4ifneq (,$(findstring device/google/cheets2/codec2,$(PRODUCT_SOONG_NAMESPACES))) 5 6LOCAL_PATH := $(call my-dir) 7include $(CLEAR_VARS) 8 9LOCAL_SRC_FILES:= \ 10 C2VDAComponent.cpp \ 11 C2VDAAdaptor.cpp \ 12 13LOCAL_C_INCLUDES += \ 14 $(TOP)/device/google/cheets2/codec2/vdastore/include \ 15 $(TOP)/external/libchrome \ 16 $(TOP)/external/gtest/include \ 17 $(TOP)/external/v4l2_codec2/include \ 18 $(TOP)/external/v4l2_codec2/vda \ 19 $(TOP)/frameworks/av/media/libstagefright/include \ 20 $(TOP)/hardware/google/av/codec2/include \ 21 $(TOP)/hardware/google/av/codec2/vndk/include \ 22 $(TOP)/hardware/google/av/media/codecs/base/include \ 23 24LOCAL_MODULE:= libv4l2_codec2 25LOCAL_MODULE_TAGS := optional 26 27LOCAL_SHARED_LIBRARIES := libbinder \ 28 libchrome \ 29 liblog \ 30 libmedia \ 31 libstagefright \ 32 libstagefright_codec2 \ 33 libstagefright_codec2_vndk \ 34 libstagefright_simple_c2component \ 35 libstagefright_foundation \ 36 libutils \ 37 libv4l2_codec2_vda \ 38 libvda_c2componentstore \ 39 40# -Wno-unused-parameter is needed for libchrome/base codes 41LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -std=c++14 42LOCAL_CFLAGS += -Wno-unused-lambda-capture -Wno-unknown-warning-option 43LOCAL_CLANG := true 44LOCAL_SANITIZE := unsigned-integer-overflow signed-integer-overflow 45 46LOCAL_LDFLAGS := -Wl,-Bsymbolic 47 48# Build C2VDAAdaptorProxy only for ARC++ case. 49ifneq (,$(findstring cheets_,$(TARGET_PRODUCT))) 50LOCAL_CFLAGS += -DV4L2_CODEC2_ARC 51LOCAL_SRC_FILES += \ 52 C2VDAAdaptorProxy.cpp \ 53 54LOCAL_SRC_FILES := $(filter-out C2VDAAdaptor.cpp, $(LOCAL_SRC_FILES)) 55LOCAL_SHARED_LIBRARIES += libarcbridge \ 56 libarcbridgeservice \ 57 libmojo \ 58 libv4l2_codec2_arcva_factory \ 59 60endif # ifneq (,$(findstring cheets_,$(TARGET_PRODUCT))) 61 62include $(BUILD_SHARED_LIBRARY) 63 64include $(call all-makefiles-under,$(LOCAL_PATH)) 65 66endif #ifneq (,$(findstring device/google/cheets2/codec2,$(PRODUCT_SOONG_NAMESPACES))) 67endif #ifneq (,$(findstring hardware/google/av,$(PRODUCT_SOONG_NAMESPACES))) 68