doubango/branches/2.0/doubango/bindings/java/android/droid-makefile

125 lines
3.4 KiB
Plaintext

APP := lib$(PROJECT)_$(MARCH).$(EXT)
CFLAGS := $(CFLAGS_LIB) -fno-rtti -fno-exceptions -I../../_common -I../../. -I../../../tinySAK/src -I../../../tinyNET/src -I../../../tinyHTTP/include -I../../../tinyXCAP/include \
-I../../../tinySMS/include -I../../../tinySDP/include -I../../../tinyMEDIA/include -I../../../tinyMSRP/include -I../../../tinyDAV/include -I../../../tinySIP/include
# Because of the static build, you need all librarires
THIRDPARTIES_LIB := ../../../thirdparties/android/lib
THIRDPARTIES_MARCH_LIB := ../../../thirdparties/android/lib/$(MARCH)
##########
# Before starting to set parmeters we will override those provided by the user
#
ifeq ($(LICENSE),lgpl)
H264 := no
endif
##########
# Set LD and CFLAGS according to the user parameters
#
ifneq ($(FFMPEG), no)
FFMPEG_LDFLAGS := -lavutil-$(LICENSE) -lswscale-$(LICENSE) -lavcore-$(LICENSE) -lavcodec-$(LICENSE)
ifneq ($(H264),no)
FFMPEG_LDFLAGS := $(FFMPEG_LDFLAGS) -lx264
endif
ifneq ($(THEORA),no)
FFMPEG_LDFLAGS := $(FFMPEG_LDFLAGS) -ltheora -logg
endif
endif
ifneq ($(OPENCORE_AMR), no)
OPENCORE_ARM_LDFLAGS := -lopencore-amrnb
endif
ifeq ($(SPEEX_DSP), yes)
SPEEX_DSP_LDFLAGS := -lspeexdsp
endif
ifeq ($(SPEEX), yes)
SPEEX_LDFLAGS := -lspeex
endif
ifeq ($(HAVE_WEBRTC), yes)
WEBRTC_LDFLAGS := -lwebrtc_aec_$(MARCH) -lwebrtc_apm_utility_$(MARCH) -lwebrtc_ns_$(MARCH) -lwebrtc_system_wrappers_$(MARCH)
endif
ifeq ($(ILBC), yes)
ILBC_LDFLAGS := -liLBC
endif
ifneq ($(LIBGSM),no)
LIBGSM_LDFLAGS := -lgsm
endif
#BV16_LDFLAGS := -lbv16
ifeq ($(G729), yes)
G729_LDFLAGS := -lg729b_$(MARCH)
# Reset all other ITU CODECS
OPENCORE_ARM_LDFLAGS :=
BV16_LDFLAGS :=
else
G729_LDFLAGS :=
endif
ifeq ($(LT),shared)
_LT=Bdynamic
else
_LT=Bstatic
endif
LDFLAGS := $(LDFLAGS_LIB) -L$(THIRDPARTIES_LIB) -L$(THIRDPARTIES_MARCH_LIB) $(FFMPEG_LDFLAGS) $(WEBRTC_LDFLAGS) $(SPEEX_DSP_LDFLAGS) $(SPEEX_LDFLAGS) $(OPENCORE_ARM_LDFLAGS) $(BV16_LDFLAGS) $(ILBC_LDFLAGS) $(LIBGSM_LDFLAGS) $(G729_LDFLAGS)\
-Wl,-Bdynamic -lm -lstdc++ -lgcc -llog \
-Wl,-$(_LT) -ltinySAK_$(MARCH) -ltinyHTTP_$(MARCH) -ltinyXCAP_$(MARCH) -ltinyIPSec_$(MARCH) -ltinySIGCOMP_$(MARCH) -ltinySMS_$(MARCH) -ltinyNET_$(MARCH) -ltinySDP_$(MARCH) -ltinyRTP_$(MARCH) -ltinyMEDIA_$(MARCH) -ltinyMSRP_$(MARCH) -ltinyDAV_$(MARCH) -ltinySIP_$(MARCH)
all: $(APP)
OBJS = tinyWRAP_wrap.o\
../../_common/ActionConfig.o \
../../_common/AudioResampler.o \
../../_common/DDebug.o \
../../_common/MediaContent.o \
../../_common/MediaSessionMgr.o \
../../_common/Msrp.o \
../../_common/ProxyConsumer.o \
../../_common/ProxyPluginMgr.o \
../../_common/ProxyProducer.o \
../../_common/SafeObject.o \
../../_common/SipCallback.o \
../../_common/SipEvent.o \
../../_common/SipMessage.o \
../../_common/SipSession.o \
../../_common/SipStack.o \
../../_common/SipUri.o \
../../_common/SMSEncoder.o \
../../_common/Xcap.o
$(APP): $(OBJS)
ifeq ($(EXT), a)
$(AR) rcs $@ $^
else
$(CC) $(LDFLAGS) -o $@ $^
endif
%.o: %.cxx
$(CPP) -c $(INCLUDE) $(CFLAGS) $< -o $@
install: $(APP)
$(ANDROID_SDK_ROOT)/tools/adb remount
$(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(LIB_DIR)/$(APP)
$(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(LIB_DIR)/$(APP)
shell:
$(ANDROID_SDK_ROOT)/tools/adb shell
run:
$(ANDROID_SDK_ROOT)/tools/adb shell $(LIB_DIR)/$(APP)
clean:
@rm -f $(OBJS) $(APP)