1 #
2 # Copyright (c) 2012-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 # ======== 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/framework_components/doc
46 packagedocdir := /docs/framework_components
47 else
48 packagedocdir := $(docdir)
49 endif
51 ifeq ($(prefix),)
52 prefix := /usr
53 packageprefix := /
54 else
55 packageprefix := $(prefix)
56 endif
58 include ./products.mak
60 #
61 # Set XDCOPTIONS. Use -v for a verbose build.
62 #
63 #XDCOPTIONS=v
64 export XDCOPTIONS
66 # Set XDCARGS to some of the variables above. XDCARGS are passed
67 # to the XDC build engine... which will load ipc-bios.bld... which will
68 # extract these variables and use them to determine what to build and which
69 # toolchains to use.
70 #
71 # Note that not all of these variables need to be set to something valid.
72 # Unfortunately, since these vars are unconditionally assigned, your build line
73 # will be longer and more noisy than necessary (e.g., it will include C66
74 # assignment even if you're just building for C64P).
75 #
76 # Some background is here:
77 # http://rtsc.eclipse.org/docs-tip/Command_-_xdc#Environment_Variables
78 #
79 XDCARGS= \
80 PLATFORM=\"$(PLATFORM)\" \
81 BIOS_SMPENABLED=\"$(BIOS_SMPENABLED)\" \
82 ti.targets.C64P=\"$(ti.targets.C64P)\" \
83 ti.targets.C674=\"$(ti.targets.C674)\" \
84 ti.targets.arm.elf.M3=\"$(ti.targets.arm.elf.M3)\" \
85 ti.targets.arm.elf.M4=\"$(ti.targets.arm.elf.M4)\" \
86 ti.targets.elf.C64P=\"$(ti.targets.elf.C64P)\" \
87 ti.targets.elf.C64T=\"$(ti.targets.elf.C64T)\" \
88 ti.targets.elf.C66=\"$(ti.targets.elf.C66)\" \
89 ti.targets.elf.C674=\"$(ti.targets.elf.C674)\"
91 #
92 # Get list of packages to rebuild. Using LIST allows SDKs to only build
93 # a subset of packages if they want to. Default behavior builds all
94 # packages.
95 #
96 LIST = $(shell $(XDC_INSTALL_DIR)/bin/xdcpkg ./packages)
98 # Set XDCPATH to contain necessary repositories.
99 XDCPATH = $(XDAIS_INSTALL_DIR)/packages;$(BIOS_INSTALL_DIR)/packages;$(LINUXUTILS_INSTALL_DIR)/packages;$(LINK_INSTALL_DIR)/packages;$(OSAL_INSTALL_DIR)/packages;$(EDMA3_LLD_INSTALL_DIR)/packages;
100 export XDCPATH
102 #
103 # Set XDC executable command
104 # Note that XDCBUILDCFG points to the fc.bld file which uses
105 # the arguments specified by XDCARGS
106 #
107 XDC = $(XDC_INSTALL_DIR)/xdc XDCARGS="$(XDCARGS)" XDCBUILDCFG=./fc.bld
109 ######################################################
110 ## Shouldnt have to modify anything below this line ##
111 ######################################################
113 all:
114 @ echo building ipc packages ...
115 # build everything in the Bios IPC package
116 @ $(XDC) -P $(LIST)
118 libs:
119 @echo "#"
120 @echo "# Making $@ ..."
121 $(XDC) .libraries -P $(LIST)
122 # $(XDC) .dlls -P $(LIST)
123 misraListErrors packages/misra > misraReport.txt
125 release:
126 @ echo building ipc packages ...
127 # create a XDC release for the Bios IPC package
128 @ $(XDC) release -P $(LIST)
130 # This cleans all packages rooted in ./packages
131 clean:
132 @ echo cleaning fc packages ...
133 @ $(XDC) clean -Pr ./packages
135 install-packages:
136 @ echo installing packages to $(DESTDIR) ...
137 @ mkdir -p $(DESTDIR)/$(packageprefix)/$(packagedocdir)
138 @ cp -rf $(wildcard ipc_*_release_notes.html) docs/* $(DESTDIR)/$(packageprefix)/$(packagedocdir)
139 @ mkdir -p $(DESTDIR)/$(packageprefix)/$(packagesdir)
140 @ cp -rf packages/* $(DESTDIR)/$(packageprefix)/$(packagesdir)
142 # Nothing for this Linux goal
143 install: