1 ##
2 ## Copyright (c) 2013-2014, 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 ##
31 ## ======== src/test/Makefile.am ========
32 ##
34 # additional include paths necessary to compile the program
35 AM_CFLAGS = -I$(top_srcdir)/linux/include \
36 -I$(top_srcdir)/hlos_common/include \
37 -I$(top_srcdir)/packages \
38 -I$(KERNEL_INSTALL_DIR)/include/generated/uapi \
39 -D_GNU_SOURCE -Wall @AM_CFLAGS@
41 if DRM
42 AM_CFLAGS += \
43 -I$(DRM_PREFIX)/usr/include \
44 -I$(DRM_PREFIX)/usr/include/libdrm \
45 -I$(DRM_PREFIX)/usr/include/omap
46 endif
48 if CMEM
49 AM_CFLAGS += \
50 -I$(CMEM_INSTALL_DIR)/include
51 endif
53 VPATH = ../../../packages/ti/ipc/tests
55 ###############################################################################
56 # THE PROGRAMS TO BUILD
57 ###############################################################################
59 # the program to build (the names of the final binaries)
60 bin_PROGRAMS = ping_rpmsg MessageQApp MessageQBench MessageQMulti \
61 NameServerApp Msgq100
64 if OMAP54XX_SMP
65 # Add platform specific bin application's here
66 bin_PROGRAMS +=
67 if KDIR
68 if DRM
69 bin_PROGRAMS += mmrpc_test
70 endif
71 endif
72 else
73 if DRA7XX
74 # Add platform specific bin application's here
75 bin_PROGRAMS +=
76 if CMEM
77 bin_PROGRAMS += GateMPApp
78 endif
79 if KDIR
80 if DRM
81 bin_PROGRAMS += mmrpc_test
82 endif
83 endif
84 else
85 if OMAPL138
86 # Add platform specific bin application's here
87 bin_PROGRAMS +=
88 if CMEM
89 bin_PROGRAMS += nano_test
90 endif
91 else
92 if C66AK2E
93 # Add platform specific bin application's here
94 bin_PROGRAMS +=
95 else
96 if TCI6614
97 # Add platform specific bin application's here
98 bin_PROGRAMS +=
99 else
100 if TCI6630
101 # Add platform specific bin applications here
102 bin_PROGRAMS +=
103 else
104 if TCI6636
105 # Add platform specific bin application's here
106 bin_PROGRAMS +=
107 else
108 if TCI6638
109 # Add platform specific bin application's here
110 bin_PROGRAMS +=
111 else
112 # Add platform independent apps here or above in bin_PROGRAMS
113 if CMEM
114 bin_PROGRAMS += nano_test
115 endif
116 if KDIR
117 if DRM
118 bin_PROGRAMS += mmrpc_test
119 endif
120 endif
121 endif
122 endif
123 endif
124 endif
125 endif
126 endif
127 endif
128 endif
130 common_sources = \
131 $(top_srcdir)/linux/include/ti/ipc/Std.h \
132 $(top_srcdir)/packages/ti/ipc/Ipc.h \
133 $(top_srcdir)/packages/ti/ipc/MessageQ.h
135 nameServer_common_sources = \
136 $(top_srcdir)/linux/include/ti/ipc/Std.h \
137 $(top_srcdir)/linux/include/ladclient.h \
138 $(top_srcdir)/hlos_common/include/_NameServer.h \
139 $(top_srcdir)/packages/ti/ipc/NameServer.h \
140 NameServerApp.c
142 # list of sources for the 'ping_rpmsg' binary
143 ping_rpmsg_SOURCES = ping_rpmsg.c
145 # list of sources for the 'mmrpc_test' binary
146 mmrpc_test_SOURCES = $(top_srcdir)/packages/ti/ipc/tests/Mx.c \
147 $(top_srcdir)/packages/ti/ipc/tests/Mx.h \
148 $(top_srcdir)/packages/ti/ipc/tests/mmrpc_test.c
150 # list of sources for the 'MessageQApp' binary
151 MessageQApp_SOURCES = $(common_sources) MessageQApp.c
153 # list of sources for the 'MessageQBench' binary
154 MessageQBench_SOURCES = $(common_sources) MessageQBench.c
156 # list of sources for the 'MessageQMulti' binary
157 MessageQMulti_SOURCES = $(common_sources) MessageQMulti.c
159 # list of sources for the 'NameServerApp' binary
160 NameServerApp_SOURCES = $(nameServer_common_sources)
162 # list of sources for the 'nano_test' binary
163 nano_test_SOURCES = $(common_sources) nano_test.c
165 # list of sources for the 'Msgq100' binary
166 Msgq100_SOURCES = $(common_sources) Msgq100.c
168 # list of sources for the 'GateMPApp' binary
169 GateMPApp_SOURCES = $(common_sources) \
170 $(top_srcdir)/linux/src/tests/main_host.c \
171 $(top_srcdir)/linux/src/tests/GateMPApp.c \
172 $(top_srcdir)/linux/src/tests/GateMPApp.h \
173 $(top_srcdir)/packages/ti/ipc/GateMP.h \
174 $(top_srcdir)/packages/ti/ipc/tests/GateMPAppCommon.h
176 common_libraries = -lpthread $(top_builddir)/linux/src/api/libtiipc.la \
177 $(top_builddir)/linux/src/utils/libtiipcutils.la
179 # the additional libraries to link ping_rpmsg
180 ping_rpmsg_LDADD = -lrt
182 # the additional libraries to link mmrpc_test
183 mmrpc_test_LDADD = $(common_libraries) \
184 $(top_builddir)/linux/src/mm/libmmrpc.la \
185 $(DRM_PREFIX)/usr/lib/libdrm.la \
186 $(DRM_PREFIX)/usr/lib/libdrm_omap.la
188 # the additional libraries needed to link MessageQApp
189 MessageQApp_LDADD = $(common_libraries) \
190 $(AM_LDFLAGS)
192 # the additional libraries needed to link MessageQBench
193 MessageQBench_LDADD = $(common_libraries) -lrt \
194 $(AM_LDFLAGS)
196 # the additional libraries needed to link MessageQMulti
197 MessageQMulti_LDADD = $(common_libraries) \
198 $(AM_LDFLAGS)
200 # the additional libraries needed to link NameServerApp
201 NameServerApp_LDADD = $(common_libraries) \
202 $(AM_LDFLAGS)
204 # the additional libraries needed to link nano_test
205 nano_test_LDADD = $(common_libraries) \
206 $(CMEM_INSTALL_DIR)/src/cmem/api/.libs/libticmem.a \
207 $(AM_LDFLAGS)
209 # the additional libraries needed to link Msgq100
210 Msgq100_LDADD = $(common_libraries) \
211 $(AM_LDFLAGS)
213 # the additional libraries needed to link GateMPApp
214 GateMPApp_LDADD = $(common_libraries) \
215 $(CMEM_INSTALL_DIR)/src/cmem/api/.libs/libticmem.a \
216 $(AM_LDFLAGS)
218 ###############################################################################