Rewrite makefile to link with stl statically

By doing this way, webrtc.so doesn't depend on stlport_shared

BUG=
TEST=
Review URL: https://webrtc-codereview.appspot.com/546005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2170 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
leozwang@webrtc.org 2012-05-03 16:07:15 +00:00
parent 0b7ba967f5
commit 8b6f749b0a

View File

@ -8,10 +8,255 @@
LOCAL_PATH := $(call my-dir)
MY_LIBS_PATH := $(LOCAL_PATH)/../../../../../../out/Release/obj.target
MY_LIBS_PATH := ../../../../../../out/Release/obj.target
include $(CLEAR_VARS)
LOCAL_MODULE := libvoice_engine_core
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/voice_engine/libvoice_engine_core.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libvideo_engine_core
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/video_engine/libvideo_engine_core.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libvideo_processing
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libvideo_processing.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libwebrtc_video_coding
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libwebrtc_video_coding.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libvideo_render_module
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libvideo_render_module.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libvideo_capture_module
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libvideo_capture_module.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libaudio_coding_module
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libaudio_coding_module.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libaudio_processing
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libaudio_processing.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libPCM16B
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libPCM16B.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libCNG
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libCNG.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libNetEq
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libNetEq.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libG722
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libG722.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libiSAC
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libiSAC.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libG711
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libG711.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libiLBC
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libiLBC.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libiSACFix
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libiSACFix.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libvad
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/common_audio/libvad.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libns_fix
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libns_fix.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libns_neon
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libns_neon.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libagc
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libagc.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libaec
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libaec.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libaecm
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libaecm.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libresampler
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/common_audio/libresampler.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libsignal_processing
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/common_audio/libsignal_processing.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libapm_util
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libapm_util.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libsystem_wrappers
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/system_wrappers/source/libsystem_wrappers.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libaudio_device
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libaudio_device.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := librtp_rtcp
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/librtp_rtcp.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libmedia_file
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libmedia_file.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libudp_transport
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libudp_transport.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libwebrtc_utility
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libwebrtc_utility.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libaudio_conference_mixer
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libaudio_conference_mixer.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libwebrtc_libyuv
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/common_video/libwebrtc_libyuv.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libyuv
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/third_party/libyuv/libyuv.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libwebrtc_i420
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libwebrtc_i420.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libwebrtc_vp8
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libwebrtc_vp8.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libwebrtc_jpeg
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/common_video/libwebrtc_jpeg.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libjpeg_turbo
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/third_party/libjpeg_turbo/libjpeg_turbo.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libaudioproc_debug_proto
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libaudioproc_debug_proto.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libprotobuf_lite
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/third_party/protobuf/libprotobuf_lite.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libvpx
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/third_party/libvpx/libvpx.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_MODULE := libwebrtc-video-demo-jni
LOCAL_CPP_EXTENSION := .cc
@ -26,56 +271,53 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../../../include \
$(LOCAL_PATH)/../../../../../voice_engine/main/interface
LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := \
libstlport_shared
LOCAL_LDLIBS := \
-llog \
-lgcc \
-lGLESv2 \
-lOpenSLES \
$(MY_LIBS_PATH)/src/voice_engine/libvoice_engine_core.a \
$(MY_LIBS_PATH)/src/video_engine/libvideo_engine_core.a \
$(MY_LIBS_PATH)/src/modules/libvideo_processing.a \
$(MY_LIBS_PATH)/src/modules/libwebrtc_video_coding.a \
$(MY_LIBS_PATH)/src/modules/libvideo_render_module.a \
$(MY_LIBS_PATH)/src/modules/libvideo_capture_module.a \
$(MY_LIBS_PATH)/src/modules/libaudio_coding_module.a \
$(MY_LIBS_PATH)/src/modules/libaudio_processing.a \
$(MY_LIBS_PATH)/src/modules/libPCM16B.a \
$(MY_LIBS_PATH)/src/modules/libCNG.a \
$(MY_LIBS_PATH)/src/modules/libNetEq.a \
$(MY_LIBS_PATH)/src/modules/libG722.a \
$(MY_LIBS_PATH)/src/modules/libiSAC.a \
$(MY_LIBS_PATH)/src/modules/libG711.a \
$(MY_LIBS_PATH)/src/modules/libiLBC.a \
$(MY_LIBS_PATH)/src/modules/libiSACFix.a \
$(MY_LIBS_PATH)/src/common_audio/libvad.a \
$(MY_LIBS_PATH)/src/modules/libns.a \
$(MY_LIBS_PATH)/src/modules/libagc.a \
$(MY_LIBS_PATH)/src/modules/libaec.a \
$(MY_LIBS_PATH)/src/modules/libaecm.a \
$(MY_LIBS_PATH)/src/common_audio/libresampler.a \
$(MY_LIBS_PATH)/src/common_audio/libsignal_processing.a \
$(MY_LIBS_PATH)/src/modules/libapm_util.a \
$(MY_LIBS_PATH)/src/system_wrappers/source/libsystem_wrappers.a \
$(MY_LIBS_PATH)/src/modules/libaudio_device.a \
$(MY_LIBS_PATH)/src/modules/librtp_rtcp.a \
$(MY_LIBS_PATH)/src/modules/libmedia_file.a \
$(MY_LIBS_PATH)/src/modules/libudp_transport.a \
$(MY_LIBS_PATH)/src/modules/libwebrtc_utility.a \
$(MY_LIBS_PATH)/src/modules/libaudio_conference_mixer.a \
$(MY_LIBS_PATH)/src/common_video/libwebrtc_libyuv.a \
$(MY_LIBS_PATH)/third_party/libyuv/libyuv.a \
$(MY_LIBS_PATH)/src/modules/libwebrtc_i420.a \
$(MY_LIBS_PATH)/src/modules/libwebrtc_vp8.a \
$(MY_LIBS_PATH)/src/common_video/libwebrtc_jpeg.a \
$(MY_LIBS_PATH)/third_party/libjpeg_turbo/libjpeg_turbo.a \
$(MY_LIBS_PATH)/src/modules/libaudioproc_debug_proto.a \
$(MY_LIBS_PATH)/third_party/protobuf/libprotobuf_lite.a \
$(MY_LIBS_PATH)/third_party/libvpx/libvpx.a
LOCAL_STATIC_LIBRARIES := \
libvoice_engine_core \
libvideo_engine_core \
libvideo_processing \
libwebrtc_video_coding \
libvideo_render_module \
libvideo_capture_module \
libaudio_coding_module \
libaudio_processing \
libPCM16B \
libCNG \
libNetEq \
libG722 \
libiSAC \
libG711 \
libiLBC \
libiSACFix \
libvad \
libns_fix \
libns_neon \
libagc \
libaec \
libaecm \
libresampler \
libsignal_processing \
libapm_util \
libsystem_wrappers \
libaudio_device \
librtp_rtcp \
libmedia_file \
libudp_transport \
libwebrtc_utility \
libaudio_conference_mixer \
libwebrtc_libyuv \
libyuv \
libwebrtc_i420 \
libwebrtc_vp8 \
libwebrtc_jpeg \
libjpeg_turbo \
libaudioproc_debug_proto \
libprotobuf_lite \
libvpx
include $(BUILD_SHARED_LIBRARY)