You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

316 lines
11 KiB

LOCAL_PATH:= $(call my-dir)
DOLPHIN_PATH := $(TOP)/$(SOC_PLATFORM_PATH)
UPNP_DIR := $(TOP)/vendor/open_source/libupnp
DLNA_DIR := $(DOLPHIN_PATH)/system/dlna_jni/source
NDK_UPNP_DIR := $(UPNP_DIR)
VPP_DIR := $(DLNA_DIR)/source
NDK_VPP_DIR := $(LOCAL_PATH)/../../source
############################## libdlna_common.a begin ##############################
include $(CLEAR_VARS)
LOCAL_MODULE := libdlna_common
LOCAL_MULTILIB := both
LOCAL_MODULE_TAGS := optional
# compiler option
LOCAL_STRIP_MODULE :=true
LOCAL_CFLAGS := -fno-common -Wdate-time -Wextra -Wfloat-equal -Wformat=2 -Wshadow
LOCAL_LDFLAGS := -Wl,-Bsymbolic -rdynamic -Wl,--no-undefined
LOCAL_CFLAGS += -O2
LOCAL_CFLAGS += -D_FORTIFY_SOURCE=2
LOCAL_CFLAGS += -fstack-protector-all
#LOCAL_CFLAGS += -fpermissive
LOCAL_LDFLAGS += -s -Wl,-z,now -fpic -Wl,-z,relro
LOCAL_SRC_FILES := source/src/common/dlnacommon.c
LOCAL_SRC_FILES += source/src/common/dlnabufmgmt.c
LOCAL_SRC_FILES += source/src/common/dlnawebserver.c
LOCAL_SRC_FILES += source/src/common/dlnactrlpointscommon.c
LOCAL_SRC_FILES += source/src/common/dlnadevicemgmt.c
LOCAL_C_INCLUDES := $(LOCAL_PATH)/source/src/common
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/include
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/src/dms
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/src/dmr
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/src/dmp
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/src/dmp_dl
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/src/dlna_server/include
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/src/include
LOCAL_C_INCLUDES += $(DOLPHIN_PATH)/tvhal/include
LOCAL_C_INCLUDES += $(UPNP_DIR)
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/ixml/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/src/threadutil
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/threadutil/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/src/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/build/inc
LOCAL_C_INCLUDES += vendor/platform/secure_c/include
#for ndk build
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/ixml/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/threadutil/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/src/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/build/inc
LOCAL_SHARED_LIBRARIES := libuapi_securec libcutils
include $(BUILD_STATIC_LIBRARY)
############################### libdlna_common.a end ###############################
############################## libvppdlna.so begin ##############################
include $(CLEAR_VARS)
LOCAL_MODULE := libvppdlna
LOCAL_MULTILIB := both
LOCAL_MODULE_TAGS := optional
LOCAL_PRELINK_MODULE := false
LOCAL_STRIP_MODULE :=true
LOCAL_CFLAGS := -fno-common -Wdate-time -Wextra -Wfloat-equal -Wformat=2 -Wshadow
LOCAL_LDFLAGS := -Wl,-Bsymbolic -rdynamic -Wl,--no-undefined
LOCAL_CFLAGS += -O2
LOCAL_CFLAGS += -D_FORTIFY_SOURCE=2
LOCAL_CFLAGS += -fstack-protector-all
#LOCAL_CFLAGS += -fpermissive
LOCAL_LDFLAGS += -s -Wl,-z,now -fpic -Wl,-z,relro
#Module1:COMMON
DLNA_SOURCES := source/include/fork_dlna_api.c
#Module2:DMR
DLNA_SOURCES += source/src/dmr/dlnadmr.c
DLNA_SOURCES += source/src/dmr/dlnadmrcms.c
DLNA_SOURCES += source/src/dmr/dlnadmravt.c
DLNA_SOURCES += source/src/dmr/dlnadmrrcs.c
DLNA_SOURCES += source/src/dmr/dlnadmrservices.c
#Module3:DMP
DLNA_SOURCES += source/src/dmp/dlnadmpcds.c
DLNA_SOURCES += source/src/dmp/dlnadmp.c
DLNA_SOURCES += source/src/dmp_dl/sample_util.c
DLNA_SOURCES += source/src/dmp_dl/upnp_ctrlpt.c
#Module4:DMS
DLNA_SOURCES += source/src/dms/dlnadms.c
DLNA_SOURCES += source/src/dms/dlnadmscds.c
DLNA_SOURCES += source/src/dms/dlnadmscms.c
DLNA_SOURCES += source/src/dms/dlnadmscontent.c
DLNA_SOURCES += source/src/dms/dlnadmsservices.c
DLNA_SOURCES += source/src/dms/dlnadmsdirmonitor.c
LOCAL_SRC_FILES := $(DLNA_SOURCES)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/source/src/common
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/src/dmr
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/src/dmp
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/src/dmp_dl
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/src/dms
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/include
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/src/include
LOCAL_C_INCLUDES += $(LOCAL_PATH)/source/src/dlna_server/include
LOCAL_C_INCLUDES += $(UPNP_DIR)
LOCAL_C_INCLUDES += $(UPNP_DIR)/build/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/ixml/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/ixml/src/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/api
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/src/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/src/threadutil
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/threadutil/inc
LOCAL_C_INCLUDES += vendor/platform/secure_c/include
#for ndk build
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/ixml/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/threadutil/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/src/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/build/inc
LOCAL_STATIC_LIBRARIES := libdlna_common
LOCAL_LDFLAGS:=-llog
LOCAL_SHARED_LIBRARIES += libupnp libixml
LOCAL_SHARED_LIBRARIES += libuapi_securec libcutils
include $(BUILD_SHARED_LIBRARY)
############################### libvppdlna.so end ###############################
#ifeq ($(CFG_DL_DLNA_DMS_SUPPORT), y)
############################## libdms_jni.so begin ##############################
include $(CLEAR_VARS)
LOCAL_MODULE := libdms_jni
LOCAL_MULTILIB := both
LOCAL_MODULE_TAGS := optional
LOCAL_PRELINK_MODULE := false
LOCAL_STRIP_MODULE :=true
LOCAL_CFLAGS := -fno-common -Wdate-time -Wextra -Wfloat-equal -Wformat=2 -Wshadow
LOCAL_CFLAGS += -O2
LOCAL_CFLAGS += -D_FORTIFY_SOURCE=2
LOCAL_CFLAGS += -fstack-protector-all
LOCAL_CPPFLAGS += -O2
LOCAL_CPPFLAGS += -D_FORTIFY_SOURCE=2
LOCAL_CPPFLAGS += -fstack-protector-all
LOCAL_LDFLAGS += -s -Wl,-z,now -fpic -Wl,-z,relro
LOCAL_HEADER_LIBRARIES := jni_headers
LOCAL_SRC_FILES := android/jni/fork_dms.c
LOCAL_SRC_FILES += android/jni/safety_util.c
LOCAL_SRC_FILES += android/jni/jnicommon.c
LOCAL_SRC_FILES += android/jni/com_huanglong_dlna_dms_DMSNative.cpp
LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
LOCAL_C_INCLUDES += $(VPP_DIR)/include
LOCAL_C_INCLUDES += $(VPP_DIR)/src/common
LOCAL_C_INCLUDES += $(VPP_DIR)/src/include
LOCAL_C_INCLUDES += $(UPNP_DIR)
LOCAL_C_INCLUDES += $(UPNP_DIR)/build/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/ixml/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/api
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/src/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/threadutil/inc
LOCAL_C_INCLUDES += vendor/platform/secure_c/include
#for ndk
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/build/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/ixml/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/api
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/src/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/threadutil/inc
LOCAL_C_INCLUDES += $(NDK_VPP_DIR)/include
LOCAL_C_INCLUDES += $(NDK_VPP_DIR)/src/common
LOCAL_C_INCLUDES += $(NDK_VPP_DIR)/src/include
LOCAL_SHARED_LIBRARIES := libutils libcutils liblog
LOCAL_SHARED_LIBRARIES += libupnp libvppdlna libuapi_securec
include $(BUILD_SHARED_LIBRARY)
############################### libdms_jni.so end ###############################
############################## libdmr_jni.so begin ##############################
include $(CLEAR_VARS)
LOCAL_MODULE := libdmr_jni
LOCAL_MULTILIB := both
LOCAL_MODULE_TAGS := optional
LOCAL_PRELINK_MODULE := false
LOCAL_STRIP_MODULE :=true
LOCAL_CFLAGS := -fno-common -Wdate-time -Wextra -Wfloat-equal -Wformat=2 -Wshadow
LOCAL_CFLAGS += -O2
LOCAL_CFLAGS += -D_FORTIFY_SOURCE=2
LOCAL_CFLAGS += -fstack-protector-all
LOCAL_CPPFLAGS += -O2
LOCAL_CPPFLAGS += -D_FORTIFY_SOURCE=2
LOCAL_CPPFLAGS += -fstack-protector-all
LOCAL_LDFLAGS += -s -Wl,-z,now -fpic -Wl,-z,relro
LOCAL_HEADER_LIBRARIES := jni_headers
LOCAL_SRC_FILES := android/jni/com_huanglong_dlna_dmr_DMRNative.cpp
LOCAL_SRC_FILES += android/jni/safety_util.c
LOCAL_SRC_FILES += android/jni/jnicommon.c
LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
LOCAL_C_INCLUDES += $(VPP_DIR)/include
LOCAL_C_INCLUDES += $(VPP_DIR)/include
LOCAL_C_INCLUDES += $(VPP_DIR)/src/common
LOCAL_C_INCLUDES += $(VPP_DIR)/src/include
LOCAL_C_INCLUDES += $(UPNP_DIR)
LOCAL_C_INCLUDES += $(UPNP_DIR)/build/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/ixml/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/api
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/src/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/threadutil/inc
#for ndk
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/build/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/ixml/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/api
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/src/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/threadutil/inc
LOCAL_C_INCLUDES += $(NDK_VPP_DIR)/include
LOCAL_C_INCLUDES += $(NDK_VPP_DIR)/src/common
LOCAL_C_INCLUDES += $(NDK_VPP_DIR)/src/include
LOCAL_C_INCLUDES += vendor/platform/secure_c/include
LOCAL_SHARED_LIBRARIES += libupnp
LOCAL_SHARED_LIBRARIES += libvppdlna
LOCAL_SHARED_LIBRARIES += libutils
LOCAL_SHARED_LIBRARIES += libcutils
LOCAL_SHARED_LIBRARIES += liblog
LOCAL_SHARED_LIBRARIES += libuapi_securec
include $(BUILD_SHARED_LIBRARY)
############################### libdmr_jni.so end ###############################
############################## libdmp_jni.so begin ##############################
include $(CLEAR_VARS)
LOCAL_MODULE := libdmp_jni
LOCAL_MULTILIB := both
LOCAL_MODULE_TAGS := optional
LOCAL_PRELINK_MODULE := false
LOCAL_STRIP_MODULE :=true
LOCAL_CFLAGS := -fno-common -Wdate-time -Wextra -Wfloat-equal -Wformat=2 -Wshadow
LOCAL_CFLAGS += -O2
LOCAL_CFLAGS += -D_FORTIFY_SOURCE=2
LOCAL_CFLAGS += -fstack-protector-all
LOCAL_CPPFLAGS += -O2
LOCAL_CPPFLAGS += -D_FORTIFY_SOURCE=2
LOCAL_CPPFLAGS += -fstack-protector-all
LOCAL_LDFLAGS += -s -Wl,-z,now -fpic -Wl,-z,relro
LOCAL_HEADER_LIBRARIES := jni_headers
LOCAL_SRC_FILES := android/jni/fork_dmc.c
LOCAL_SRC_FILES += android/jni/safety_util.c
LOCAL_SRC_FILES += android/jni/jnicommon.c
LOCAL_SRC_FILES += android/jni/com_huanglong_dlna_dmp_DMPNative.cpp
LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
LOCAL_C_INCLUDES += $(UPNP_DIR)
LOCAL_C_INCLUDES += $(UPNP_DIR)/build/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/ixml/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/api
LOCAL_C_INCLUDES += $(UPNP_DIR)/upnp/src/inc
LOCAL_C_INCLUDES += $(UPNP_DIR)/threadutil/inc
LOCAL_C_INCLUDES += $(VPP_DIR)/include
LOCAL_C_INCLUDES += $(VPP_DIR)/src/common
LOCAL_C_INCLUDES += $(VPP_DIR)/src/include
LOCAL_C_INCLUDES += vendor/platform/secure_c/include
#for ndk
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/build/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/ixml/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/api
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/upnp/src/inc
LOCAL_C_INCLUDES += $(NDK_UPNP_DIR)/threadutil/inc
LOCAL_C_INCLUDES += $(NDK_VPP_DIR)/include
LOCAL_C_INCLUDES += $(NDK_VPP_DIR)/src/common
LOCAL_C_INCLUDES += $(NDK_VPP_DIR)/src/include
LOCAL_SHARED_LIBRARIES := libutils libcutils liblog
LOCAL_SHARED_LIBRARIES += libupnp libixml libvppdlna libuapi_securec
include $(BUILD_SHARED_LIBRARY)
############################### libdmp_jni.so end ###############################