define common header path for gstreamer.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
$(NNSTREAMER_CAPI_INCLUDES)
# common headers (gstreamer, glib)
-LOCAL_C_INCLUDES += \
- $(GSTREAMER_ROOT)/include/gstreamer-1.0 \
- $(GSTREAMER_ROOT)/include/glib-2.0 \
- $(GSTREAMER_ROOT)/lib/glib-2.0/include \
- $(GSTREAMER_ROOT)/include
+LOCAL_C_INCLUDES += $(GST_HEADERS_COMMON)
# common headers (tensorflow-lite)
-LOCAL_C_INCLUDES += \
- $(TF_LITE_INCLUDES)
+LOCAL_C_INCLUDES += $(TF_LITE_INCLUDES)
LOCAL_CFLAGS += -O2 -DVERSION=\"$(NNSTREAMER_VERSION)\"
LOCAL_CXXFLAGS += -std=c++11 -O2 -DVERSION=\"$(NNSTREAMER_VERSION)\"
NNSTREAMER_ROOT := $(LOCAL_PATH)/..
endif
-include $(LOCAL_PATH)/nnstreamer.mk
-
CUSTOM_LINKER64 := -fPIE -pie -Wl,-dynamic-linker,/data/nnstreamer/libandroid/linker64
# Do not specify "TARGET_ARCH_ABI" in this file. If you want to append additional architecture,
$(error Target arch ABI not supported: $(TARGET_ARCH_ABI))
endif
+# Common definition for NNStreamer
+include $(LOCAL_PATH)/nnstreamer.mk
+
# Define shared libraries that are required by a gstreamer plug-in.
define shared_lib_common
include $(CLEAR_VARS)
LOCAL_C_INCLUDES := $(NNSTREAMER_INCLUDES)
LOCAL_SHARED_LIBRARIES := $(BUILDING_BLOCK_LIST)
-LOCAL_C_INCLUDES += $(GSTREAMER_ROOT)/include/gstreamer-1.0 \
- $(GSTREAMER_ROOT)/include/glib-2.0 \
- $(GSTREAMER_ROOT)/lib/glib-2.0/include \
- $(GSTREAMER_ROOT)/include
+LOCAL_C_INCLUDES += $(GST_HEADERS_COMMON)
GSTREAMER_ANDROID_INCLUDE := $(GSTREAMER_ROOT)/include
NNSTREAMER_ROOT := $(LOCAL_PATH)/..
endif
-include $(LOCAL_PATH)/nnstreamer.mk
-
# Do not specify "TARGET_ARCH_ABI" in this file. If you want to append additional architecture,
# Please append an architecture name behind "APP_ABI" in Application.mk file.
$(error Target arch ABI not supported: $(TARGET_ARCH_ABI))
endif
+# Common definition for NNStreamer
+include $(LOCAL_PATH)/nnstreamer.mk
+
# Define shared libraries that are required by a gstreamer plug-in.
define shared_lib_common
include $(CLEAR_VARS)
BUILDING_BLOCK_LIST += gstaudio-1.0 gstbadaudio-1.0 gstaudioconvert gstaudiomixer gstaudiorate gstaudioresample gstaudiotestsrc
endif
-LOCAL_C_INCLUDES += $(GSTREAMER_ROOT)/include/gstreamer-1.0 \
- $(GSTREAMER_ROOT)/include/glib-2.0 \
- $(GSTREAMER_ROOT)/lib/glib-2.0/include \
- $(GSTREAMER_ROOT)/include
+LOCAL_C_INCLUDES += $(GST_HEADERS_COMMON)
LOCAL_SHARED_LIBRARIES := $(BUILDING_BLOCK_LIST)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-include $(LOCAL_PATH)/nnstreamer.mk
-
ifndef NNSTREAMER_ROOT
NNSTREAMER_ROOT := $(LOCAL_PATH)/..
endif
$(error Target arch ABI not supported: $(TARGET_ARCH_ABI))
endif
+# Common definition for NNStreamer
+include $(LOCAL_PATH)/nnstreamer.mk
+
# Define shared libraries that are required by a gstreamer plug-in.
define shared_lib_common
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(NNSTREAMER_COMMON_SRCS) $(NNSTREAMER_PLUGINS_SRCS)
LOCAL_C_INCLUDES := $(NNSTREAMER_INCLUDES)
-LOCAL_C_INCLUDES += $(GSTREAMER_ROOT)/include/gstreamer-1.0 \
- $(GSTREAMER_ROOT)/include/glib-2.0 \
- $(GSTREAMER_ROOT)/lib/glib-2.0/include \
- $(GSTREAMER_ROOT)/include
+LOCAL_C_INCLUDES += $(GST_HEADERS_COMMON)
LOCAL_SHARED_LIBRARIES := $(GST_BUILDING_BLOCK_LIST)
LOCAL_CXXFLAGS += -DVERSION=\"$(NNSTREAMER_VERSION)\"
LOCAL_CFLAGS += -pthread -fopenmp
-LOCAL_C_INCLUDES += $(GSTREAMER_ROOT)/include/gstreamer-1.0 \
- $(GSTREAMER_ROOT)/include/glib-2.0 \
- $(GSTREAMER_ROOT)/lib/glib-2.0/include \
- $(GSTREAMER_ROOT)/include
+LOCAL_C_INCLUDES += $(GST_HEADERS_COMMON)
include $(BUILD_SHARED_LIBRARY)
LOCAL_CXXFLAGS += -std=c++11 -DVERSION=\"$(NNSTREAMER_VERSION)\"
LOCAL_CFLAGS += -pthread -fopenmp
-LOCAL_C_INCLUDES += $(GSTREAMER_ROOT)/include/gstreamer-1.0 \
- $(GSTREAMER_ROOT)/include/glib-2.0 \
- $(GSTREAMER_ROOT)/lib/glib-2.0/include \
- $(GSTREAMER_ROOT)/include
+LOCAL_C_INCLUDES += $(GST_HEADERS_COMMON)
include $(BUILD_SHARED_LIBRARY)
LOCAL_CXXFLAGS += -std=c++11 -DVERSION=\"$(NNSTREAMER_VERSION)\"
LOCAL_CFLAGS += -pthread -fopenmp
-LOCAL_C_INCLUDES += $(GSTREAMER_ROOT)/include/gstreamer-1.0 \
- $(GSTREAMER_ROOT)/include/glib-2.0 \
- $(GSTREAMER_ROOT)/lib/glib-2.0/include \
- $(GSTREAMER_ROOT)/include
+LOCAL_C_INCLUDES += $(GST_HEADERS_COMMON)
include $(BUILD_SHARED_LIBRARY)
LOCAL_CXXFLAGS += -std=c++11 -DVERSION=\"$(NNSTREAMER_VERSION)\"
LOCAL_CFLAGS += -pthread -fopenmp
-LOCAL_C_INCLUDES += $(GSTREAMER_ROOT)/include/gstreamer-1.0 \
- $(GSTREAMER_ROOT)/include/glib-2.0 \
- $(GSTREAMER_ROOT)/lib/glib-2.0/include \
- $(GSTREAMER_ROOT)/include
+LOCAL_C_INCLUDES += $(GST_HEADERS_COMMON)
include $(BUILD_SHARED_LIBRARY)
LOCAL_CXXFLAGS += -std=c++11 -DVERSION=\"$(NNSTREAMER_VERSION)\"
LOCAL_CFLAGS += -pthread -fopenmp
-LOCAL_C_INCLUDES += $(GSTREAMER_ROOT)/include/gstreamer-1.0 \
- $(GSTREAMER_ROOT)/include/glib-2.0 \
- $(GSTREAMER_ROOT)/lib/glib-2.0/include \
- $(GSTREAMER_ROOT)/include
+LOCAL_C_INCLUDES += $(GST_HEADERS_COMMON)
include $(BUILD_SHARED_LIBRARY)
# This mk file defines common features to build NNStreamer library for Android.
ifndef NNSTREAMER_ROOT
-$(warning NNSTREAMER_ROOT is not defined! Using $(LOCAL_PATH)/.. )
-NNSTREAMER_ROOT := $(LOCAL_PATH)/..
+$(error NNSTREAMER_ROOT is not defined!)
+endif
+
+ifndef GSTREAMER_ROOT_ANDROID
+$(error GSTREAMER_ROOT_ANDROID is not defined!)
endif
NNSTREAMER_VERSION := 1.0.0
ENABLE_NNAPI :=false
+GST_HEADERS_COMMON := \
+ $(GSTREAMER_ROOT)/include/gstreamer-1.0 \
+ $(GSTREAMER_ROOT)/include/glib-2.0 \
+ $(GSTREAMER_ROOT)/lib/glib-2.0/include \
+ $(GSTREAMER_ROOT)/include
+
GST_LIBS_COMMON := gstreamer-1.0 gstbase-1.0 gstvideo-1.0 glib-2.0 \
gobject-2.0 intl z bz2 orc-0.4 gmodule-2.0 gsttag-1.0 iconv \
gstapp-1.0 png16 gio-2.0 pangocairo-1.0 \