Home | History | Annotate | Download | only in v4l2_codec2
      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.
      3 ifneq (,$(findstring hardware/google/av,$(PRODUCT_SOONG_NAMESPACES)))
      4 ifneq (,$(findstring device/google/cheets2/codec2,$(PRODUCT_SOONG_NAMESPACES)))
      5 
      6 LOCAL_PATH := $(call my-dir)
      7 include $(CLEAR_VARS)
      8 
      9 LOCAL_SRC_FILES:= \
     10         C2VDAComponent.cpp \
     11         C2VDAAdaptor.cpp   \
     12 
     13 LOCAL_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 
     24 LOCAL_MODULE:= libv4l2_codec2
     25 LOCAL_MODULE_TAGS := optional
     26 
     27 LOCAL_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
     41 LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -std=c++14
     42 LOCAL_CFLAGS += -Wno-unused-lambda-capture -Wno-unknown-warning-option
     43 LOCAL_CLANG := true
     44 LOCAL_SANITIZE := unsigned-integer-overflow signed-integer-overflow
     45 
     46 LOCAL_LDFLAGS := -Wl,-Bsymbolic
     47 
     48 # Build C2VDAAdaptorProxy only for ARC++ case.
     49 ifneq (,$(findstring cheets_,$(TARGET_PRODUCT)))
     50 LOCAL_CFLAGS += -DV4L2_CODEC2_ARC
     51 LOCAL_SRC_FILES += \
     52                    C2VDAAdaptorProxy.cpp \
     53 
     54 LOCAL_SRC_FILES := $(filter-out C2VDAAdaptor.cpp, $(LOCAL_SRC_FILES))
     55 LOCAL_SHARED_LIBRARIES += libarcbridge \
     56                           libarcbridgeservice \
     57                           libmojo \
     58                           libv4l2_codec2_arcva_factory \
     59 
     60 endif # ifneq (,$(findstring cheets_,$(TARGET_PRODUCT)))
     61 
     62 include $(BUILD_SHARED_LIBRARY)
     63 
     64 include $(call all-makefiles-under,$(LOCAL_PATH))
     65 
     66 endif  #ifneq (,$(findstring device/google/cheets2/codec2,$(PRODUCT_SOONG_NAMESPACES)))
     67 endif  #ifneq (,$(findstring hardware/google/av,$(PRODUCT_SOONG_NAMESPACES)))
     68