Ticket #168: Added some variables in build.mak that can be used by application in its makefile

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1055 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
Benny Prijono 2007-03-12 10:44:38 +00:00
parent d59717461e
commit 124831178e
3 changed files with 37 additions and 1 deletions

View File

@ -308,7 +308,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP EGREP ac_os_objs ac_pjmedia_snd ac_pa_cflags ac_pa_use_alsa ac_no_small_filter ac_no_large_filter ac_no_g711_plc ac_no_speex_aec ac_no_g711_codec ac_no_l16_codec ac_no_gsm_codec ac_no_speex_codec ac_no_ilbc_codec ac_no_ssl openssl_h_present libssl_present libcrypto_present ac_cross_compile ac_linux_poll ac_host ac_main_obj LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX ac_pjdir CPP EGREP ac_os_objs ac_pjmedia_snd ac_pa_cflags ac_pa_use_alsa ac_no_small_filter ac_no_large_filter ac_no_g711_plc ac_no_speex_aec ac_no_g711_codec ac_no_l16_codec ac_no_gsm_codec ac_no_speex_codec ac_no_ilbc_codec ac_no_ssl openssl_h_present libssl_present libcrypto_present ac_cross_compile ac_linux_poll ac_host ac_main_obj LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -1443,6 +1443,7 @@ test -n "$target_alias" &&
ac_config_files="$ac_config_files build.mak build/os-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak"
if test "$CFLAGS" = ""; then
CFLAGS="-O2"
else
@ -2744,6 +2745,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_pjdir=`pwd`
echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
@ -9773,6 +9777,7 @@ s,@OBJEXT@,$OBJEXT,;t t
s,@CXX@,$CXX,;t t
s,@CXXFLAGS@,$CXXFLAGS,;t t
s,@ac_ct_CXX@,$ac_ct_CXX,;t t
s,@ac_pjdir@,$ac_pjdir,;t t
s,@CPP@,$CPP,;t t
s,@EGREP@,$EGREP,;t t
s,@ac_os_objs@,$ac_os_objs,;t t

View File

@ -19,6 +19,7 @@ AC_CONFIG_FILES([build.mak
pjsip/build/os-auto.mak
])
dnl
dnl Setup default CFLAGS
dnl
@ -34,6 +35,9 @@ AC_PROG_CC
AC_PROG_CXX
AC_LANG_C
AC_SUBST(ac_pjdir)
ac_pjdir=`pwd`
AC_CHECK_LIB(pthread,pthread_create)
AC_CHECK_LIB(wsock32,puts)
AC_CHECK_LIB(ws2_32,puts)

View File

@ -6,3 +6,30 @@ export CC_NAME := gcc
export TARGET_NAME := @target@
export CROSS_COMPILE := @ac_cross_compile@
export LINUX_POLL := @ac_linux_poll@
# Application can use this
export PJDIR := @ac_pjdir@
export APP_CC := $(CROSS_COMPILE)$(CC_NAME)
export APP_CFLAGS := -DPJ_AUTOCONF=1\
@CFLAGS@\
-I$(PJDIR)/pjlib/include\
-I$(PJDIR)/pjlib-util/include\
-I$(PJDIR)/pjmedia/include\
-I$(PJDIR)/pjsip/include
export APP_CXXFLAGS := $(APP_CFLAGS)
export APP_LDFLAGS := -L$(PJDIR)/pjlib/lib\
-L$(PJDIR)/pjlib-util/lib\
-L$(PJDIR)/pjmedia/lib\
-L$(PJDIR)/pjsip/lib\
@LDFLAGS@
export APP_LDLIBS := -lpjsua-$(TARGET_NAME)\
-lpjsip-ua-$(TARGET_NAME)\
-lpjsip-simple-$(TARGET_NAME)\
-lpjsip-$(TARGET_NAME)\
-lpjmedia-codec-$(TARGET_NAME)\
-lpjmedia-$(TARGET_NAME)\
-lpjmedia-codec-$(TARGET_NAME)\
-lpjlib-util-$(TARGET_NAME)\
-lpj-$(TARGET_NAME)\
@LIBS@