Android.mk revision 64e0e9fcadaa738d7145c07c20c67d123e4e7cda
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/android_Player.cpp \ 59 android/android_AVPlayer.cpp \ 60 android/android_AudioPlayer.cpp \ 61 android/android_AudioRecorder.cpp \ 62 android/android_LocAVPlayer.cpp \ 63 android/android_OutputMix.cpp \ 64 android/android_StreamPlayer.cpp \ 65 android/android_SfPlayer.cpp \ 66 android/android_Effect.cpp \ 67 autogen/IID_to_MPH.c \ 68 objects/C3DGroup.c \ 69 objects/CAudioPlayer.c \ 70 objects/CAudioRecorder.c \ 71 objects/CEngine.c \ 72 objects/COutputMix.c \ 73 objects/CMediaPlayer.c \ 74 itf/IAndroidBufferQueue.c \ 75 itf/IAndroidConfiguration.c \ 76 itf/IAndroidEffect.cpp \ 77 itf/IAndroidEffectCapabilities.c \ 78 itf/IAndroidEffectSend.c \ 79 itf/IBassBoost.c \ 80 itf/IBufferQueue.c \ 81 itf/IDynamicInterfaceManagement.c \ 82 itf/IEffectSend.c \ 83 itf/IEngine.c \ 84 itf/IEngineCapabilities.c \ 85 itf/IEnvironmentalReverb.c \ 86 itf/IEqualizer.c \ 87 itf/IMuteSolo.c \ 88 itf/IObject.c \ 89 itf/IOutputMix.c \ 90 itf/IPlay.c \ 91 itf/IPlaybackRate.c \ 92 itf/IPrefetchStatus.c \ 93 itf/IPresetReverb.c \ 94 itf/IRecord.c \ 95 itf/ISeek.c \ 96 itf/IStreamInformation.c \ 97 itf/IVirtualizer.c \ 98 itf/IVolume.c 99 100EXCLUDE_SRC := \ 101 sync.c \ 102 itf/I3DCommit.c \ 103 itf/I3DDoppler.c \ 104 itf/I3DGrouping.c \ 105 itf/I3DLocation.c \ 106 itf/I3DMacroscopic.c \ 107 itf/I3DSource.c \ 108 itf/IAudioDecoderCapabilities.c \ 109 itf/IAudioEncoder.c \ 110 itf/IAudioEncoderCapabilities.c \ 111 itf/IAudioIODeviceCapabilities.c \ 112 itf/IDeviceVolume.c \ 113 itf/IDynamicSource.c \ 114 itf/ILEDArray.c \ 115 itf/IMIDIMessage.c \ 116 itf/IMIDIMuteSolo.c \ 117 itf/IMIDITempo.c \ 118 itf/IMIDITime.c \ 119 itf/IMetadataExtraction.c \ 120 itf/IMetadataTraversal.c \ 121 itf/IPitch.c \ 122 itf/IRatePitch.c \ 123 itf/IThreadSync.c \ 124 itf/IVibra.c \ 125 itf/IVisualization.c 126 127LOCAL_C_INCLUDES:= \ 128 $(JNI_H_INCLUDE) \ 129 system/media/wilhelm/include \ 130 frameworks/base/media/libstagefright \ 131 frameworks/base/media/libstagefright/include \ 132 frameworks/base/include/media/stagefright/openmax 133 134LOCAL_CFLAGS += -x c++ -Wno-multichar -Wno-invalid-offsetof 135 136LOCAL_STATIC_LIBRARIES += \ 137 libopensles_helper \ 138 libOpenSLESUT 139 140LOCAL_SHARED_LIBRARIES := \ 141 libutils \ 142 libmedia \ 143 libbinder \ 144 libstagefright \ 145 libstagefright_foundation \ 146 libcutils 147 148ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true) 149 LOCAL_LDLIBS += -lpthread -ldl 150 LOCAL_SHARED_LIBRARIES += libdvm 151 LOCAL_CPPFLAGS += -DANDROID_SIMULATOR 152endif 153 154ifneq ($(TARGET_SIMULATOR),true) 155 LOCAL_SHARED_LIBRARIES += libdl 156else 157 LOCAL_CFLAGS += -DTARGET_SIMULATOR 158endif 159 160ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true) 161 LOCAL_LDLIBS += -lpthread 162endif 163 164LOCAL_PRELINK_MODULE:= false 165 166LOCAL_MODULE:= libOpenSLES 167 168ifeq ($(TARGET_BUILD_VARIANT),userdebug) 169 LOCAL_CFLAGS += -DUSERDEBUG_BUILD=1 170endif 171 172include $(BUILD_SHARED_LIBRARY) 173 174# Make /system/lib/libOpenMAXAL.so a symlink to /system/lib/libOpenSLES.so 175# based on system/core/toolbox as there is no standard macro for this yet. 176SYMLINKS := $(addprefix $(TARGET_OUT)/lib/,libOpenMAXAL.so) 177$(SYMLINKS) : $(TARGET_OUT)/lib/libOpenSLES.so $(LOCAL_PATH)/Android.mk 178 @echo symlink $< $@ 179 @rm -f $@ 180 $(hide) ln -sf $(notdir $<) $@ 181ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS) 182ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ 183 $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS) 184 185include $(call all-makefiles-under,$(LOCAL_PATH)) 186