217 lines
6.3 KiB
Makefile
217 lines
6.3 KiB
Makefile
# build.mak. Generated from build.mak.in by configure.
|
|
export MACHINE_NAME := auto
|
|
export OS_NAME := auto
|
|
export HOST_NAME := unix
|
|
export CC_NAME := gcc
|
|
export TARGET_NAME := mipsel-unknown-linux-gnu
|
|
export CROSS_COMPILE := mipsel-linux-
|
|
export LINUX_POLL := select
|
|
|
|
export ac_prefix := /opt/trendchip/mips-linux-uclibc-4.9.3/usr
|
|
|
|
LIB_SUFFIX = $(TARGET_NAME).a
|
|
|
|
# Determine which party libraries to use
|
|
#export APP_THIRD_PARTY_LIBS := -lresample-$(TARGET_NAME) -lmilenage-$(TARGET_NAME) -lsrtp-$(TARGET_NAME)
|
|
export APP_THIRD_PARTY_LIBS := -lmilenage-$(TARGET_NAME)
|
|
export APP_THIRD_PARTY_EXT :=
|
|
#export APP_THIRD_PARTY_LIB_FILES = $(PJ_DIR)/third_party/lib/libresample-$(LIB_SUFFIX) $(PJ_DIR)/third_party/lib/libmilenage-$(LIB_SUFFIX) $(PJ_DIR)/third_party/lib/libsrtp-$(LIB_SUFFIX)
|
|
export APP_THIRD_PARTY_LIB_FILES = $(PJ_DIR)/third_party/lib/libmilenage-$(LIB_SUFFIX)
|
|
|
|
ifneq (1,1)
|
|
ifeq (0,1)
|
|
# External GSM library
|
|
APP_THIRD_PARTY_EXT += -lgsm
|
|
else
|
|
APP_THIRD_PARTY_LIBS += -lgsmcodec-$(TARGET_NAME)
|
|
APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libgsmcodec-$(LIB_SUFFIX)
|
|
endif
|
|
endif
|
|
|
|
ifneq (1,1)
|
|
ifeq (0,1)
|
|
APP_THIRD_PARTY_EXT += -lspeex -lspeexdsp
|
|
else
|
|
APP_THIRD_PARTY_LIBS += -lspeex-$(TARGET_NAME)
|
|
APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libspeex-$(LIB_SUFFIX)
|
|
endif
|
|
endif
|
|
|
|
ifneq (1,1)
|
|
APP_THIRD_PARTY_LIBS += -lilbccodec-$(TARGET_NAME)
|
|
APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libilbccodec-$(LIB_SUFFIX)
|
|
endif
|
|
|
|
ifneq (1,1)
|
|
APP_THIRD_PARTY_LIBS += -lg7221codec-$(TARGET_NAME)
|
|
APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libg7221codec-$(LIB_SUFFIX)
|
|
endif
|
|
|
|
ifneq ($(findstring pa,null),)
|
|
ifeq (0,1)
|
|
# External PA
|
|
APP_THIRD_PARTY_EXT += -lportaudio
|
|
else
|
|
APP_THIRD_PARTY_LIBS += -lportaudio-$(TARGET_NAME)
|
|
APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libportaudio-$(LIB_SUFFIX)
|
|
endif
|
|
endif
|
|
|
|
# Additional flags
|
|
|
|
|
|
# CFLAGS, LDFLAGS, and LIBS to be used by applications
|
|
export PJDIR := /opt/bba/BBA1.5_platform/apps/public/pjsip_1.10
|
|
export APP_CC := mips-buildroot-linux-uclibc-gcc
|
|
export APP_CXX := g++
|
|
export APP_CFLAGS := -DPJ_AUTOCONF=1\
|
|
-O2
|
|
|
|
# Added by yuchuwei
|
|
ifneq ($(strip $(INCLUDE_PSTN_GATEWAY)),)
|
|
APP_CFLAGS += -DINCLUDE_PSTN_GATEWAY
|
|
export INCLUDE_PSTN_GATEWAY
|
|
endif
|
|
|
|
|
|
# Added by sirrain zhang
|
|
ifneq ($(strip $(INCLUDE_USB_VOICEMAIL)),)
|
|
APP_CFLAGS += -DINCLUDE_USB_VOICEMAIL
|
|
export INCLUDE_USB_VOICEMAIL
|
|
endif
|
|
|
|
ifneq ($(strip $(INCLUDE_ISP_TM)),)
|
|
APP_CFLAGS += -DINCLUDE_ISP_TM
|
|
export INCLUDE_ISP_TM
|
|
endif
|
|
|
|
ifneq ($(strip $(INCLUDE_VOIP_P_ASSERTED_IDENTITY)),)
|
|
APP_CFLAGS += -DINCLUDE_VOIP_P_ASSERTED_IDENTITY
|
|
export INCLUDE_VOIP_P_ASSERTED_IDENTITY
|
|
endif
|
|
|
|
# huanglei add, for more fxs we should edit here
|
|
# NUM_FXS_CHANNELS is exported in voip.mak
|
|
ifeq ($(strip $(NUM_FXS_CHANNELS)),1)
|
|
APP_CFLAGS += -DNUM_FXS_CHANNELS=1
|
|
export NUM_FXS_CHANNELS
|
|
endif
|
|
ifeq ($(strip $(NUM_FXS_CHANNELS)),2)
|
|
APP_CFLAGS += -DNUM_FXS_CHANNELS=2
|
|
export NUM_FXS_CHANNELS
|
|
endif
|
|
|
|
export APP_CFLAGS += -I$(PJDIR)/pjlib/include\
|
|
-I$(PJDIR)/pjlib-util/include\
|
|
-I$(PJDIR)/pjnath/include\
|
|
-I$(PJDIR)/pjmedia/include\
|
|
-I$(PJDIR)/pjsip/include \
|
|
-I$(PJDIR)/cmsip/include
|
|
|
|
# huanglei add,dtmfrcv
|
|
APP_CFLAGS += -I$(PJDIR)/dtmfrcv/include
|
|
APP_CFLAGS += -I$(PJDIR)/usbvm/include
|
|
APP_CFLAGS += $(VOIP_CFLAGS)
|
|
export APP_CFLAGS
|
|
#end dtmfrcv
|
|
|
|
export APP_CXXFLAGS := $(APP_CFLAGS)
|
|
export APP_LDFLAGS := -L$(PJDIR)/pjlib/lib\
|
|
-L$(PJDIR)/pjlib-util/lib\
|
|
-L$(PJDIR)/pjnath/lib\
|
|
-L$(PJDIR)/pjmedia/lib\
|
|
-L$(PJDIR)/cmsip/lib \
|
|
-L$(PJDIR)/pjsip/lib\
|
|
-L$(PJDIR)/third_party/lib
|
|
|
|
# huanglei add,dtmfrcv
|
|
APP_LDFLAGS += -L$(PJDIR)/dtmfrcv/lib
|
|
export APP_LDFLAGS
|
|
#end dtmfrcv
|
|
# Added by sirrain zhang
|
|
ifneq ($(strip $(INCLUDE_USB_VOICEMAIL)),)
|
|
APP_LDFLAGS += -L$(PJDIR)/usbvm/lib
|
|
export APP_LDFLAGS
|
|
endif
|
|
|
|
#export APP_LDLIBS := -lpjsua-$(TARGET_NAME)\
|
|
-lpjsip-ua-$(TARGET_NAME)\
|
|
-lpjsip-simple-$(TARGET_NAME)\
|
|
-lpjsip-$(TARGET_NAME)\
|
|
-lpjmedia-codec-$(TARGET_NAME)\
|
|
-lpjmedia-$(TARGET_NAME)\
|
|
-lpjnath-$(TARGET_NAME)\
|
|
-lpjlib-util-$(TARGET_NAME)\
|
|
$(APP_THIRD_PARTY_LIBS)\
|
|
$(APP_THIRD_PARTY_EXT)\
|
|
-lpj-$(TARGET_NAME)\
|
|
-lcmsip-$(TARGET_NAME) \
|
|
-lm -lnsl -lrt -lpthread
|
|
|
|
export APP_LDLIBS := -lpjsua-$(TARGET_NAME)\
|
|
-lpjsip-ua-$(TARGET_NAME)\
|
|
-lpjsip-simple-$(TARGET_NAME)\
|
|
-lpjsip-$(TARGET_NAME)\
|
|
-lpjmedia-codec-$(TARGET_NAME)\
|
|
-lpjmedia-$(TARGET_NAME)\
|
|
-lpjlib-util-$(TARGET_NAME)\
|
|
$(APP_THIRD_PARTY_LIBS)\
|
|
$(APP_THIRD_PARTY_EXT)\
|
|
-lpj-$(TARGET_NAME)\
|
|
-lcmsip-$(TARGET_NAME) \
|
|
-lm -lnsl -lrt -lpthread
|
|
# huanglei add,dtmfrcv
|
|
APP_LDLIBS += -ldtmfrcvsip-$(TARGET_NAME) -L$(OS_LIB_PATH) -los
|
|
export APP_LDLIBS
|
|
#end dtmfrcv
|
|
# Added by sirrain zhang
|
|
ifneq ($(strip $(INCLUDE_USB_VOICEMAIL)),)
|
|
APP_LDLIBS += -lusbvmsip-$(TARGET_NAME)\
|
|
-lusbvmcommon
|
|
export APP_LDLIBS
|
|
endif
|
|
|
|
export APP_LIB_FILES = $(PJ_DIR)/pjsip/lib/libpjsua-$(LIB_SUFFIX) \
|
|
$(PJ_DIR)/pjsip/lib/libpjsip-ua-$(LIB_SUFFIX) \
|
|
$(PJ_DIR)/pjsip/lib/libpjsip-simple-$(LIB_SUFFIX) \
|
|
$(PJ_DIR)/pjsip/lib/libpjsip-$(LIB_SUFFIX) \
|
|
$(PJ_DIR)/pjmedia/lib/libpjmedia-codec-$(LIB_SUFFIX) \
|
|
$(PJ_DIR)/pjmedia/lib/libpjmedia-$(LIB_SUFFIX) \
|
|
$(PJ_DIR)/pjnath/lib/libpjnath-$(LIB_SUFFIX) \
|
|
$(PJ_DIR)/pjlib-util/lib/libpjlib-util-$(LIB_SUFFIX) \
|
|
$(APP_THIRD_PARTY_LIB_FILES) \
|
|
$(PJ_DIR)/pjlib/lib/libpj-$(LIB_SUFFIX) \
|
|
$(PJ_DIR)/cmsip/lib/libcmsip-$(LIB_SUFFIX)
|
|
|
|
# huanglei add,dtmfrcv
|
|
APP_LIB_FILES += $(PJ_DIR)/dtmfrcv/lib/libdtmfrcvsip-$(LIB_SUFFIX)
|
|
export APP_LIB_FILES
|
|
#end dtmfrcv
|
|
|
|
# Added by sirrain zhang
|
|
ifneq ($(strip $(INCLUDE_USB_VOICEMAIL)),)
|
|
APP_LIB_FILES += $(PJ_DIR)/usbvm/lib/libusbvmsip-$(LIB_SUFFIX) \
|
|
$(PJ_DIR)/usbvm/lib/libusbvmcommon.so
|
|
export APP_LIB_FILES
|
|
endif
|
|
|
|
# Here are the variabels to use if application is using the library
|
|
# from within the source distribution
|
|
export PJ_DIR := $(PJDIR)
|
|
export PJ_CC := $(APP_CC)
|
|
export PJ_CXX := $(APP_CXX)
|
|
export PJ_CFLAGS := $(APP_CFLAGS)
|
|
export PJ_CXXFLAGS := $(APP_CXXFLAGS)
|
|
export PJ_LDFLAGS := $(APP_LDFLAGS)
|
|
export PJ_LDLIBS := $(APP_LDLIBS)
|
|
export PJ_LIB_FILES := $(APP_LIB_FILES)
|
|
|
|
# And here are the variables to use if application is using the
|
|
# library from the install location (i.e. --prefix)
|
|
export PJ_INSTALL_DIR := /opt/trendchip/mips-linux-uclibc-4.9.3/usr
|
|
export PJ_INSTALL_INC_DIR := $(PJ_INSTALL_DIR)/include
|
|
export PJ_INSTALL_LIB_DIR := $(PJ_INSTALL_DIR)/lib
|
|
export PJ_INSTALL_CFLAGS := -I$(PJ_INSTALL_INC_DIR) -DPJ_AUTOCONF=1 -O2
|
|
export PJ_INSTALL_CXXFLAGS := $(PJ_INSTALL_CFLAGS)
|
|
export PJ_INSTALL_LDFLAGS := -L$(PJ_INSTALL_LIB_DIR) $(APP_LDLIBS)
|