LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES:=                \
        OpenSLES_IID.c           \
        MPH_to.c                 \
        devices.c                \
        locks.c                  \
        sles_cpp.cpp             \
        sles_to_android.cpp      \
        I3DCommit.c \
        I3DDoppler.c \
        I3DGrouping.c \
        I3DLocation.c \
        I3DMacroscopic.c \
        I3DSource.c \
        IBassBoost.c \
        IEnvironmentalReverb.c \
        IEqualizer.c \
        IPresetReverb.c \
        IVirtualizer.c \
        IVisualization.c \
        sles_check_audioplayer.cpp

LOCAL_C_INCLUDES:= \
	$(JNI_H_INCLUDE) \
	$(TOP)/system/media/opensles/include

LOCAL_CPPFLAGS += -DUSE_ANDROID

LOCAL_SHARED_LIBRARIES := \
        libmedia          \
        libutils          \
        libcutils

ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
        LOCAL_LDLIBS += -lpthread -ldl
        LOCAL_SHARED_LIBRARIES += libdvm
        LOCAL_CPPFLAGS += -DANDROID_SIMULATOR
endif

LOCAL_CFLAGS += -Wno-override-init

ifneq ($(TARGET_SIMULATOR),true)
LOCAL_SHARED_LIBRARIES += libdl
endif

ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
        LOCAL_LDLIBS += -lpthread
endif

LOCAL_PRELINK_MODULE:= false

LOCAL_MODULE:= libopensles

include $(BUILD_SHARED_LIBRARY)

include $(call all-makefiles-under,$(LOCAL_PATH))
