1ifneq ($(BUILD_TINY_ANDROID),true)
2
3LOCAL_PATH:= $(call my-dir)
4include $(CLEAR_VARS)
5
6OMXCORE_CFLAGS := -g -O3 -DVERBOSE
7OMXCORE_CFLAGS += -O0 -fno-inline -fno-short-enums
8OMXCORE_CFLAGS += -D_ANDROID_
9OMXCORE_CFLAGS += -U_ENABLE_QC_MSG_LOG_
10OMXCORE_CFLAGS += -Wno-error
11
12#===============================================================================
13#             Figure out the targets
14#===============================================================================
15
16ifeq ($(TARGET_BOARD_PLATFORM),msm7627a)
17MM_CORE_TARGET = 7627A
18else ifeq ($(TARGET_BOARD_PLATFORM),msm7630_surf)
19MM_CORE_TARGET = 7630
20else ifeq ($(TARGET_BOARD_PLATFORM),msm8660)
21MM_CORE_TARGET = 8660
22#Comment out following line to disable drm.play component
23OMXCORE_CFLAGS += -DENABLE_DRMPLAY
24else ifeq ($(TARGET_BOARD_PLATFORM),msm8960)
25MM_CORE_TARGET = 8960
26else ifeq ($(TARGET_BOARD_PLATFORM),msm8974)
27MM_CORE_TARGET = 8974
28else ifeq ($(TARGET_BOARD_PLATFORM),msm8610)
29MM_CORE_TARGET = 8610
30else ifeq ($(TARGET_BOARD_PLATFORM),msm8226)
31MM_CORE_TARGET = 8226
32else ifeq ($(TARGET_BOARD_PLATFORM),msm8916)
33MM_CORE_TARGET = 8916
34else ifeq ($(TARGET_BOARD_PLATFORM),msm8084)
35MM_CORE_TARGET = 8084
36else ifeq ($(TARGET_BOARD_PLATFORM),msm8952)
37MM_CORE_TARGET = msm8952
38else ifeq ($(TARGET_BOARD_PLATFORM),mpq8092)
39MM_CORE_TARGET = 8092
40else ifeq ($(TARGET_BOARD_PLATFORM),msm8992)
41MM_CORE_TARGET = msm8992
42else ifeq ($(TARGET_BOARD_PLATFORM),msm8994)
43MM_CORE_TARGET = msm8994
44else ifeq ($(TARGET_BOARD_PLATFORM),thulium)
45MM_CORE_TARGET = thulium
46else
47MM_CORE_TARGET = default
48endif
49
50#===============================================================================
51#             Deploy the headers that can be exposed
52#===============================================================================
53
54LOCAL_COPY_HEADERS_TO   := mm-core/omxcore
55LOCAL_COPY_HEADERS      := inc/OMX_Audio.h
56LOCAL_COPY_HEADERS      += inc/OMX_Component.h
57LOCAL_COPY_HEADERS      += inc/OMX_ContentPipe.h
58LOCAL_COPY_HEADERS      += inc/OMX_Core.h
59LOCAL_COPY_HEADERS      += inc/OMX_Image.h
60LOCAL_COPY_HEADERS      += inc/OMX_Index.h
61LOCAL_COPY_HEADERS      += inc/OMX_IVCommon.h
62LOCAL_COPY_HEADERS      += inc/OMX_Other.h
63LOCAL_COPY_HEADERS      += inc/OMX_QCOMExtns.h
64LOCAL_COPY_HEADERS      += inc/OMX_Types.h
65LOCAL_COPY_HEADERS      += inc/OMX_Video.h
66LOCAL_COPY_HEADERS      += inc/qc_omx_common.h
67LOCAL_COPY_HEADERS      += inc/qc_omx_component.h
68LOCAL_COPY_HEADERS      += inc/qc_omx_msg.h
69LOCAL_COPY_HEADERS      += inc/QOMX_AudioExtensions.h
70LOCAL_COPY_HEADERS      += inc/QOMX_AudioIndexExtensions.h
71LOCAL_COPY_HEADERS      += inc/OMX_CoreExt.h
72LOCAL_COPY_HEADERS      += inc/QOMX_CoreExtensions.h
73LOCAL_COPY_HEADERS      += inc/QOMX_FileFormatExtensions.h
74LOCAL_COPY_HEADERS      += inc/QOMX_IVCommonExtensions.h
75LOCAL_COPY_HEADERS      += inc/QOMX_SourceExtensions.h
76LOCAL_COPY_HEADERS      += inc/QOMX_VideoExtensions.h
77LOCAL_COPY_HEADERS      += inc/OMX_IndexExt.h
78LOCAL_COPY_HEADERS      += inc/OMX_VideoExt.h
79LOCAL_COPY_HEADERS      += inc/QOMX_StreamingExtensions.h
80LOCAL_COPY_HEADERS      += inc/QCMediaDefs.h
81LOCAL_COPY_HEADERS      += inc/QCMetaData.h
82
83#===============================================================================
84#             LIBRARY for Android apps
85#===============================================================================
86
87LOCAL_C_INCLUDES        := $(LOCAL_PATH)/src/common
88LOCAL_C_INCLUDES        += $(LOCAL_PATH)/inc
89LOCAL_MODULE            := libOmxCore
90LOCAL_MODULE_TAGS       := optional
91LOCAL_SHARED_LIBRARIES  := liblog libdl
92LOCAL_CFLAGS            := $(OMXCORE_CFLAGS)
93
94LOCAL_SRC_FILES         := src/common/omx_core_cmp.cpp
95LOCAL_SRC_FILES         += src/common/qc_omx_core.c
96ifneq (,$(filter msm8916 msm8994 msm8909 thulium msm8952 msm8992,$(TARGET_BOARD_PLATFORM)))
97LOCAL_SRC_FILES         += src/$(MM_CORE_TARGET)/registry_table_android.c
98else
99LOCAL_SRC_FILES         += src/$(MM_CORE_TARGET)/qc_registry_table_android.c
100endif
101
102include $(BUILD_SHARED_LIBRARY)
103
104#===============================================================================
105#             LIBRARY for command line test apps
106#===============================================================================
107
108include $(CLEAR_VARS)
109
110LOCAL_C_INCLUDES        := $(LOCAL_PATH)/src/common
111LOCAL_C_INCLUDES        += $(LOCAL_PATH)/inc
112LOCAL_MODULE            := libmm-omxcore
113LOCAL_MODULE_TAGS       := optional
114LOCAL_SHARED_LIBRARIES  := liblog libdl
115LOCAL_CFLAGS            := $(OMXCORE_CFLAGS)
116
117LOCAL_SRC_FILES         := src/common/omx_core_cmp.cpp
118LOCAL_SRC_FILES         += src/common/qc_omx_core.c
119ifneq (,$(filter msm8916 msm8994 msm8909 thulium msm8952 msm8992,$(TARGET_BOARD_PLATFORM)))
120LOCAL_SRC_FILES         += src/$(MM_CORE_TARGET)/registry_table.c
121else
122LOCAL_SRC_FILES         += src/$(MM_CORE_TARGET)/qc_registry_table.c
123endif
124
125include $(BUILD_SHARED_LIBRARY)
126
127endif #BUILD_TINY_ANDROID
128