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 += \
11    -Wall \
12    -Werror \
13    -Wno-unused-function \
14    -Wno-unused-value \
15    -Wno-unused-variable \
16
17#===============================================================================
18#             Figure out the targets
19#===============================================================================
20
21ifeq ($(TARGET_BOARD_PLATFORM),msm7627a)
22MM_CORE_TARGET = 7627A
23else ifeq ($(TARGET_BOARD_PLATFORM),msm7630_surf)
24MM_CORE_TARGET = 7630
25else ifeq ($(TARGET_BOARD_PLATFORM),msm8660)
26MM_CORE_TARGET = 8660
27#Comment out following line to disable drm.play component
28OMXCORE_CFLAGS += -DENABLE_DRMPLAY
29else ifeq ($(TARGET_BOARD_PLATFORM),msm8960)
30MM_CORE_TARGET = 8960
31else ifeq ($(TARGET_BOARD_PLATFORM),msm8974)
32MM_CORE_TARGET = 8974
33else ifeq ($(TARGET_BOARD_PLATFORM),msm8610)
34MM_CORE_TARGET = 8610
35else ifeq ($(TARGET_BOARD_PLATFORM),msm8226)
36MM_CORE_TARGET = 8226
37else ifeq ($(TARGET_BOARD_PLATFORM),msm8916)
38MM_CORE_TARGET = 8916
39else ifeq ($(TARGET_BOARD_PLATFORM),msm8909)
40MM_CORE_TARGET = 8909
41else ifeq ($(TARGET_BOARD_PLATFORM),msm8937)
42MM_CORE_TARGET = 8937
43else ifeq ($(TARGET_BOARD_PLATFORM),apq8084)
44MM_CORE_TARGET = 8084
45else ifeq ($(TARGET_BOARD_PLATFORM),mpq8092)
46MM_CORE_TARGET = 8092
47else ifeq ($(TARGET_BOARD_PLATFORM),msm8992)
48MM_CORE_TARGET = msm8992
49else ifeq ($(TARGET_BOARD_PLATFORM),msm8994)
50MM_CORE_TARGET = msm8994
51else ifeq ($(TARGET_BOARD_PLATFORM),msm8996)
52MM_CORE_TARGET = msm8996
53else ifeq ($(TARGET_BOARD_PLATFORM),msm8952)
54MM_CORE_TARGET = 8952
55else ifeq ($(TARGET_BOARD_PLATFORM),msm8953)
56MM_CORE_TARGET = msm8953
57else ifeq ($(TARGET_BOARD_PLATFORM),msm8998)
58MM_CORE_TARGET = msm8998
59else ifeq ($(TARGET_BOARD_PLATFORM),sdm660)
60MM_CORE_TARGET = sdm660
61else
62MM_CORE_TARGET = default
63endif
64
65#===============================================================================
66#             Deploy the headers that can be exposed
67#===============================================================================
68
69LOCAL_COPY_HEADERS_TO   := mm-core/omxcore
70LOCAL_COPY_HEADERS      := inc/OMX_Audio.h
71LOCAL_COPY_HEADERS      += inc/OMX_Component.h
72LOCAL_COPY_HEADERS      += inc/OMX_ContentPipe.h
73LOCAL_COPY_HEADERS      += inc/OMX_Core.h
74LOCAL_COPY_HEADERS      += inc/OMX_Image.h
75LOCAL_COPY_HEADERS      += inc/OMX_Index.h
76LOCAL_COPY_HEADERS      += inc/OMX_IVCommon.h
77LOCAL_COPY_HEADERS      += inc/OMX_Other.h
78LOCAL_COPY_HEADERS      += inc/OMX_QCOMExtns.h
79LOCAL_COPY_HEADERS      += inc/OMX_Types.h
80LOCAL_COPY_HEADERS      += inc/OMX_Video.h
81LOCAL_COPY_HEADERS      += inc/qc_omx_common.h
82LOCAL_COPY_HEADERS      += inc/qc_omx_component.h
83LOCAL_COPY_HEADERS      += inc/qc_omx_msg.h
84LOCAL_COPY_HEADERS      += inc/QOMX_AudioExtensions.h
85LOCAL_COPY_HEADERS      += inc/QOMX_AudioIndexExtensions.h
86LOCAL_COPY_HEADERS      += inc/OMX_CoreExt.h
87LOCAL_COPY_HEADERS      += inc/QOMX_CoreExtensions.h
88LOCAL_COPY_HEADERS      += inc/QOMX_FileFormatExtensions.h
89LOCAL_COPY_HEADERS      += inc/QOMX_IVCommonExtensions.h
90LOCAL_COPY_HEADERS      += inc/QOMX_SourceExtensions.h
91LOCAL_COPY_HEADERS      += inc/QOMX_VideoExtensions.h
92LOCAL_COPY_HEADERS      += inc/OMX_IndexExt.h
93LOCAL_COPY_HEADERS      += inc/OMX_VideoExt.h
94LOCAL_COPY_HEADERS      += inc/QOMX_StreamingExtensions.h
95LOCAL_COPY_HEADERS      += inc/QCMediaDefs.h
96LOCAL_COPY_HEADERS      += inc/QCMetaData.h
97
98#===============================================================================
99#             LIBRARY for Android apps
100#===============================================================================
101
102LOCAL_C_INCLUDES        := $(LOCAL_PATH)/src/common
103LOCAL_C_INCLUDES        += $(LOCAL_PATH)/inc
104LOCAL_PRELINK_MODULE    := false
105LOCAL_MODULE            := libOmxCore
106LOCAL_LICENSE_KINDS     := SPDX-license-identifier-BSD SPDX-license-identifier-MIT
107LOCAL_LICENSE_CONDITIONS := notice
108LOCAL_NOTICE_FILE       := $(LOCAL_PATH)/../NOTICE
109LOCAL_MODULE_TAGS       := optional
110LOCAL_VENDOR_MODULE     := true
111LOCAL_SHARED_LIBRARIES  := liblog libdl libcutils
112LOCAL_CFLAGS            := $(OMXCORE_CFLAGS)
113
114#ifneq (,$(filter msm8996 msm8998 sdm660,$(TARGET_BOARD_PLATFORM)))
115#LOCAL_SHARED_LIBRARIES  += libgpustats
116#endif
117
118LOCAL_SRC_FILES         := src/common/omx_core_cmp.cpp
119LOCAL_SRC_FILES         += src/common/qc_omx_core.c
120ifneq (,$(filter msm8916 msm8994 msm8909 msm8937 msm8996 msm8992 msm8952 msm8953 msm8998 sdm660,$(TARGET_BOARD_PLATFORM)))
121LOCAL_SRC_FILES         += src/$(MM_CORE_TARGET)/registry_table_android.c
122else
123LOCAL_SRC_FILES         += src/$(MM_CORE_TARGET)/qc_registry_table_android.c
124endif
125
126include $(BUILD_SHARED_LIBRARY)
127
128#===============================================================================
129#             LIBRARY for command line test apps
130#===============================================================================
131
132include $(CLEAR_VARS)
133
134LOCAL_C_INCLUDES        := $(LOCAL_PATH)/src/common
135LOCAL_C_INCLUDES        += $(LOCAL_PATH)/inc
136LOCAL_PRELINK_MODULE    := false
137LOCAL_MODULE            := libmm-omxcore
138LOCAL_LICENSE_KINDS     := SPDX-license-identifier-BSD SPDX-license-identifier-MIT
139LOCAL_LICENSE_CONDITIONS := notice
140LOCAL_NOTICE_FILE       := $(LOCAL_PATH)/../NOTICE
141LOCAL_MODULE_TAGS       := optional
142LOCAL_VENDOR_MODULE     := true
143LOCAL_SHARED_LIBRARIES  := liblog libdl libcutils
144LOCAL_CFLAGS            := $(OMXCORE_CFLAGS)
145
146#ifneq (,$(filter msm8996 msm8998 sdm660,$(TARGET_BOARD_PLATFORM)))
147#LOCAL_SHARED_LIBRARIES  += libgpustats
148#endif
149
150LOCAL_SRC_FILES         := src/common/omx_core_cmp.cpp
151LOCAL_SRC_FILES         += src/common/qc_omx_core.c
152ifneq (,$(filter msm8916 msm8994 msm8909 msm8937 msm8996 msm8992 msm8952 msm8953 msm8998 sdm660,$(TARGET_BOARD_PLATFORM)))
153LOCAL_SRC_FILES         += src/$(MM_CORE_TARGET)/registry_table.c
154else
155LOCAL_SRC_FILES         += src/$(MM_CORE_TARGET)/qc_registry_table.c
156endif
157
158include $(BUILD_SHARED_LIBRARY)
159
160endif #BUILD_TINY_ANDROID
161