summaryrefslogtreecommitdiff
path: root/ipc-bios.mak
diff options
context:
space:
mode:
authorArnie Reynoso <arnier@ti.com>2013-02-19 10:20:15 -0800
committerChris Ring <cring@ti.com>2013-02-23 12:20:12 -0800
commit54fa164e681c60a356a108118f22fea32773ccb7 (patch)
tree3669be0708e5c7e2de066b109c856986480af3e1 /ipc-bios.mak
downloadipc-54fa164e681c60a356a108118f22fea32773ccb7.tar.gz
Initial commit
These sources roughly match the 'ipc-j09' tag from the previously internal development repo.
Diffstat (limited to 'ipc-bios.mak')
-rw-r--r--ipc-bios.mak163
1 files changed, 163 insertions, 0 deletions
diff --git a/ipc-bios.mak b/ipc-bios.mak
new file mode 100644
index 0000000..b822000
--- /dev/null
+++ b/ipc-bios.mak
@@ -0,0 +1,163 @@
+#
+# Copyright (c) 2012-2013, Texas Instruments Incorporated
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# * Neither the name of Texas Instruments Incorporated nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# ======== ipc.mak ========
+#
+
+#
+# Where to install/stage the packages
+# Typically this would point to the devkit location
+#
+DESTDIR ?= <UNDEFINED>
+
+packagesdir ?= /packages
+libdir ?= /lib
+includedir ?= /include
+
+ifeq ($(docdir),)
+docdir := /share/ti/ipc/doc
+packagedocdir := /docs/ipc
+else
+packagedocdir := $(docdir)
+endif
+
+ifeq ($(prefix),)
+prefix := /usr
+packageprefix := /
+else
+packageprefix := $(prefix)
+endif
+
+include ./products.mak
+
+#
+# Set XDCARGS to some of the variables above. XDCARGS are passed
+# to the XDC build engine... which will load ipc-bios.bld... which will
+# extract these variables and use them to determine what to build and which
+# toolchains to use.
+#
+# Note that not all of these variables need to be set to something valid.
+# Unfortunately, since these vars are unconditionally assigned, your build line
+# will be longer and more noisy than necessary (e.g., it will include C66
+# assignment even if you're just building for C64P).
+#
+# Some background is here:
+# http://rtsc.eclipse.org/docs-tip/Command_-_xdc#Environment_Variables
+#
+XDCARGS= \
+ ti.targets.C28_large=\"$(ti.targets.C28_large)\" \
+ ti.targets.C28_float=\"$(ti.targets.C28_float)\" \
+ ti.targets.C64P=\"$(ti.targets.C64P)\" \
+ ti.targets.C64P_big_endian=\"$(ti.targets.C64P_big_endian)\" \
+ ti.targets.C674=\"$(ti.targets.C674)\" \
+ ti.targets.arm.elf.Arm9=\"$(ti.targets.arm.elf.Arm9)\" \
+ ti.targets.arm.elf.A8F=\"$(ti.targets.arm.elf.A8F)\" \
+ ti.targets.arm.elf.A8Fnv=\"$(ti.targets.arm.elf.A8Fnv)\" \
+ ti.targets.arm.elf.M3=\"$(ti.targets.arm.elf.M3)\" \
+ ti.targets.arm.elf.M4=\"$(ti.targets.arm.elf.M4)\" \
+ ti.targets.arm.elf.M4F=\"$(ti.targets.arm.elf.M4F)\" \
+ ti.targets.elf.C64P=\"$(ti.targets.elf.C64P)\" \
+ ti.targets.elf.C64P_big_endian=\"$(ti.targets.elf.C64P_big_endian)\" \
+ ti.targets.elf.C64T=\"$(ti.targets.elf.C64T)\" \
+ ti.targets.elf.C66=\"$(ti.targets.elf.C66)\" \
+ ti.targets.elf.C66_big_endian=\"$(ti.targets.elf.C66_big_endian)\" \
+ ti.targets.elf.C674=\"$(ti.targets.elf.C674)\" \
+ ti.targets.arp32.elf.ARP32=\"$(ti.targets.arp32.elf.ARP32)\" \
+ ti.targets.arp32.elf.ARP32_far=\"$(ti.targets.arp32.elf.ARP32_far)\" \
+ gnu.targets.arm.A8F=\"$(gnu.targets.arm.A8F)\" \
+ gnu.targets.arm.A15F=\"$(gnu.targets.arm.A15F)\"
+
+#
+# Get list of packages to rebuild. Remove examples from the list.
+#
+XDCPKG := $(XDC_INSTALL_DIR)/bin/xdcpkg
+
+# Check for Windows specific env vars to determine if we are on Windows
+ifeq (,$(findstring :,$(WINDIR)$(windir)$(COMSPEC)$(comspec)))
+ FILTER = grep -v
+else
+ # Find is the rough equivalent of grep on Windows
+ FILTER = find /v
+ # Replace '/' with '\' because cmd.exe requires '\'s in command names
+ XDCPKG := $(subst /,\,$(XDCPKG))
+endif
+
+LIST = $(shell $(XDCPKG) ./packages | $(FILTER) "examples")
+
+#
+# Set XDCPATH to contain necessary repositories.
+#
+XDCPATH = $(BIOS_INSTALL_DIR)/packages
+export XDCPATH
+
+#
+# Set XDCOPTIONS. Use -v for a verbose build.
+#
+#XDCOPTIONS=v
+export XDCOPTIONS
+
+#
+# Set XDC executable command
+# Note that XDCBUILDCFG points to the ipc-bios.bld file which uses
+# the arguments specified by XDCARGS
+#
+XDC = $(XDC_INSTALL_DIR)/xdc XDCARGS="$(XDCARGS)" XDCBUILDCFG=./ipc-bios.bld
+
+######################################################
+## Shouldnt have to modify anything below this line ##
+######################################################
+
+all:
+ @ echo building ipc packages ...
+# build everything in the Bios IPC package
+ @ $(XDC) -P $(LIST)
+
+release:
+ @ echo building ipc packages ...
+# create a XDC release for the Bios IPC package
+ @ $(XDC) release -P $(LIST)
+
+clean:
+ @ echo cleaning ipc packages ...
+ @ $(XDC) clean -Pr ./packages
+
+install-packages:
+ @ echo installing ipc packages to $(DESTDIR) ...
+ @ mkdir -p $(DESTDIR)/$(packageprefix)/$(packagedocdir)
+ @ cp -rf $(wildcard ipc_*_release_notes.html) docs/* $(DESTDIR)/$(packageprefix)/$(packagedocdir)
+ @ mkdir -p $(DESTDIR)/$(packageprefix)/$(packagesdir)
+ @ cp -rf packages/* $(DESTDIR)/$(packageprefix)/$(packagesdir)
+
+install:
+ @ echo installing ti/ipc to $(DESTDIR) ...
+ @ mkdir -p $(DESTDIR)/$(prefix)/$(docdir)
+ @ cp -rf $(wildcard ipc_*_release_notes.html) docs/* $(DESTDIR)/$(prefix)/$(docdir)
+ @ mkdir -p $(DESTDIR)/$(prefix)/$(includedir)/ti/ipc
+ @ cp -rf packages/ti/ipc/*.h $(DESTDIR)/$(prefix)/$(includedir)/ti/ipc