Android.mk revision 13837cf3f7be0eb8b1a9552bd99a89f98c987720
1LOCAL_PATH:= $(call my-dir) 2 3include $(CLEAR_VARS) 4 5LOCAL_SRC_FILES := \ 6 ut/OpenSLESUT.c \ 7 ut/slesutResult.c 8 9LOCAL_C_INCLUDES:= \ 10 system/media/wilhelm/include 11 12LOCAL_CFLAGS += -fvisibility=hidden 13 14LOCAL_MODULE := libOpenSLESUT 15 16include $(BUILD_STATIC_LIBRARY) 17 18include $(CLEAR_VARS) 19 20LOCAL_CFLAGS += -Wno-override-init 21# -Wno-missing-field-initializers 22# optional, see comments in MPH_to.c: -DUSE_DESIGNATED_INITIALIZERS -S 23LOCAL_CFLAGS += -DUSE_DESIGNATED_INITIALIZERS 24 25LOCAL_SRC_FILES:= \ 26 MPH_to.c 27 28LOCAL_MODULE:= libopensles_helper 29 30include $(BUILD_STATIC_LIBRARY) 31 32include $(CLEAR_VARS) 33 34#LOCAL_CFLAGS += -DSL_API= -DXA_API=SLAPIENTRY -DXAAPIENTRY= 35#LOCAL_CFLAGS += -DUSE_PROFILES=0 -UUSE_TRACE -UUSE_DEBUG -DNDEBUG -DUSE_LOG=SLAndroidLogLevel_Info 36LOCAL_CFLAGS += -DUSE_PROFILES=0 -DUSE_TRACE -DUSE_DEBUG -UNDEBUG \ 37# select the level of log messages 38# -DUSE_LOG=SLAndroidLogLevel_Verbose 39 -DUSE_LOG=SLAndroidLogLevel_Info 40# trace all the OpenSL ES method enter/exit in the logs 41#LOCAL_CFLAGS += -DSL_TRACE_DEFAULT=SL_TRACE_ALL 42 43# Reduce size of .so and hide internal global symbols 44LOCAL_CFLAGS += -fvisibility=hidden -DSL_API='__attribute__((visibility("default")))' \ 45 -DXA_API='__attribute__((visibility("default")))' 46 47LOCAL_SRC_FILES:= \ 48 OpenSLES_IID.c \ 49 classes.c \ 50 data.c \ 51 devices.c \ 52 entry.c \ 53 trace.c \ 54 locks.c \ 55 sles.c \ 56 sllog.c \ 57 ThreadPool.c \ 58 android/AudioPlayer_to_android.cpp \ 59 android/AudioRecorder_to_android.cpp \ 60 android/MediaPlayer_to_android.cpp \ 61 android/OutputMix_to_android.cpp \ 62 android/android_AudioSfDecoder.cpp \ 63 android/android_AudioToCbRenderer.cpp \ 64 android/android_AVPlayer.cpp \ 65 android/android_GenericPlayer.cpp \ 66 android/android_LocAVPlayer.cpp \ 67 android/android_StreamPlayer.cpp \ 68 android/android_SfPlayer.cpp \ 69 android/android_Effect.cpp \ 70 autogen/IID_to_MPH.c \ 71 objects/C3DGroup.c \ 72 objects/CAudioPlayer.c \ 73 objects/CAudioRecorder.c \ 74 objects/CEngine.c \ 75 objects/COutputMix.c \ 76 objects/CMediaPlayer.c \ 77 itf/IAndroidBufferQueue.c \ 78 itf/IAndroidConfiguration.c \ 79 itf/IAndroidEffect.cpp \ 80 itf/IAndroidEffectCapabilities.c \ 81 itf/IAndroidEffectSend.c \ 82 itf/IBassBoost.c \ 83 itf/IBufferQueue.c \ 84 itf/IDynamicInterfaceManagement.c \ 85 itf/IEffectSend.c \ 86 itf/IEngine.c \ 87 itf/IEngineCapabilities.c \ 88 itf/IEnvironmentalReverb.c \ 89 itf/IEqualizer.c \ 90 itf/IMuteSolo.c \ 91 itf/IObject.c \ 92 itf/IOutputMix.c \ 93 itf/IPlay.c \ 94 itf/IPlaybackRate.c \ 95 itf/IPrefetchStatus.c \ 96 itf/IPresetReverb.c \ 97 itf/IRecord.c \ 98 itf/ISeek.c \ 99 itf/IStreamInformation.c \ 100 itf/IVirtualizer.c \ 101 itf/IVolume.c 102 103EXCLUDE_SRC := \ 104 sync.c \ 105 itf/I3DCommit.c \ 106 itf/I3DDoppler.c \ 107 itf/I3DGrouping.c \ 108 itf/I3DLocation.c \ 109 itf/I3DMacroscopic.c \ 110 itf/I3DSource.c \ 111 itf/IAudioDecoderCapabilities.c \ 112 itf/IAudioEncoder.c \ 113 itf/IAudioEncoderCapabilities.c \ 114 itf/IAudioIODeviceCapabilities.c \ 115 itf/IDeviceVolume.c \ 116 itf/IDynamicSource.c \ 117 itf/ILEDArray.c \ 118 itf/IMIDIMessage.c \ 119 itf/IMIDIMuteSolo.c \ 120 itf/IMIDITempo.c \ 121 itf/IMIDITime.c \ 122 itf/IMetadataExtraction.c \ 123 itf/IMetadataTraversal.c \ 124 itf/IPitch.c \ 125 itf/IRatePitch.c \ 126 itf/IThreadSync.c \ 127 itf/IVibra.c \ 128 itf/IVisualization.c 129 130LOCAL_C_INCLUDES:= \ 131 system/media/wilhelm/include \ 132 frameworks/base/media/libstagefright \ 133 frameworks/base/media/libstagefright/include \ 134 frameworks/base/include/media/stagefright/openmax 135 136LOCAL_CFLAGS += -x c++ -Wno-multichar -Wno-invalid-offsetof 137 138LOCAL_STATIC_LIBRARIES += \ 139 libopensles_helper \ 140 libOpenSLESUT 141 142LOCAL_SHARED_LIBRARIES := \ 143 libutils \ 144 libmedia \ 145 libbinder \ 146 libstagefright \ 147 libstagefright_foundation \ 148 libcutils 149 150ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true) 151 LOCAL_LDLIBS += -lpthread -ldl 152 LOCAL_SHARED_LIBRARIES += libdvm 153 LOCAL_CPPFLAGS += -DANDROID_SIMULATOR 154endif 155 156ifneq ($(TARGET_SIMULATOR),true) 157 LOCAL_SHARED_LIBRARIES += libdl 158else 159 LOCAL_CFLAGS += -DTARGET_SIMULATOR 160endif 161 162ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true) 163 LOCAL_LDLIBS += -lpthread 164endif 165 166LOCAL_PRELINK_MODULE:= false 167 168LOCAL_MODULE:= libOpenSLES 169 170ifeq ($(TARGET_BUILD_VARIANT),userdebug) 171 LOCAL_CFLAGS += -DUSERDEBUG_BUILD=1 172endif 173 174include $(BUILD_SHARED_LIBRARY) 175 176# Make /system/lib/libOpenMAXAL.so a symlink to /system/lib/libOpenSLES.so 177# based on system/core/toolbox as there is no standard macro for this yet. 178SYMLINKS := $(addprefix $(TARGET_OUT)/lib/,libOpenMAXAL.so) 179$(SYMLINKS) : $(TARGET_OUT)/lib/libOpenSLES.so $(LOCAL_PATH)/Android.mk 180 @echo symlink $< $@ 181 @rm -f $@ 182 $(hide) ln -sf $(notdir $<) $@ 183ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS) 184ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ 185 $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS) 186 187include $(call all-makefiles-under,$(LOCAL_PATH)) 188