host_bios: Add K2L support
[processor-sdk/big-data-ipc-examples.git] / host_bios / simple_buffer_example / makefile
1 #
2 #  Copyright (c) 2017 Texas Instruments Incorporated - http://www.ti.com
3 #  All rights reserved.
4 #
5 #  Redistribution and use in source and binary forms, with or without
6 #  modification, are permitted provided that the following conditions
7 #  are met:
8 #
9 #  *  Redistributions of source code must retain the above copyright
10 #     notice, this list of conditions and the following disclaimer.
11 #
12 #  *  Redistributions in binary form must reproduce the above copyright
13 #     notice, this list of conditions and the following disclaimer in the
14 #     documentation and/or other materials provided with the distribution.
15 #
16 #  *  Neither the name of Texas Instruments Incorporated nor the names of
17 #     its contributors may be used to endorse or promote products derived
18 #     from this software without specific prior written permission.
19 #
20 #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 #  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 #  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 #  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 #  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 #  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 #  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 #  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 #  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 #  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 #  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #
33 #
34 #  ======== makefile ========
35 #
37 # edit PROCLIST list to control how many executables to build
39 ifeq ($(PLATFORM),DRA7XX)
40 PROCLIST = host dsp
41 #PROCLIST = host ipu 
42 PROC_HOST_NAME = "HOST"
43 PROC_DSP_NAME = "DSP1"
44 #PROC_IPU_NAME = "IPU1"
45 PROC_NAME_LIST = "\\\"$(PROC_HOST_NAME)\\\", \\\"$(PROC_DSP_NAME)\\\""
46 #PROC_NAME_LIST = "\\\"$(PROC_HOST_NAME)\\\", \\\"$(PROC_IPU_NAME)\\\""
47 DSP_PLATFORM = ti.platforms.evmDRA7XX:dsp
48 HOST_PLATFORM = ti.platforms.evmDRA7XX:host
49 IPU_PLATFORM = ti.platforms.evmDRA7XX:ipu
50 SERVER = "$(PROC_DSP_NAME)"
51 BOARD_NAME = "idkAM572x"
52 else ifeq ($(PLATFORM),TCI6638)
53 PROCLIST = host dsp
54 PROC_HOST_NAME = "HOST"
55 PROC_DSP_NAME = "CORE0"
56 PROC_NAME_LIST = "\\\"$(PROC_HOST_NAME)\\\", \\\"$(PROC_DSP_NAME)\\\""
57 DSP_PLATFORM = ti.platforms.evmTCI6636K2H:dsp
58 HOST_PLATFORM = ti.platforms.evmTCI6636K2H:host
59 SERVER = "$(PROC_DSP_NAME)"
60 BOARD_NAME = "evmK2K"
61 else ifeq ($(PLATFORM),TCI6636)
62 PROCLIST = host dsp
63 PROC_HOST_NAME = "HOST"
64 PROC_DSP_NAME = "CORE0"
65 PROC_NAME_LIST = "\\\"$(PROC_HOST_NAME)\\\", \\\"$(PROC_DSP_NAME)\\\""
66 DSP_PLATFORM = ti.platforms.evmTCI6636K2H:dsp
67 HOST_PLATFORM = ti.platforms.evmTCI6636K2H:host
68 SERVER = "$(PROC_DSP_NAME)"
69 BOARD_NAME = "evmK2H"
70 else ifeq ($(PLATFORM),66AK2G)
71 PROCLIST = host dsp
72 PROC_HOST_NAME = "HOST"
73 PROC_DSP_NAME = "CORE0"
74 PROC_NAME_LIST = "\\\"$(PROC_HOST_NAME)\\\", \\\"$(PROC_DSP_NAME)\\\""
75 DSP_PLATFORM = ti.platforms.evmTCI66AK2G02:dsp
76 HOST_PLATFORM = ti.platforms.evmTCI66AK2G02:host
77 BOARD_NAME = "evmK2G"
78 SERVER = "$(PROC_DSP_NAME)"
79 else ifeq ($(PLATFORM),66AK2E)
80 PROCLIST = host dsp
81 PROC_HOST_NAME = "HOST"
82 PROC_DSP_NAME = "CORE0"
83 PROC_NAME_LIST = "\\\"$(PROC_HOST_NAME)\\\", \\\"$(PROC_DSP_NAME)\\\""
84 DSP_PLATFORM = ti.platforms.evmC66AK2E:dsp
85 HOST_PLATFORM = ti.platforms.evmC66AK2E:host
86 BOARD_NAME = "evmK2E"
87 SERVER = "$(PROC_DSP_NAME)"
88 else ifeq ($(PLATFORM),TCI6630)
89 PROCLIST = host dsp
90 PROC_HOST_NAME = "HOST"
91 PROC_DSP_NAME = "CORE0"
92 PROC_NAME_LIST = "\\\"$(PROC_HOST_NAME)\\\", \\\"$(PROC_DSP_NAME)\\\""
93 DSP_PLATFORM = ti.platforms.evmTCI6630K2L:dsp
94 HOST_PLATFORM = ti.platforms.evmTCI6630K2L:host
95 BOARD_NAME = "evmK2L"
96 SERVER = "$(PROC_DSP_NAME)"
97 endif
99 EXBASE = .
100 include $(EXBASE)/products.mak
101 .PHONY: $(PROCLIST)
103 .PHONY: install install_rov
105 all: $(PROCLIST)
106         @echo $(PROCLIST)
108 $(PROCLIST):
109         @$(ECHO) "#"
110         @$(ECHO) "# Making $@ ..."
111         $(MAKE) -C $@ PROCLIST="$(PROCLIST)" \
112                 DSP_PLATFORM=$(DSP_PLATFORM) \
113                 HOST_PLATFORM=$(HOST_PLATFORM) \
114                 PROC_HOST_NAME="$(PROC_HOST_NAME)" \
115                 PROC_DSP_NAME="$(PROC_DSP_NAME)" \
116                 PROC_NAME_LIST=$(PROC_NAME_LIST) \
117                 BOARD_NAME="$(BOARD_NAME)" \
118                 SERVER="$(SERVER)"
120 #               IPU_PLATFORM=$(IPU_PLATFORM) \
121 #               PROC_IPU_NAME="$(PROC_IPU_NAME)" \
123 help:
124         @$(ECHO) "make                                  # build executables"
125         @$(ECHO) "make clean                            # clean everything"
126         @$(ECHO) "make install EXEC_DIR=/.../testbench  # install folder"
128 # setup install goal
129 ifeq ($(filter $(MAKECMDGOALS),install install_rov),$(MAKECMDGOALS))
130 ifeq (,$(EXEC_DIR))
131 EXEC_DIR=$(CURDIR)/install
132 endif
133 override EXEC_DIR:=$(EXEC_DIR)/simple_buffer_example
134 endif
136 install: $(PROCLIST) $(addsuffix _install,$(PROCLIST))
137 $(addsuffix _install,$(PROCLIST)):
138         @$(ECHO) "#"
139         @$(ECHO) "# Making $@ ..."
140 #       @$(MKDIR) $(EXEC_DIR)/debug
141         @$(MKDIR) $(EXEC_DIR)/release
142         $(MAKE) -C $(subst _install,,$@) EXEC_DIR=$(EXEC_DIR) install
144 install_rov: $(PROCLIST) $(addsuffix _install_rov,$(PROCLIST))
145 $(addsuffix _install_rov,$(PROCLIST)):
146         @$(ECHO) "#"
147         @$(ECHO) "# Making $@ ..."
148         @$(MKDIR) $(EXEC_DIR)/release
149         $(MAKE) -C $(subst _install_rov,,$@) EXEC_DIR=$(EXEC_DIR) install_rov
151 clean: $(addsuffix _clean,$(PROCLIST))
152         $(RMDIR) install
154 $(addsuffix _clean,$(PROCLIST)):
155         $(MAKE) -C $(subst _clean,,$@) clean
157 #  ======== standard macros ========
158 ifneq (,$(wildcard $(XDC_INSTALL_DIR)/xdc.exe))
159     # use these on Windows
160     CP      = $(XDC_INSTALL_DIR)/bin/cp
161     ECHO    = $(XDC_INSTALL_DIR)/bin/echo
162     INSTALL = $(XDC_INSTALL_DIR)/bin/cp
163     MKDIR   = $(XDC_INSTALL_DIR)/bin/mkdir -p
164     RM      = $(XDC_INSTALL_DIR)/bin/rm -f
165     RMDIR   = $(XDC_INSTALL_DIR)/bin/rm -rf
166 else
167     # use these on Linux
168     CP      = cp
169     ECHO    = echo
170     INSTALL = install
171     MKDIR   = mkdir -p
172     RM      = rm -f
173     RMDIR   = rm -rf
174 endif