Linux IPC: Resticted KERNEL dir config variable to omap54xx_smp builds
[ipc/ipcdev.git] / linux / src / tests / Makefile.am
1 ##
2 ##  Copyright (c) 2013, 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 -I$(top_srcdir)/packages  \
36         -I$(CMEM_INSTALL_DIR)/packages -D_GNU_SOURCE -Wall @AM_CFLAGS@
37 VPATH = ../../../packages/ti/ipc/tests
39 ###############################################################################
40 # THE PROGRAMS TO BUILD
41 ###############################################################################
43 # the program to build (the names of the final binaries)
44 bin_PROGRAMS = ping_rpmsg
46 if OMAP54XX_SMP
47   bin_PROGRAMS += MessageQApp_omap54xx_smp MessageQBench_omap54xx_smp \
48                 MessageQMulti_omap54xx_smp NameServerApp_omap54xx_smp
49 if KDIR
50   bin_PROGRAMS += mmrpc_test
51 endif
52 else
53 if OMAPL138
54   bin_PROGRAMS += MessageQApp_omapl138 MessageQBench_omapl138 \
55                 MessageQMulti_omapl138 NameServerApp_omapl138
56 if CMEM
57   bin_PROGRAMS += nano_test_omapl138
58 endif
59 else
60 if TCI6614
61   bin_PROGRAMS += MessageQApp_tci6614 MessageQBench_tci6614 \
62                 MessageQMulti_tci6614 NameServerApp_tci6614
63 else
64 if TCI6638
65   bin_PROGRAMS += MessageQApp_tci6638 MessageQBench_tci6638 \
66                 MessageQMulti_tci6638 NameServerApp_tci6638
67 else
68   bin_PROGRAMS += MessageQApp_omap54xx_smp MessageQBench_omap54xx_smp \
69                 MessageQMulti_omap54xx_smp NameServerApp_omap54xx_smp \
70                 MessageQApp_omapl138 MessageQBench_omapl138 \
71                 MessageQMulti_omapl138 NameServerApp_omapl138 \
72                 MessageQApp_tci6614 MessageQBench_tci6614 \
73                 MessageQMulti_tci6614 NameServerApp_tci6614 \
74                 MessageQApp_tci6638 MessageQBench_tci6638 \
75                 MessageQMulti_tci6638 NameServerApp_tci6638
76 if CMEM
77   bin_PROGRAMS += nano_test_omapl138
78 endif
79 endif
80 endif
81 endif
82 endif
84 common_sources = \
85                 $(top_srcdir)/linux/include/Std.h \
86                 $(top_srcdir)/packages/ti/ipc/Ipc.h \
87                 $(top_srcdir)/packages/ti/ipc/MessageQ.h
89 nameServer_common_sources = \
90                 $(top_srcdir)/linux/include/Std.h\
91                 $(top_srcdir)/linux/include/ladclient.h \
92                 $(top_srcdir)/linux/include/_NameServer.h \
93                 $(top_srcdir)/packages/ti/ipc/NameServer.h \
94                 NameServerApp.c
96 # list of sources for the 'ping_rpmsg' binary
97 ping_rpmsg_SOURCES = ping_rpmsg.c
99 # list of sources for the 'mmrpc_test' binary
100 mmrpc_test_SOURCES = Mx.c mmrpc_test.c
102 # list of sources for the 'MessageQApp' binary
103 MessageQApp_omap54xx_smp_SOURCES = $(common_sources) MessageQApp.c
104 MessageQApp_omapl138_SOURCES = $(common_sources) MessageQApp.c
105 MessageQApp_tci6614_SOURCES = $(common_sources) MessageQApp.c
106 MessageQApp_tci6638_SOURCES = $(common_sources) MessageQApp.c
108 # list of sources for the 'MessageQBench' binary
109 MessageQBench_omap54xx_smp_SOURCES = $(common_sources) MessageQBench.c
110 MessageQBench_omapl138_SOURCES = $(common_sources) MessageQBench.c
111 MessageQBench_tci6614_SOURCES  = $(common_sources) MessageQBench.c
112 MessageQBench_tci6638_SOURCES  = $(common_sources) MessageQBench.c
114 # list of sources for the 'MessageQMulti' binary
115 MessageQMulti_omap54xx_smp_SOURCES = $(common_sources) MessageQMulti.c
116 MessageQMulti_omapl138_SOURCES = $(common_sources) MessageQMulti.c
117 MessageQMulti_tci6614_SOURCES  = $(common_sources) MessageQMulti.c
118 MessageQMulti_tci6638_SOURCES  = $(common_sources) MessageQMulti.c
120 # list of sources for the 'NameServerApp' binary
121 NameServerApp_omap54xx_smp_SOURCES = $(nameServer_common_sources)
122 NameServerApp_omapl138_SOURCES = $(nameServer_common_sources)
123 NameServerApp_tci6614_SOURCES  = $(nameServer_common_sources)
124 NameServerApp_tci6638_SOURCES  = $(nameServer_common_sources)
126 # list of sources for the 'nano_test' binary
127 nano_test_omapl138_SOURCES = $(common_sources) nano_test.c
129 common_libraries = -lpthread $(top_builddir)/linux/src/api/libtiipc.la \
130                 $(top_builddir)/linux/src/utils/libtiipcutils.la
132 # the additional libraries to link ping_rpmsg
133 ping_rpmsg_LDADD = -lrt
135 # the additional libraries to link mmrpc_test
136 mmrpc_test_LDADD = $(top_builddir)/linux/src/mm/libmmrpc.la
138 # the additional libraries needed to link MessageQApp
139 MessageQApp_omap54xx_smp_LDADD = $(common_libraries) \
140                 $(top_builddir)/linux/src/family/libtiipccfg_omap54xx_smp.la \
141                 $(AM_LDFLAGS)
142 MessageQApp_omapl138_LDADD = $(common_libraries) \
143                 $(top_builddir)/linux/src/family/libtiipccfg_omapl138.la \
144                 $(AM_LDFLAGS)
145 MessageQApp_tci6614_LDADD = $(common_libraries) \
146                 $(top_builddir)/linux/src/family/libtiipccfg_tci6614.la \
147                 $(AM_LDFLAGS)
148 MessageQApp_tci6638_LDADD = $(common_libraries) \
149                 $(top_builddir)/linux/src/family/libtiipccfg_tci6638.la \
150                 $(AM_LDFLAGS)
152 # the additional libraries needed to link MessageQBench
153 MessageQBench_omap54xx_smp_LDADD = $(common_libraries) \
154                 $(top_builddir)/linux/src/family/libtiipccfg_omap54xx_smp.la -lrt \
155                 $(AM_LDFLAGS)
156 MessageQBench_omapl138_LDADD = $(common_libraries) \
157                 $(top_builddir)/linux/src/family/libtiipccfg_omapl138.la -lrt \
158                 $(AM_LDFLAGS)
159 MessageQBench_tci6614_LDADD = $(common_libraries) \
160                 $(top_builddir)/linux/src/family/libtiipccfg_tci6614.la -lrt \
161                 $(AM_LDFLAGS)
162 MessageQBench_tci6638_LDADD = $(common_libraries) \
163                 $(top_builddir)/linux/src/family/libtiipccfg_tci6638.la -lrt \
164                 $(AM_LDFLAGS)
166 # the additional libraries needed to link MessageQMulti
167 MessageQMulti_omap54xx_smp_LDADD = $(common_libraries) \
168                 $(top_builddir)/linux/src/family/libtiipccfg_omap54xx_smp.la \
169                 $(AM_LDFLAGS)
170 MessageQMulti_omapl138_LDADD = $(common_libraries) \
171                 $(top_builddir)/linux/src/family/libtiipccfg_omapl138.la \
172                 $(AM_LDFLAGS)
173 MessageQMulti_tci6614_LDADD = $(common_libraries) \
174                 $(top_builddir)/linux/src/family/libtiipccfg_tci6614.la \
175                 $(AM_LDFLAGS)
176 MessageQMulti_tci6638_LDADD = $(common_libraries) \
177                 $(top_builddir)/linux/src/family/libtiipccfg_tci6638.la \
178                 $(AM_LDFLAGS)
180 # the additional libraries needed to link NameServerApp
181 NameServerApp_omap54xx_smp_LDADD = $(common_libraries) \
182                 $(top_builddir)/linux/src/family/libtiipccfg_omap54xx_smp.la \
183                 $(AM_LDFLAGS)
184 NameServerApp_omapl138_LDADD = $(common_libraries) \
185                 $(top_builddir)/linux/src/family/libtiipccfg_omapl138.la \
186                 $(AM_LDFLAGS)
187 NameServerApp_tci6614_LDADD = $(common_libraries) \
188                 $(top_builddir)/linux/src/family/libtiipccfg_tci6614.la \
189                 $(AM_LDFLAGS)
190 NameServerApp_tci6638_LDADD = $(common_libraries) \
191                 $(top_builddir)/linux/src/family/libtiipccfg_tci6638.la \
192                 $(AM_LDFLAGS)
194 # the additional libraries needed to link nano_test
195 nano_test_omapl138_LDADD = $(common_libraries) \
196                 $(top_builddir)/linux/src/family/libtiipccfg_omapl138.la \
197                 $(CMEM_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/lib/cmem.a470MV \
198                 $(AM_LDFLAGS)
200 ###############################################################################