Android: Refactored Makefiles into a single Android.mk file
[ipc/ipcdev.git] / Android.mk
1 #
2 #   Copyright (c) 2015, Texas Instruments Incorporated
3 #
4 #   Redistribution and use in source and binary forms, with or without
5 #   modification, are permitted provided that the following conditions
6 #   are met:
7 #
8 #   *  Redistributions of source code must retain the above copyright
9 #      notice, this list of conditions and the following disclaimer.
10 #
11 #   *  Redistributions in binary form must reproduce the above copyright
12 #      notice, this list of conditions and the following disclaimer in the
13 #      documentation and/or other materials provided with the distribution.
14 #
15 #   *  Neither the name of Texas Instruments Incorporated nor the names of
16 #      its contributors may be used to endorse or promote products derived
17 #      from this software without specific prior written permission.
18 #
19 #   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 #   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21 #   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 #   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 #   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 #   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 #   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26 #   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27 #   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28 #   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
29 #   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 #
32 LOCAL_PATH:= $(call my-dir)
34 ############### libtiipc ###############
35 include $(CLEAR_VARS)
37 LOCAL_C_INCLUDES +=  $(LOCAL_PATH)/linux/include \
38                      $(LOCAL_PATH)/packages \
39                      $(LOCAL_PATH)/hlos_common/include
41 LOCAL_CFLAGS += -DIPC_BUILDOS_ANDROID -DGATEMP_SUPPORT -fPIC
42 LOCAL_MODULE_TAGS:= optional
44 LOCAL_SRC_FILES:= linux/src/api/MultiProc.c \
45                   linux/src/api/NameServer.c \
46                   linux/src/api/Ipc.c \
47                   linux/src/api/MessageQ.c \
48                   linux/src/api/gates/GateMP.c \
49                   linux/src/api/gates/GateMutex.c \
50                   linux/src/api/gates/GateHWSpinlock.c
52 LOCAL_SHARED_LIBRARIES := \
53     liblog libtiipcutils
55 LOCAL_MODULE:= libtiipc
56 include $(BUILD_SHARED_LIBRARY)
59 ############### libtiipcutils ###############
60 include $(CLEAR_VARS)
62 LOCAL_C_INCLUDES +=  $(LOCAL_PATH)/linux/include \
63                      $(LOCAL_PATH)/packages \
64                      $(LOCAL_PATH)/hlos_common/include
66 LOCAL_CFLAGS += -DIPC_BUILDOS_ANDROID
67 LOCAL_MODULE_TAGS:= optional
69 LOCAL_SRC_FILES:= linux/src/utils/LAD_client.c \
70                   linux/src/utils/SocketFxns.c \
71                   linux/src/utils/MultiProc_app.c \
72                   hlos_common/src/utils/MultiProc.c
74 LOCAL_SHARED_LIBRARIES := \
75     liblog
77 LOCAL_MODULE:= libtiipcutils
78 include $(BUILD_SHARED_LIBRARY)
81 ############### libtiipcutils_lad ###############
82 include $(CLEAR_VARS)
84 LOCAL_C_INCLUDES +=  $(LOCAL_PATH)/linux/include \
85                      $(LOCAL_PATH)/packages \
86                      $(LOCAL_PATH)/hlos_common/include
88 LOCAL_CFLAGS += -DIPC_BUILDOS_ANDROID
89 LOCAL_MODULE_TAGS:= optional
91 LOCAL_SRC_FILES:= linux/src/utils/LAD_client.c \
92                   linux/src/utils/SocketFxns.c \
93                   hlos_common/src/utils/MultiProc.c
95 LOCAL_SHARED_LIBRARIES := \
96     liblog
98 LOCAL_ALLOW_UNDEFINED_SYMBOLS:= true
100 LOCAL_MODULE:= libtiipcutils_lad
101 include $(BUILD_SHARED_LIBRARY)
104 ############### libtitransportrpmsg ###############
105 include $(CLEAR_VARS)
107 LOCAL_C_INCLUDES +=  $(LOCAL_PATH)/linux/include \
108                      $(LOCAL_PATH)/packages \
109                      $(LOCAL_PATH)/hlos_common/include
111 LOCAL_CFLAGS += -DIPC_BUILDOS_ANDROID
112 LOCAL_MODULE_TAGS:= optional
114 LOCAL_SRC_FILES:= linux/src/transport/TransportRpmsg.c
116 LOCAL_SHARED_LIBRARIES := \
117     liblog libtiipcutils libtiipc
119 LOCAL_MODULE:= libtitransportrpmsg
120 include $(BUILD_SHARED_LIBRARY)
123 ############### libmmrpc ###############
124 include $(CLEAR_VARS)
126 LOCAL_C_INCLUDES += $(LOCAL_PATH) \
127                     $(LOCAL_PATH)/packages
129 LOCAL_CFLAGS += -DIPC_BUILDOS_ANDROID
130 LOCAL_MODULE_TAGS:= optional
132 LOCAL_SRC_FILES:= packages/ti/ipc/mm/MmRpc.c
134 LOCAL_SHARED_LIBRARIES := \
135     liblog
137 LOCAL_MODULE:= libmmrpc
138 include $(BUILD_SHARED_LIBRARY)
141 ############### lad_dra7xx ###############
142 include $(CLEAR_VARS)
144 LOCAL_C_INCLUDES +=  $(LOCAL_PATH)/linux/include \
145                      $(LOCAL_PATH)/packages \
146                      $(LOCAL_PATH)/hlos_common/include
148 LOCAL_CFLAGS += -DIPC_BUILDOS_ANDROID -DGATEMP_SUPPORT
149 LOCAL_MODULE_TAGS:= optional
151 LOCAL_SRC_FILES:= linux/src/daemon/lad.c \
152                   linux/src/daemon/Ipc_daemon.c \
153                   linux/src/daemon/MessageQ_daemon.c \
154                   linux/src/daemon/MultiProc_daemon.c \
155                   linux/src/daemon/NameServer_daemon.c \
156                   linux/src/daemon/cfg/MultiProcCfg_dra7xx.c \
157                   linux/src/daemon/GateMP_daemon.c \
158                   linux/src/daemon/GateHWSpinlock.c \
159                   linux/src/daemon/GateHWSpinlock_daemon.c \
160                   linux/src/daemon/cfg/GateHWSpinlockCfg_dra7xx.c \
161                   linux/src/daemon/cfg/IpcCfg.c \
162                   linux/src/daemon/cfg/MessageQCfg.c \
163                   linux/src/api/gates/GateMutex.c
165 LOCAL_SHARED_LIBRARIES := \
166     liblog libtiipcutils_lad
168 LOCAL_MODULE:= lad_dra7xx
169 include $(BUILD_EXECUTABLE)
172 ############### MessageQApp ###############
173 include $(CLEAR_VARS)
175 LOCAL_C_INCLUDES +=  $(LOCAL_PATH)/linux/include \
176                      $(LOCAL_PATH)/packages
178 LOCAL_CFLAGS += -DIPC_BUILDOS_ANDROID
179 LOCAL_MODULE_TAGS:= optional
181 LOCAL_SRC_FILES:= linux/src/tests/MessageQApp.c
183 LOCAL_SHARED_LIBRARIES := \
184     liblog libtiipcutils libtiipc libtitransportrpmsg
186 LOCAL_MODULE:= messageQApp
187 include $(BUILD_EXECUTABLE)
190 ############### MessageQBench ###############
191 include $(CLEAR_VARS)
193 LOCAL_C_INCLUDES +=  $(LOCAL_PATH)/linux/include \
194                      $(LOCAL_PATH)/packages
196 LOCAL_CFLAGS += -DIPC_BUILDOS_ANDROID
197 LOCAL_MODULE_TAGS:= optional
199 LOCAL_SRC_FILES:= linux/src/tests/MessageQBench.c
201 LOCAL_SHARED_LIBRARIES := \
202     liblog libtiipcutils libtiipc libtitransportrpmsg
204 LOCAL_MODULE:= messageQBench
205 include $(BUILD_EXECUTABLE)
208 ############### MessageQMulti ###############
209 include $(CLEAR_VARS)
211 LOCAL_C_INCLUDES +=  $(LOCAL_PATH)/linux/include \
212                      $(LOCAL_PATH)/packages
214 LOCAL_CFLAGS += -DIPC_BUILDOS_ANDROID
215 LOCAL_MODULE_TAGS:= optional
217 LOCAL_SRC_FILES:= linux/src/tests/MessageQMulti.c
219 LOCAL_SHARED_LIBRARIES := \
220     liblog libtiipcutils libtiipc libtitransportrpmsg
222 LOCAL_MODULE:= messageQMulti
223 include $(BUILD_EXECUTABLE)
226 ############# NameServerApp ###############
227 include $(CLEAR_VARS)
229 LOCAL_C_INCLUDES +=  $(LOCAL_PATH)/linux/include \
230                      $(LOCAL_PATH)/hlos_common/include \
231                      $(LOCAL_PATH)/packages
233 LOCAL_CFLAGS += -DIPC_BUILDOS_ANDROID
234 LOCAL_MODULE_TAGS:= optional
236 LOCAL_SRC_FILES:= linux/src/tests/NameServerApp.c
238 LOCAL_SHARED_LIBRARIES := \
239     liblog libtiipcutils libtiipc libtitransportrpmsg
241 LOCAL_MODULE:= nameServerApp
242 include $(BUILD_EXECUTABLE)
245 ############### ping_rpmsg ###############
246 include $(CLEAR_VARS)
248 LOCAL_C_INCLUDES +=  $(LOCAL_PATH)/linux/include
250 LOCAL_CFLAGS += -DIPC_BUILDOS_ANDROID
251 LOCAL_MODULE_TAGS:= optional
253 LOCAL_SRC_FILES:= linux/src/tests/ping_rpmsg.c
255 LOCAL_SHARED_LIBRARIES := \
256     liblog
258 LOCAL_MODULE:= ping_rpmsg
259 include $(BUILD_EXECUTABLE)