Re #1937: Added libyuv build configs for GNU build systems.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5361 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
82d6857fd9
commit
5a0186f493
196
aconfigure
196
aconfigure
|
@ -622,6 +622,7 @@ ac_subst_vars='LTLIBOBJS
|
|||
LIBOBJS
|
||||
ac_main_obj
|
||||
ac_host
|
||||
ac_no_yuv
|
||||
opus_present
|
||||
opus_h_present
|
||||
ac_no_opus
|
||||
|
@ -642,8 +643,6 @@ openssl_h_present
|
|||
ac_no_ssl
|
||||
ac_webrtc_ldflags
|
||||
ac_webrtc_cflags
|
||||
ac_libyuv_ldflags
|
||||
ac_libyuv_cflags
|
||||
ac_openh264_ldflags
|
||||
ac_openh264_cflags
|
||||
ac_v4l2_ldflags
|
||||
|
@ -682,6 +681,7 @@ ac_pa_cflags
|
|||
ac_external_pa
|
||||
ac_pjmedia_snd
|
||||
ac_pjmedia_resample
|
||||
ac_external_yuv
|
||||
ac_srtp_shutdown_present
|
||||
ac_srtp_deinit_present
|
||||
ac_external_srtp
|
||||
|
@ -779,6 +779,7 @@ enable_shared
|
|||
with_external_speex
|
||||
with_external_gsm
|
||||
with_external_srtp
|
||||
with_external_yuv
|
||||
enable_resample
|
||||
enable_sound
|
||||
with_external_pa
|
||||
|
@ -804,8 +805,6 @@ enable_ffmpeg
|
|||
enable_v4l2
|
||||
with_openh264
|
||||
enable_openh264
|
||||
with_libyuv
|
||||
enable_libyuv
|
||||
with_webrtc
|
||||
enable_webrtc
|
||||
enable_ipp
|
||||
|
@ -822,6 +821,7 @@ with_silk
|
|||
enable_silk
|
||||
with_opus
|
||||
enable_opus
|
||||
enable_libyuv
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
host_alias
|
||||
|
@ -1474,7 +1474,6 @@ Optional Features:
|
|||
--disable-ffmpeg Disable ffmpeg (default: not disabled)
|
||||
--disable-v4l2 Disable Video4Linux2 (default: not disabled)
|
||||
--disable-openh264 Disable OpenH264 (default: not disabled)
|
||||
--disable-libyuv Exclude libyuv in the build
|
||||
--disable-webrtc Exclude webrtc in the build
|
||||
--enable-ipp Enable Intel IPP support. Specify the Intel IPP
|
||||
package and samples location using IPPROOT and
|
||||
|
@ -1491,6 +1490,7 @@ Optional Features:
|
|||
--disable-opus Exclude OPUS support from the build (default:
|
||||
autodetect)
|
||||
|
||||
--disable-libyuv Exclude libyuv in the build
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
|
@ -1510,6 +1510,11 @@ Optional Packages:
|
|||
make sure that SRTP is accessible to use (hint: use
|
||||
CFLAGS and LDFLAGS env var to set the include/lib
|
||||
paths)
|
||||
--with-external-yuv Use external libyuv development files, not the one
|
||||
in "third_party" directory. When this option is set,
|
||||
make sure that libyuv is accessible to use (hint:
|
||||
use CFLAGS and LDFLAGS env var to set the
|
||||
include/lib paths)
|
||||
--with-external-pa Use external PortAudio development files, not the
|
||||
one in "third_party" directory. When this option is
|
||||
set, make sure that PortAudio is accessible to use
|
||||
|
@ -1518,7 +1523,6 @@ Optional Packages:
|
|||
--with-sdl=DIR Specify alternate libSDL prefix
|
||||
--with-ffmpeg=DIR Specify alternate FFMPEG prefix
|
||||
--with-openh264=DIR Specify alternate OpenH264 prefix
|
||||
--with-libyuv=DIR Specify alternate libyuv prefix
|
||||
--with-webrtc=DIR Specify alternate WebRtc prefix
|
||||
--with-ipp=DIR Specify the Intel IPP location
|
||||
--with-ipp-samples=DIR Specify the Intel IPP samples location
|
||||
|
@ -6049,6 +6053,44 @@ fi
|
|||
fi
|
||||
fi
|
||||
|
||||
|
||||
ac_external_yuv=0
|
||||
|
||||
|
||||
# Check whether --with-external-yuv was given.
|
||||
if test "${with_external_yuv+set}" = set; then :
|
||||
withval=$with_external_yuv;
|
||||
if test "x$with_external_yuv" != "xno"; then
|
||||
# Test libyuv installation
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if external libyuv devkit is installed" >&5
|
||||
$as_echo_n "checking if external libyuv devkit is installed... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <libyuv.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
RGB24ToI420(0,0,0,0,0,0,0,0,0,0);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5
|
||||
$as_echo "yes!!" >&6; }
|
||||
ac_external_yuv="1"
|
||||
|
||||
else
|
||||
as_fn_error $? "Unable to use external libyuv. If libyuv development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
ac_pjmedia_resample=libresample
|
||||
|
||||
# Check whether --enable-resample was given.
|
||||
|
@ -6212,6 +6254,13 @@ fi
|
|||
|
||||
|
||||
|
||||
# Disable video on mingw
|
||||
case $target in
|
||||
*mingw*)
|
||||
enable_video="no"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check whether --enable-video was given.
|
||||
if test "${enable_video+set}" = set; then :
|
||||
enableval=$enable_video; if test "$enable_video" = "no"; then
|
||||
|
@ -6870,6 +6919,7 @@ $as_echo_n "checking ffmpeg packages... " >&6; }
|
|||
if $PKG_CONFIG --exists libswscale; then
|
||||
ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1"
|
||||
av_pkg="$av_pkg libswscale"
|
||||
enable_libyuv="no"
|
||||
fi
|
||||
if $PKG_CONFIG --exists libavutil; then
|
||||
ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1"
|
||||
|
@ -7108,6 +7158,7 @@ $as_echo "$ac_cv_lib_swscale_sws_scale" >&6; }
|
|||
if test "x$ac_cv_lib_swscale_sws_scale" = xyes; then :
|
||||
ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1"
|
||||
ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lswscale"
|
||||
enable_libyuv="no"
|
||||
|
||||
fi
|
||||
|
||||
|
@ -7326,123 +7377,6 @@ fi
|
|||
|
||||
|
||||
|
||||
# Check whether --with-libyuv was given.
|
||||
if test "${with_libyuv+set}" = set; then :
|
||||
withval=$with_libyuv;
|
||||
else
|
||||
with_libyuv=no
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if test "x$ac_cross_compile" != "x" -a "x$with_libyuv" = "xno"; then
|
||||
enable_libyuv=no
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --enable-libyuv was given.
|
||||
if test "${enable_libyuv+set}" = set; then :
|
||||
enableval=$enable_libyuv; if test "$enable_libyuv" = "no"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if libyuv is disabled...yes" >&5
|
||||
$as_echo "Checking if libyuv is disabled...yes" >&6; }
|
||||
fi
|
||||
else
|
||||
|
||||
if test "x$with_libyuv" != "xno" -a "x$with_libyuv" != "x"; then
|
||||
LIBYUV_PREFIX=$with_libyuv
|
||||
LIBYUV_CFLAGS="-I$LIBYUV_PREFIX/include"
|
||||
|
||||
case $target in
|
||||
*-apple-darwin_ios*)
|
||||
LIBYUV_LDFLAGS="-L$LIBYUV_PREFIX/out_ios/Release-iphoneos"
|
||||
case $ARCH in
|
||||
*arm*)
|
||||
LIBYUV_LIBS="-lyuv_neon"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*mingw* | *cygw* | *win32* | *w32* | *darwin* | *linux* | *android*)
|
||||
LIBYUV_LDFLAGS="-L$LIBYUV_PREFIX/out/Release"
|
||||
;;
|
||||
*)
|
||||
LIBYUV_CFLAGS=""
|
||||
LIBYUV_LDFLAGS=""
|
||||
;;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Using libyuv prefix... $with_libyuv" >&5
|
||||
$as_echo "Using libyuv prefix... $with_libyuv" >&6; }
|
||||
else
|
||||
LIBYUV_CFLAGS=""
|
||||
LIBYUV_LDFLAGS=""
|
||||
fi
|
||||
|
||||
LIBYUV_LIBS="$LIBYUV_LIBS -lyuv"
|
||||
|
||||
SAVED_LIBS="$LIBS"
|
||||
SAVED_LDFLAGS="$LDFLAGS"
|
||||
SAVED_CFLAGS="$CFLAGS"
|
||||
|
||||
LIBS="$LIBYUV_LIBS $LIBS"
|
||||
LDFLAGS="$LIBYUV_LDFLAGS $LDFLAGS"
|
||||
CFLAGS="$LIBYUV_CFLAGS $CFLAGS"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for I420Scale in -lyuv" >&5
|
||||
$as_echo_n "checking for I420Scale in -lyuv... " >&6; }
|
||||
if ${ac_cv_lib_yuv_I420Scale+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lyuv
|
||||
$LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char I420Scale ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return I420Scale ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_yuv_I420Scale=yes
|
||||
else
|
||||
ac_cv_lib_yuv_I420Scale=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_yuv_I420Scale" >&5
|
||||
$as_echo "$ac_cv_lib_yuv_I420Scale" >&6; }
|
||||
if test "x$ac_cv_lib_yuv_I420Scale" = xyes; then :
|
||||
ac_libyuv_cflags="-DPJMEDIA_HAS_LIBYUV=1 $LIBYUV_CFLAGS"
|
||||
ac_libyuv_ldflags="$LIBYUV_LDFLAGS $LIBYUV_LIBS"
|
||||
|
||||
else
|
||||
LIBS="$SAVED_LIBS"
|
||||
LDFLAGS="$SAVED_LDFLAGS"
|
||||
CFLAGS="$SAVED_CFLAGS"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-webrtc was given.
|
||||
if test "${with_webrtc+set}" = set; then :
|
||||
|
@ -8444,6 +8378,22 @@ fi
|
|||
|
||||
|
||||
|
||||
# Check whether --enable-libyuv was given.
|
||||
if test "${enable_libyuv+set}" = set; then :
|
||||
enableval=$enable_libyuv; if test "$enable_libyuv" = "no"; then
|
||||
ac_no_yuv=1,
|
||||
$as_echo "#define PJMEDIA_HAS_LIBYUV 0" >>confdefs.h
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if libyuv is disabled...yes" >&5
|
||||
$as_echo "Checking if libyuv is disabled...yes" >&6; }
|
||||
fi
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if libyuv is disabled...no" >&5
|
||||
$as_echo "Checking if libyuv is disabled...no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if select() needs correct nfds" >&5
|
||||
|
|
119
aconfigure.ac
119
aconfigure.ac
|
@ -568,6 +568,27 @@ if test "x$ac_external_srtp" = "x1"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
|
||||
dnl # Use external libyuv installation
|
||||
AC_SUBST(ac_external_yuv,0)
|
||||
AC_ARG_WITH(external-yuv,
|
||||
AS_HELP_STRING([--with-external-yuv],
|
||||
[Use external libyuv development files, not the one in "third_party" directory. When this option is set, make sure that libyuv is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]),
|
||||
[
|
||||
if test "x$with_external_yuv" != "xno"; then
|
||||
# Test libyuv installation
|
||||
AC_MSG_CHECKING([if external libyuv devkit is installed])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libyuv.h>]],
|
||||
[RGB24ToI420(0,0,0,0,0,0,0,0,0,0);])],
|
||||
[AC_MSG_RESULT(yes!!)
|
||||
ac_external_yuv="1"
|
||||
],
|
||||
[AC_MSG_ERROR([Unable to use external libyuv. If libyuv development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])])
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
dnl # Resample implementation
|
||||
AC_SUBST(ac_pjmedia_resample,libresample)
|
||||
AC_ARG_ENABLE(resample,
|
||||
|
@ -685,6 +706,13 @@ fi
|
|||
|
||||
AC_SUBST(ac_pjmedia_video)
|
||||
|
||||
# Disable video on mingw
|
||||
case $target in
|
||||
*mingw*)
|
||||
enable_video="no"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl # --disable-video option
|
||||
AC_ARG_ENABLE(video,
|
||||
AS_HELP_STRING([--disable-video],
|
||||
|
@ -1037,6 +1065,8 @@ AC_ARG_ENABLE(ffmpeg,
|
|||
if $PKG_CONFIG --exists libswscale; then
|
||||
ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1"
|
||||
av_pkg="$av_pkg libswscale"
|
||||
dnl # disable libyuv when libswscale is enabled
|
||||
enable_libyuv="no"
|
||||
fi
|
||||
if $PKG_CONFIG --exists libavutil; then
|
||||
ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1"
|
||||
|
@ -1095,6 +1125,7 @@ AC_ARG_ENABLE(ffmpeg,
|
|||
sws_scale,
|
||||
[ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1"
|
||||
ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lswscale"
|
||||
enable_libyuv="no"
|
||||
],
|
||||
[],
|
||||
[-lavutil]
|
||||
|
@ -1205,82 +1236,6 @@ AC_ARG_ENABLE(openh264,
|
|||
|
||||
])
|
||||
|
||||
dnl # libyuv alt prefix
|
||||
AC_ARG_WITH(libyuv,
|
||||
AS_HELP_STRING([--with-libyuv=DIR],
|
||||
[Specify alternate libyuv prefix]),
|
||||
[],
|
||||
[with_libyuv=no]
|
||||
)
|
||||
|
||||
dnl # Do not use default libyuv installation if we are cross-compiling
|
||||
if test "x$ac_cross_compile" != "x" -a "x$with_libyuv" = "xno"; then
|
||||
enable_libyuv=no
|
||||
fi
|
||||
|
||||
dnl # Include libyuv
|
||||
AC_SUBST(ac_libyuv_cflags)
|
||||
AC_SUBST(ac_libyuv_ldflags)
|
||||
AC_ARG_ENABLE(libyuv,
|
||||
AS_HELP_STRING([--disable-libyuv],
|
||||
[Exclude libyuv in the build]),
|
||||
[if test "$enable_libyuv" = "no"; then
|
||||
AC_MSG_RESULT([Checking if libyuv is disabled...yes])
|
||||
fi],
|
||||
[
|
||||
if test "x$with_libyuv" != "xno" -a "x$with_libyuv" != "x"; then
|
||||
LIBYUV_PREFIX=$with_libyuv
|
||||
LIBYUV_CFLAGS="-I$LIBYUV_PREFIX/include"
|
||||
|
||||
case $target in
|
||||
*-apple-darwin_ios*)
|
||||
LIBYUV_LDFLAGS="-L$LIBYUV_PREFIX/out_ios/Release-iphoneos"
|
||||
case $ARCH in
|
||||
*arm*)
|
||||
LIBYUV_LIBS="-lyuv_neon"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*mingw* | *cygw* | *win32* | *w32* | *darwin* | *linux* | *android*)
|
||||
LIBYUV_LDFLAGS="-L$LIBYUV_PREFIX/out/Release"
|
||||
;;
|
||||
*)
|
||||
LIBYUV_CFLAGS=""
|
||||
LIBYUV_LDFLAGS=""
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_RESULT([Using libyuv prefix... $with_libyuv])
|
||||
else
|
||||
LIBYUV_CFLAGS=""
|
||||
LIBYUV_LDFLAGS=""
|
||||
fi
|
||||
|
||||
LIBYUV_LIBS="$LIBYUV_LIBS -lyuv"
|
||||
|
||||
SAVED_LIBS="$LIBS"
|
||||
SAVED_LDFLAGS="$LDFLAGS"
|
||||
SAVED_CFLAGS="$CFLAGS"
|
||||
|
||||
LIBS="$LIBYUV_LIBS $LIBS"
|
||||
LDFLAGS="$LIBYUV_LDFLAGS $LDFLAGS"
|
||||
CFLAGS="$LIBYUV_CFLAGS $CFLAGS"
|
||||
|
||||
AC_CHECK_LIB(yuv,
|
||||
I420Scale,
|
||||
[ ac_libyuv_cflags="-DPJMEDIA_HAS_LIBYUV=1 $LIBYUV_CFLAGS"
|
||||
ac_libyuv_ldflags="$LIBYUV_LDFLAGS $LIBYUV_LIBS"
|
||||
],
|
||||
[ LIBS="$SAVED_LIBS"
|
||||
LDFLAGS="$SAVED_LDFLAGS"
|
||||
CFLAGS="$SAVED_CFLAGS"
|
||||
],
|
||||
[]
|
||||
)
|
||||
])
|
||||
|
||||
|
||||
dnl # WebRtc alt prefix
|
||||
AC_ARG_WITH(webrtc,
|
||||
|
@ -1834,6 +1789,18 @@ AC_ARG_ENABLE(opus,
|
|||
fi
|
||||
])
|
||||
|
||||
dnl # Include libyuv
|
||||
AC_SUBST(ac_no_yuv)
|
||||
AC_ARG_ENABLE(libyuv,
|
||||
AS_HELP_STRING([--disable-libyuv],
|
||||
[Exclude libyuv in the build]),
|
||||
[if test "$enable_libyuv" = "no"; then
|
||||
[ac_no_yuv=1],
|
||||
AC_DEFINE(PJMEDIA_HAS_LIBYUV,0)
|
||||
AC_MSG_RESULT([Checking if libyuv is disabled...yes])
|
||||
fi],
|
||||
AC_MSG_RESULT([Checking if libyuv is disabled...no]))
|
||||
|
||||
|
||||
dnl ##########################################
|
||||
dnl #
|
||||
|
|
23
build.mak.in
23
build.mak.in
|
@ -121,6 +121,21 @@ endif
|
|||
endif
|
||||
endif
|
||||
|
||||
ifneq (@ac_no_yuv@,1)
|
||||
ifeq (@ac_external_yuv@,1)
|
||||
APP_THIRD_PARTY_EXT += -lyuv
|
||||
else
|
||||
APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libyuv-$(LIB_SUFFIX)
|
||||
ifeq ($(PJ_SHARED_LIBRARIES),)
|
||||
APP_THIRD_PARTY_LIBS += -lyuv-$(TARGET_NAME)
|
||||
else
|
||||
APP_THIRD_PARTY_LIBS += -lyuv
|
||||
APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libyuv.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/third_party/lib/libyuv.$(SHLIB_SUFFIX)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# Additional flags
|
||||
@ac_build_mak_vars@
|
||||
|
||||
|
@ -157,15 +172,11 @@ DARWIN_CFLAGS = @ac_darwin_cflags@
|
|||
# Android
|
||||
ANDROID_CFLAGS = @ac_android_cflags@
|
||||
|
||||
# libyuv
|
||||
LIBYUV_CFLAGS = @ac_libyuv_cflags@
|
||||
LIBYUV_LDFLAGS = @ac_libyuv_ldflags@
|
||||
|
||||
# PJMEDIA features exclusion
|
||||
PJ_VIDEO_CFLAGS += $(SDL_CFLAGS) $(FFMPEG_CFLAGS) $(V4L2_CFLAGS) $(QT_CFLAGS) \
|
||||
$(OPENH264_CFLAGS) $(DARWIN_CFLAGS) $(LIBYUV_CFLAGS)
|
||||
$(OPENH264_CFLAGS) $(DARWIN_CFLAGS)
|
||||
PJ_VIDEO_LDFLAGS += $(SDL_LDFLAGS) $(FFMPEG_LDFLAGS) $(V4L2_LDFLAGS) \
|
||||
$(OPENH264_LDFLAGS) $(LIBYUV_LDFLAGS)
|
||||
$(OPENH264_LDFLAGS)
|
||||
|
||||
# CFLAGS, LDFLAGS, and LIBS to be used by applications
|
||||
export APP_CC := @CC@
|
||||
|
|
|
@ -51,7 +51,7 @@ OBJDIRS := $(sort $(dir $(OBJS)))
|
|||
#
|
||||
# FULL_SRCS is ../src/app/file1.c ../src/app/file1.S
|
||||
#
|
||||
FULL_SRCS = $(foreach file, $($(APP)_OBJS), $(SRCDIR)/$(basename $(file)).m $(SRCDIR)/$(basename $(file)).c $(SRCDIR)/$(basename $(file)).cpp $(SRCDIR)/$(basename $(file)).S)
|
||||
FULL_SRCS = $(foreach file, $($(APP)_OBJS), $(SRCDIR)/$(basename $(file)).m $(SRCDIR)/$(basename $(file)).c $(SRCDIR)/$(basename $(file)).cpp $(SRCDIR)/$(basename $(file)).cc $(SRCDIR)/$(basename $(file)).S)
|
||||
|
||||
#
|
||||
# When generating dependency (gcc -MM), ideally we use only either
|
||||
|
@ -174,6 +174,11 @@ $(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.cpp
|
|||
$(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
|
||||
$(subst /,$(HOST_PSEP),$<)
|
||||
|
||||
$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.cc
|
||||
$(CXX) $($(APP)_CXXFLAGS) \
|
||||
$(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
|
||||
$(subst /,$(HOST_PSEP),$<)
|
||||
|
||||
$(OBJDIRS):
|
||||
$(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR))
|
||||
|
||||
|
|
|
@ -28,10 +28,6 @@ DARWIN_CFLAGS = @ac_darwin_cflags@
|
|||
# Android
|
||||
ANDROID_CFLAGS = @ac_android_cflags@
|
||||
|
||||
# libyuv
|
||||
LIBYUV_CFLAGS = @ac_libyuv_cflags@
|
||||
LIBYUV_LDFLAGS = @ac_libyuv_ldflags@
|
||||
|
||||
# openh264
|
||||
OPENH264_CFLAGS = @ac_openh264_cflags@
|
||||
OPENH264_LDFLAGS = @ac_openh264_ldflags@
|
||||
|
@ -44,10 +40,10 @@ WEBRTC_LDFLAGS = @ac_webrtc_ldflags@
|
|||
# PJMEDIA features exclusion
|
||||
export CFLAGS += @ac_no_small_filter@ @ac_no_large_filter@ @ac_no_speex_aec@ \
|
||||
$(SDL_CFLAGS) $(FFMPEG_CFLAGS) $(V4L2_CFLAGS) $(QT_CFLAGS) \
|
||||
$(DARWIN_CFLAGS) $(ANDROID_CFLAGS) $(LIBYUV_CFLAGS) \
|
||||
$(DARWIN_CFLAGS) $(ANDROID_CFLAGS) \
|
||||
$(OPENH264_CFLAGS) $(WEBRTC_CFLAGS)
|
||||
export LDFLAGS += $(SDL_LDFLAGS) $(FFMPEG_LDFLAGS) $(V4L2_LDFLAGS) \
|
||||
$(LIBYUV_LDFLAGS) $(OPENH264_LDFLAGS) $(WEBRTC_LDFLAGS)
|
||||
$(OPENH264_LDFLAGS) $(WEBRTC_LDFLAGS)
|
||||
|
||||
# Define the desired sound device backend
|
||||
# Valid values are:
|
||||
|
@ -195,6 +191,19 @@ ifeq (@ac_external_pa@,1)
|
|||
export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=1
|
||||
endif
|
||||
|
||||
#
|
||||
# libyuv
|
||||
#
|
||||
ifeq (@ac_no_yuv@,1)
|
||||
export CFLAGS += -DPJMEDIA_HAS_LIBYUV=0
|
||||
else
|
||||
export CFLAGS += -DPJMEDIA_HAS_LIBYUV=1
|
||||
ifeq (@ac_external_yuv@,0)
|
||||
export CFLAGS += -I$(THIRD_PARTY)/yuv/include
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
#
|
||||
# MacOSX specific
|
||||
#
|
||||
|
|
|
@ -283,7 +283,8 @@ class MyApp {
|
|||
static {
|
||||
try{
|
||||
System.loadLibrary("openh264");
|
||||
System.loadLibrary("yuv");
|
||||
// Ticket #1937: libyuv is now included as static lib
|
||||
//System.loadLibrary("yuv");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.out.println("UnsatisfiedLinkError: " + e.getMessage());
|
||||
System.out.println("This could be safely ignored if you " +
|
||||
|
|
|
@ -40,3 +40,11 @@ endif
|
|||
ifeq (@ac_pjmedia_resample@,libresample)
|
||||
DIRS += resample
|
||||
endif
|
||||
|
||||
ifneq (@ac_no_yuv@,1)
|
||||
ifeq (@ac_external_yuv@,1)
|
||||
# External yuv
|
||||
else
|
||||
DIRS += yuv
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -0,0 +1,339 @@
|
|||
include ../../../build.mak
|
||||
include ../../../build/common.mak
|
||||
|
||||
export LIBDIR := ../../lib
|
||||
|
||||
RULES_MAK := $(PJDIR)/build/rules.mak
|
||||
|
||||
export YUV_LIB := libyuv-$(TARGET_NAME)$(LIBEXT)
|
||||
|
||||
ifeq ($(PJ_SHARED_LIBRARIES),)
|
||||
else
|
||||
export YUV_SONAME := libyuv.$(SHLIB_SUFFIX)
|
||||
export YUV_SHLIB := $(YUV_SONAME).$(PJ_VERSION_MAJOR)
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# Gather all flags.
|
||||
#
|
||||
export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
|
||||
$(CFLAGS) $(CC_INC). $(CC_INC)../../yuv/include \
|
||||
$(CC_INC)../../../pjlib/include
|
||||
export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
|
||||
$(HOST_CXXFLAGS) $(CXXFLAGS)
|
||||
export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
|
||||
$(LDFLAGS)
|
||||
|
||||
export YUV_SRCDIR = ../../yuv/source
|
||||
export YUV_OBJS = \
|
||||
compare.o \
|
||||
compare_common.o \
|
||||
compare_gcc.o \
|
||||
compare_neon64.o \
|
||||
compare_neon.o \
|
||||
compare_win.o \
|
||||
convert_argb.o \
|
||||
convert.o \
|
||||
convert_from_argb.o \
|
||||
convert_from.o \
|
||||
convert_jpeg.o \
|
||||
convert_to_argb.o \
|
||||
convert_to_i420.o \
|
||||
cpu_id.o \
|
||||
mjpeg_decoder.o \
|
||||
mjpeg_validate.o \
|
||||
planar_functions.o \
|
||||
rotate_any.o \
|
||||
rotate_argb.o \
|
||||
rotate.o \
|
||||
rotate_common.o \
|
||||
rotate_gcc.o \
|
||||
rotate_mips.o \
|
||||
rotate_neon64.o \
|
||||
rotate_neon.o \
|
||||
rotate_win.o \
|
||||
row_any.o \
|
||||
row_common.o \
|
||||
row_gcc.o \
|
||||
row_mips.o \
|
||||
row_neon64.o \
|
||||
row_neon.o \
|
||||
row_win.o \
|
||||
scale_any.o \
|
||||
scale_argb.o \
|
||||
scale.o \
|
||||
scale_common.o \
|
||||
scale_gcc.o \
|
||||
scale_mips.o \
|
||||
scale_neon64.o \
|
||||
scale_neon.o \
|
||||
scale_win.o \
|
||||
video_common.o
|
||||
|
||||
export YUV_CFLAGS = -fomit-frame-pointer $(_CFLAGS)
|
||||
export YUV_CXXFLAGS = $(YUV_CFLAGS)
|
||||
|
||||
|
||||
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
|
||||
###############################################################################
|
||||
# Main entry
|
||||
#
|
||||
# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
|
||||
#
|
||||
TARGETS := $(YUV_LIB) $(YUV_SONAME)
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
doc:
|
||||
cd .. && doxygen docs/doxygen.cfg
|
||||
|
||||
dep: depend
|
||||
distclean: realclean
|
||||
|
||||
.PHONY: all dep depend clean realclean distclean
|
||||
.PHONY: $(TARGETS)
|
||||
.PHONE: $(YUV_LIB) $(YUV_SONAME)
|
||||
|
||||
libyuv: $(YUV_LIB)
|
||||
$(YUV_SONAME): $(YUV_LIB)
|
||||
$(YUV_LIB) $(YUV_SONAME):
|
||||
$(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
|
||||
|
||||
clean print_lib:
|
||||
$(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $@
|
||||
|
||||
realclean:
|
||||
$(subst @@,$(subst /,$(HOST_PSEP),.yuv-$(TARGET_NAME).depend),$(HOST_RMR))
|
||||
|
||||
$(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $@
|
||||
|
||||
depend:
|
||||
$(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $@
|
||||
|
||||
|
||||
include ../../../build.mak
|
||||
include ../../../build/common.mak
|
||||
|
||||
export LIBDIR := ../../lib
|
||||
|
||||
RULES_MAK := $(PJDIR)/build/rules.mak
|
||||
|
||||
export YUV_LIB := libyuv-$(TARGET_NAME)$(LIBEXT)
|
||||
|
||||
ifeq ($(PJ_SHARED_LIBRARIES),)
|
||||
else
|
||||
export YUV_SONAME := libyuv.$(SHLIB_SUFFIX)
|
||||
export YUV_SHLIB := $(YUV_SONAME).$(PJ_VERSION_MAJOR)
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# Gather all flags.
|
||||
#
|
||||
export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
|
||||
$(CFLAGS) $(CC_INC). $(CC_INC)../../yuv/include \
|
||||
$(CC_INC)../../../pjlib/include
|
||||
export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
|
||||
$(HOST_CXXFLAGS) $(CXXFLAGS)
|
||||
export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
|
||||
$(LDFLAGS)
|
||||
|
||||
export YUV_SRCDIR = ../../yuv/source
|
||||
export YUV_OBJS = \
|
||||
compare.o \
|
||||
compare_common.o \
|
||||
compare_gcc.o \
|
||||
compare_neon64.o \
|
||||
compare_neon.o \
|
||||
compare_win.o \
|
||||
convert_argb.o \
|
||||
convert.o \
|
||||
convert_from_argb.o \
|
||||
convert_from.o \
|
||||
convert_jpeg.o \
|
||||
convert_to_argb.o \
|
||||
convert_to_i420.o \
|
||||
cpu_id.o \
|
||||
mjpeg_decoder.o \
|
||||
mjpeg_validate.o \
|
||||
planar_functions.o \
|
||||
rotate_any.o \
|
||||
rotate_argb.o \
|
||||
rotate.o \
|
||||
rotate_common.o \
|
||||
rotate_gcc.o \
|
||||
rotate_mips.o \
|
||||
rotate_neon64.o \
|
||||
rotate_neon.o \
|
||||
rotate_win.o \
|
||||
row_any.o \
|
||||
row_common.o \
|
||||
row_gcc.o \
|
||||
row_mips.o \
|
||||
row_neon64.o \
|
||||
row_neon.o \
|
||||
row_win.o \
|
||||
scale_any.o \
|
||||
scale_argb.o \
|
||||
scale.o \
|
||||
scale_common.o \
|
||||
scale_gcc.o \
|
||||
scale_mips.o \
|
||||
scale_neon64.o \
|
||||
scale_neon.o \
|
||||
scale_win.o \
|
||||
video_common.o
|
||||
|
||||
export YUV_CFLAGS = -fomit-frame-pointer $(_CFLAGS)
|
||||
export YUV_CXXFLAGS = $(YUV_CFLAGS)
|
||||
|
||||
|
||||
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
|
||||
###############################################################################
|
||||
# Main entry
|
||||
#
|
||||
# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
|
||||
#
|
||||
TARGETS := $(YUV_LIB) $(YUV_SONAME)
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
doc:
|
||||
cd .. && doxygen docs/doxygen.cfg
|
||||
|
||||
dep: depend
|
||||
distclean: realclean
|
||||
|
||||
.PHONY: all dep depend clean realclean distclean
|
||||
.PHONY: $(TARGETS)
|
||||
.PHONE: $(YUV_LIB) $(YUV_SONAME)
|
||||
|
||||
libyuv: $(YUV_LIB)
|
||||
$(YUV_SONAME): $(YUV_LIB)
|
||||
$(YUV_LIB) $(YUV_SONAME):
|
||||
$(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
|
||||
|
||||
clean print_lib:
|
||||
$(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $@
|
||||
|
||||
realclean:
|
||||
$(subst @@,$(subst /,$(HOST_PSEP),.yuv-$(TARGET_NAME).depend),$(HOST_RMR))
|
||||
|
||||
$(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $@
|
||||
|
||||
depend:
|
||||
$(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $@
|
||||
|
||||
|
||||
include ../../../build.mak
|
||||
include ../../../build/common.mak
|
||||
|
||||
export LIBDIR := ../../lib
|
||||
|
||||
RULES_MAK := $(PJDIR)/build/rules.mak
|
||||
|
||||
export YUV_LIB := libyuv-$(TARGET_NAME)$(LIBEXT)
|
||||
|
||||
ifeq ($(PJ_SHARED_LIBRARIES),)
|
||||
else
|
||||
export YUV_SONAME := libyuv.$(SHLIB_SUFFIX)
|
||||
export YUV_SHLIB := $(YUV_SONAME).$(PJ_VERSION_MAJOR)
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# Gather all flags.
|
||||
#
|
||||
export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
|
||||
$(CFLAGS) $(CC_INC). $(CC_INC)../../yuv/include \
|
||||
$(CC_INC)../../../pjlib/include
|
||||
export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
|
||||
$(HOST_CXXFLAGS) $(CXXFLAGS)
|
||||
export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
|
||||
$(LDFLAGS)
|
||||
|
||||
export YUV_SRCDIR = ../../yuv/source
|
||||
export YUV_OBJS = \
|
||||
compare.o \
|
||||
compare_common.o \
|
||||
compare_gcc.o \
|
||||
compare_neon64.o \
|
||||
compare_neon.o \
|
||||
compare_win.o \
|
||||
convert_argb.o \
|
||||
convert.o \
|
||||
convert_from_argb.o \
|
||||
convert_from.o \
|
||||
convert_jpeg.o \
|
||||
convert_to_argb.o \
|
||||
convert_to_i420.o \
|
||||
cpu_id.o \
|
||||
mjpeg_decoder.o \
|
||||
mjpeg_validate.o \
|
||||
planar_functions.o \
|
||||
rotate_any.o \
|
||||
rotate_argb.o \
|
||||
rotate.o \
|
||||
rotate_common.o \
|
||||
rotate_gcc.o \
|
||||
rotate_mips.o \
|
||||
rotate_neon64.o \
|
||||
rotate_neon.o \
|
||||
rotate_win.o \
|
||||
row_any.o \
|
||||
row_common.o \
|
||||
row_gcc.o \
|
||||
row_mips.o \
|
||||
row_neon64.o \
|
||||
row_neon.o \
|
||||
row_win.o \
|
||||
scale_any.o \
|
||||
scale_argb.o \
|
||||
scale.o \
|
||||
scale_common.o \
|
||||
scale_gcc.o \
|
||||
scale_mips.o \
|
||||
scale_neon64.o \
|
||||
scale_neon.o \
|
||||
scale_win.o \
|
||||
video_common.o
|
||||
|
||||
export YUV_CFLAGS = -fomit-frame-pointer $(_CFLAGS)
|
||||
export YUV_CXXFLAGS = $(YUV_CFLAGS)
|
||||
|
||||
|
||||
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
|
||||
###############################################################################
|
||||
# Main entry
|
||||
#
|
||||
# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
|
||||
#
|
||||
TARGETS := $(YUV_LIB) $(YUV_SONAME)
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
doc:
|
||||
cd .. && doxygen docs/doxygen.cfg
|
||||
|
||||
dep: depend
|
||||
distclean: realclean
|
||||
|
||||
.PHONY: all dep depend clean realclean distclean
|
||||
.PHONY: $(TARGETS)
|
||||
.PHONE: $(YUV_LIB) $(YUV_SONAME)
|
||||
|
||||
libyuv: $(YUV_LIB)
|
||||
$(YUV_SONAME): $(YUV_LIB)
|
||||
$(YUV_LIB) $(YUV_SONAME):
|
||||
$(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
|
||||
|
||||
clean print_lib:
|
||||
$(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $@
|
||||
|
||||
realclean:
|
||||
$(subst @@,$(subst /,$(HOST_PSEP),.yuv-$(TARGET_NAME).depend),$(HOST_RMR))
|
||||
|
||||
$(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $@
|
||||
|
||||
depend:
|
||||
$(MAKE) -f $(RULES_MAK) APP=YUV app=libyuv $@
|
||||
|
||||
|
Loading…
Reference in New Issue