Makefile: Include GATE related sources for all platforms.
[ipc/ipcdev.git] / linux / src / daemon / Makefile.am
1 ##
2 ##  Copyright (c) 2013-2015 Texas Instruments Incorporated - http://www.ti.com
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/daemon/Makefile.am ========
32 ##
34 # additional include paths necessary to compile the program
35 AM_CFLAGS = -I$(top_srcdir)/hlos_common/include -D_GNU_SOURCE -Wall -pthread \
36         -DKERNEL_INSTALL_DIR="$(KERNEL_INSTALL_DIR)"
38 if DRA7XX
39 AM_CFLAGS += -DGATEMP_SUPPORT
40 endif
42 if KERNEL_INSTALL_DIR
43 AM_CFLAGS += -I$(KERNEL_INSTALL_DIR)/include/generated/uapi
44 endif
46 if AF_RPMSG
47 AM_CFLAGS += -DAF_RPMSG=$(AF_RPMSG)
48 endif
50 AM_CFLAGS += -I$(top_srcdir)/linux/include -I$(top_srcdir)/packages @AM_CFLAGS@
52 ###############################################################################
53 # THE PROGRAMS TO BUILD
54 ###############################################################################
56 # the program to build (the names of the final binaries)
57 bin_PROGRAMS =
59 if OMAP54XX_SMP
60   bin_PROGRAMS += lad_omap54xx_smp
61 else
62 if DRA7XX
63   bin_PROGRAMS += lad_dra7xx
64 else
65 if OMAPL138
66   bin_PROGRAMS += lad_omapl138
67 else
68 if C66AK2E
69   bin_PROGRAMS += lad_66ak2e
70 else
71 if TCI6614
72   bin_PROGRAMS += lad_tci6614
73 else
74 if TCI6630
75   bin_PROGRAMS += lad_tci6630
76 else
77 if TCI6636
78   bin_PROGRAMS += lad_tci6636
79 else
80 if TCI6638
81   bin_PROGRAMS += lad_tci6638
82 else
83 if C66AK2G
84   bin_PROGRAMS += lad_66ak2g
85 else
86   bin_PROGRAMS += lad_omap54xx_smp lad_dra7xx lad_omapl138 lad_66ak2e lad_tci6614 lad_tci6630 lad_tci6636 lad_tci6638 lad_66ak2g
87 endif
88 endif
89 endif
90 endif
91 endif
92 endif
93 endif
94 endif
95 endif
97 common_sources = \
98                 lad.c \
99                 Ipc_daemon.c \
100                 cfg/IpcCfg.c \
101                 MessageQ_daemon.c \
102                 cfg/MessageQCfg.c \
103                 MultiProc_daemon.c \
104                 NameServer_daemon.c \
105                 $(top_srcdir)/linux/include/ti/ipc/Std.h \
106                 $(top_srcdir)/hlos_common/include/_NameServerRemoteRpmsg.h \
107                 $(top_srcdir)/hlos_common/include/_MessageQ.h \
108                 $(top_srcdir)/hlos_common/include/_NameServer.h \
109                 $(top_srcdir)/linux/include/_Ipc.h \
110                 $(top_srcdir)/linux/include/_MultiProc.h \
111                 $(top_srcdir)/linux/include/_lad.h \
112                 $(top_srcdir)/linux/include/SocketFxns.h \
113                 $(top_srcdir)/linux/include/ladclient.h \
114                 $(top_srcdir)/linux/include/net/rpmsg.h \
115                 $(top_srcdir)/packages/ti/ipc/MessageQ.h \
116                 $(top_srcdir)/packages/ti/ipc/NameServer.h \
117                 $(top_srcdir)/packages/ti/ipc/MultiProc.h
119 common_sources += \
120                 GateMP_daemon.c \
121                 GateHWSpinlock.c \
122                 GateHWSpinlock_daemon.c \
123                 cfg/GateHWSpinlockCfg_dra7xx.c \
124                 $(top_srcdir)/linux/src/api/gates/GateMutex.c \
125                 $(top_srcdir)/linux/include/_GateMP.h \
126                 $(top_srcdir)/linux/include/_GateMP_daemon.h \
127                 $(top_srcdir)/linux/include/IGateProvider.h \
128                 $(top_srcdir)/linux/include/GateHWSpinlock.h \
129                 $(top_srcdir)/linux/include/GateMutex.h \
130                 $(top_srcdir)/linux/include/GateMP_config.h \
131                 $(top_srcdir)/packages/ti/ipc/GateMP.h
133 # list of sources for the 'lad' binary and to add to the source distribution
135 # NOTE:  6636_SOURCES using 6638.c is not a typo!  6636 has the same
136 # MultiProc config as 6638, so we reuse that source file.
137 lad_omap54xx_smp_SOURCES = $(common_sources) cfg/MultiProcCfg_omap54xx_smp.c
138 lad_dra7xx_SOURCES = $(common_sources) cfg/MultiProcCfg_dra7xx.c
139 lad_omapl138_SOURCES = $(common_sources) cfg/MultiProcCfg_omapl138.c
140 lad_66ak2e_SOURCES = $(common_sources) cfg/MultiProcCfg_66ak2e.c
141 lad_tci6614_SOURCES = $(common_sources) cfg/MultiProcCfg_tci6614.c
142 lad_tci6630_SOURCES = $(common_sources) cfg/MultiProcCfg_tci6630.c
143 lad_tci6636_SOURCES = $(common_sources) cfg/MultiProcCfg_tci6638.c
144 lad_tci6638_SOURCES = $(common_sources) cfg/MultiProcCfg_tci6638.c
145 lad_66ak2g_SOURCES = $(common_sources) cfg/MultiProcCfg_66ak2g.c
147 common_libraries = -lpthread \
148                 $(top_builddir)/linux/src/utils/libtiipcutils_lad.la
150 # the additional libraries needed to link program
151 lad_omap54xx_smp_LDADD = $(common_libraries) \
152                 $(AM_LDFLAGS)
153 lad_dra7xx_LDADD = $(common_libraries) \
154                 $(AM_LDFLAGS)
155 lad_omapl138_LDADD = $(common_libraries) \
156                 $(AM_LDFLAGS)
157 lad_66ak2e_LDADD = $(common_libraries) \
158                 $(AM_LDFLAGS)
159 lad_tci6614_LDADD = $(common_libraries) \
160                 $(AM_LDFLAGS)
161 lad_tci6630_LDADD = $(common_libraries) \
162                 $(AM_LDFLAGS)
163 lad_tci6636_LDADD = $(common_libraries) \
164                 $(AM_LDFLAGS)
165 lad_tci6638_LDADD = $(common_libraries) \
166                 $(AM_LDFLAGS)
167 lad_66ak2g_LDADD = $(common_libraries) \
168                 $(AM_LDFLAGS)
170 ###############################################################################