]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - ipc-bios.mak
trace: Update to remove direct dependence on SysMin
[ipc/ipcdev.git] / ipc-bios.mak
1 #
2 #   Copyright (c) 2012-2018, 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 #  ======== ipc-bios.mak ========
32 #
34 #
35 # Where to install/stage the packages
36 # Typically this would point to the devkit location
37 #
38 DESTDIR ?= <UNDEFINED>
40 packagesdir ?= /packages
41 libdir ?= /lib
42 includedir ?= /include
44 ifeq ($(docdir),)
45 docdir := /share/ti/ipc/doc
46 packagedocdir := /docs/ipc
47 else
48 packagedocdir := $(docdir)
49 endif
51 ifeq ($(prefix),)
52 prefix := /usr
53 packageprefix := /
54 else
55 packageprefix := $(prefix)
56 endif
58 #Products.mak can be overriden by SDK top level Rules.make file
59 RULES_MAKE ?= ./products.mak
60 include $(RULES_MAKE)
62 #
63 # Set XDCARGS to some of the variables above.  XDCARGS are passed
64 # to the XDC build engine... which will load ipc-bios.bld... which will
65 # extract these variables and use them to determine what to build and which
66 # toolchains to use.
67 #
68 # Note that not all of these variables need to be set to something valid.
69 # Unfortunately, since these vars are unconditionally assigned, your build line
70 # will be longer and more noisy than necessary (e.g., it will include C66
71 # assignment even if you're just building for C64P).
72 #
73 # Some background is here:
74 #     http://rtsc.eclipse.org/docs-tip/Command_-_xdc#Environment_Variables
75 #
76 XDCARGS= \
77     PLATFORM=\"$(PLATFORM)\" \
78     BIOS_SMPENABLED=\"$(BIOS_SMPENABLED)\" \
79     ti.targets.C64P=\"$(ti.targets.C64P)\" \
80     ti.targets.C64P_big_endian=\"$(ti.targets.C64P_big_endian)\" \
81     ti.targets.C674=\"$(ti.targets.C674)\" \
82     ti.targets.arm.elf.Arm9=\"$(ti.targets.arm.elf.Arm9)\" \
83     ti.targets.arm.elf.A8F=\"$(ti.targets.arm.elf.A8F)\" \
84     ti.targets.arm.elf.A8Fnv=\"$(ti.targets.arm.elf.A8Fnv)\" \
85     ti.targets.arm.elf.M3=\"$(ti.targets.arm.elf.M3)\" \
86     ti.targets.arm.elf.M4=\"$(ti.targets.arm.elf.M4)\" \
87     ti.targets.arm.elf.M4F=\"$(ti.targets.arm.elf.M4F)\" \
88     ti.targets.arm.elf.R5F=\"$(ti.targets.arm.elf.R5F)\" \
89     ti.targets.elf.C64P=\"$(ti.targets.elf.C64P)\" \
90     ti.targets.elf.C64P_big_endian=\"$(ti.targets.elf.C64P_big_endian)\" \
91     ti.targets.elf.C64T=\"$(ti.targets.elf.C64T)\" \
92     ti.targets.elf.C66=\"$(ti.targets.elf.C66)\" \
93     ti.targets.elf.C66_big_endian=\"$(ti.targets.elf.C66_big_endian)\" \
94     ti.targets.elf.C674=\"$(ti.targets.elf.C674)\" \
95     ti.targets.arp32.elf.ARP32=\"$(ti.targets.arp32.elf.ARP32)\" \
96     ti.targets.arp32.elf.ARP32_far=\"$(ti.targets.arp32.elf.ARP32_far)\" \
97     gnu.targets.arm.A8F=\"$(gnu.targets.arm.A8F)\" \
98     gnu.targets.arm.A15F=\"$(gnu.targets.arm.A15F)\" \
99     gnu.targets.arm.A53F=\"$(gnu.targets.arm.A53F)\"
101 ifeq ($(MAKECMDGOALS),release)
102     XDCARGS += GOAL=release
103 endif
106 # Get list of packages to rebuild. Remove examples from the list.
108 XDCPKG := $(XDC_INSTALL_DIR)/bin/xdcpkg
110 # Check for Windows specific env vars to determine if we are on Windows
111 ifneq (,$(findstring :,$(WINDIR)$(windir)$(COMSPEC)$(comspec)))
112    # Replace '/' with '\' because cmd.exe requires '\'s in command names
113    XDCPKG := $(subst /,\,$(XDCPKG))
114 endif
116 LIST = $(shell $(XDCPKG) ./packages)
119 # Set XDCPATH to contain necessary repositories.
121 XDCPATH = $(BIOS_INSTALL_DIR)/packages
122 ifeq ($(PDK_INSTALL_DIR),)
123 XDCPATH = $(BIOS_INSTALL_DIR)/packages
124 else
125 XDCPATH = $(BIOS_INSTALL_DIR)/packages;${PDK_INSTALL_DIR}/packages
126 endif
127 export XDCPATH
130 # Set XDCOPTIONS.  Use -v for a verbose build.
132 #XDCOPTIONS=v
133 export XDCOPTIONS
136 # Set XDC executable command
137 # Note that XDCBUILDCFG points to the ipc-bios.bld file which uses
138 # the arguments specified by XDCARGS
140 XDC = $(XDC_INSTALL_DIR)/xdc $(JOBS) XDCARGS="$(XDCARGS)" XDCBUILDCFG=./ipc-bios.bld
142 ######################################################
143 ## Shouldnt have to modify anything below this line ##
144 ######################################################
146 all:
147         @echo building ipc packages ...
148 # build everything in the Bios IPC package
149         @$(XDC) -P $(LIST)
151 interfaces:
152         @echo building interfaces for  ipc packages ...
153         @$(patsubst ${JOBS},,$(XDC)) .interfaces -P $(LIST)
155 libs:
156         @echo "#"
157         @echo "# Making $@ ..."
158         @$(XDC) .dlls -P $(patsubst %/tests,,$(LIST))
160 release: interfaces
161         @echo building ipc packages ...
162 # create a XDC release for the Bios IPC package
163         @$(XDC) release -P $(LIST)
165 clean:
166         @ echo cleaning ipc packages ...
167         @ $(XDC) clean -Pr ./packages
169 install-packages:
170         @ echo installing ipc packages to $(DESTDIR) ...
171         @ mkdir -p $(DESTDIR)/$(packageprefix)/$(packagedocdir)
172         @ cp -rf $(wildcard ipc_*_release_notes.html) docs/* $(DESTDIR)/$(packageprefix)/$(packagedocdir)
173         @ mkdir -p $(DESTDIR)/$(packageprefix)/$(packagesdir)
174         @ cp -rf packages/* $(DESTDIR)/$(packageprefix)/$(packagesdir)
176 install:
177         @ echo installing ti/ipc to $(DESTDIR) ...
178         @ mkdir -p $(DESTDIR)/$(prefix)/$(docdir)
179         @ cp -rf $(wildcard ipc_*_release_notes.html) docs/* $(DESTDIR)/$(prefix)/$(docdir)
180         @ mkdir -p $(DESTDIR)/$(prefix)/$(includedir)/ti/ipc
181         @ cp -rf packages/ti/ipc/*.h $(DESTDIR)/$(prefix)/$(includedir)/ti/ipc