diff options
Diffstat (limited to 'bindings/java/android/droid-makefile')
-rw-r--r-- | bindings/java/android/droid-makefile | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/bindings/java/android/droid-makefile b/bindings/java/android/droid-makefile new file mode 100644 index 0000000..5383adc --- /dev/null +++ b/bindings/java/android/droid-makefile @@ -0,0 +1,146 @@ +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, we 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 ($(LIBYUV),no) + LIBYUV_LDLAGS := -lyuv_$(MARCH) +endif + +ifeq ($(VPX),yes) + VPX_LDLAGS := -lvpx_$(MARCH) +endif + +ifneq ($(OPUS), no) + OPUS_LDFLAGS := -lopus +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 ($(WEBRTC), yes) + WEBRTC_LDFLAGS := -lwebrtc_aec_$(MARCH) -lwebrtc_spl_$(MARCH) -lwebrtc_apm_utility_$(MARCH) -lwebrtc_nsx_$(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 + +ifneq ($(SRTP),no) + LIBSRTP_LDFLAGS := -lsrtp +endif + +ifneq ($(TLS), no) + TLS_LDFLAGS := -lssl_$(MARCH) -lcrypto_$(MARCH) +endif + +ifeq ($(LT),shared) + _LT=Bdynamic +else + _LT=Bstatic +endif + +LDFLAGS := $(LDFLAGS_LIB) -L$(THIRDPARTIES_LIB) -L$(THIRDPARTIES_MARCH_LIB) $(FFMPEG_LDFLAGS) $(LIBYUV_LDLAGS) $(VPX_LDLAGS) $(WEBRTC_LDFLAGS) $(SPEEX_DSP_LDFLAGS) $(SPEEX_LDFLAGS) $(OPUS_LDFLAGS) $(OPENCORE_ARM_LDFLAGS) $(BV16_LDFLAGS) $(ILBC_LDFLAGS) $(LIBGSM_LDFLAGS) $(G729_LDFLAGS) \ + $(LIBSRTP_LDFLAGS) $(TLS_LDFLAGS) \ + -Wl,-Bdynamic -lm -lstdc++ -lgnustl_static -lgcc -llog -ldl \ + -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)
\ No newline at end of file |