| 1 | # ============================================================================ |
|---|
| 2 | # @file c64xxp_5.xx_linux.mk |
|---|
| 3 | # |
|---|
| 4 | # @path $(DSPLINK)/make/DspBios/ |
|---|
| 5 | # |
|---|
| 6 | # @desc This makefile defines OS specific macros used by MAKE system for |
|---|
| 7 | # the DSP/BIOS version 5.xx with CGTOOLS C64XXP on linux. |
|---|
| 8 | # |
|---|
| 9 | # @ver 1.65.00.03 |
|---|
| 10 | # ============================================================================ |
|---|
| 11 | # Copyright (C) 2002-2009, Texas Instruments Incorporated - |
|---|
| 12 | # http://www.ti.com/ |
|---|
| 13 | # |
|---|
| 14 | # Redistribution and use in source and binary forms, with or without |
|---|
| 15 | # modification, are permitted provided that the following conditions |
|---|
| 16 | # are met: |
|---|
| 17 | # |
|---|
| 18 | # * Redistributions of source code must retain the above copyright |
|---|
| 19 | # notice, this list of conditions and the following disclaimer. |
|---|
| 20 | # |
|---|
| 21 | # * Redistributions in binary form must reproduce the above copyright |
|---|
| 22 | # notice, this list of conditions and the following disclaimer in the |
|---|
| 23 | # documentation and/or other materials provided with the distribution. |
|---|
| 24 | # |
|---|
| 25 | # * Neither the name of Texas Instruments Incorporated nor the names of |
|---|
| 26 | # its contributors may be used to endorse or promote products derived |
|---|
| 27 | # from this software without specific prior written permission. |
|---|
| 28 | # |
|---|
| 29 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
|---|
| 30 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
|---|
| 31 | # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
|---|
| 32 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
|---|
| 33 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
|---|
| 34 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
|---|
| 35 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
|---|
| 36 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
|---|
| 37 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
|---|
| 38 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
|---|
| 39 | # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|---|
| 40 | # ============================================================================ |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | ifndef C64XXP_5_XX_LINUX_MK |
|---|
| 44 | |
|---|
| 45 | define C64XXP_5_XX_LINUX_MK |
|---|
| 46 | endef |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | # ============================================================================ |
|---|
| 50 | # Let the make system know that a specific distribution for the GPP OS |
|---|
| 51 | # is being used. |
|---|
| 52 | # ============================================================================ |
|---|
| 53 | USE_DISTRIBUTION := 1 |
|---|
| 54 | |
|---|
| 55 | |
|---|
| 56 | # ============================================================================ |
|---|
| 57 | # Set the values of necessary variables to be used for the OS. |
|---|
| 58 | # ============================================================================ |
|---|
| 59 | |
|---|
| 60 | # ---------------------------------------------------------------------------- |
|---|
| 61 | # Base directory for the DSP OS |
|---|
| 62 | # ---------------------------------------------------------------------------- |
|---|
| 63 | BASE_INSTALL := "$(TI_TOOLS_BASE_DIR)" |
|---|
| 64 | ifeq ($(BASE_INSTALL), "") |
|---|
| 65 | #BASE_INSTALL := /opt/ti-tools |
|---|
| 66 | BASE_INSTALL := ${HOME}/TI |
|---|
| 67 | endif |
|---|
| 68 | BASE_SABIOS := "$(BIOS_INSTALL_DIR)" |
|---|
| 69 | ifeq ($(BASE_SABIOS), "") |
|---|
| 70 | #BASE_SABIOS := $(BASE_INSTALL)/bios |
|---|
| 71 | BASE_SABIOS := $(BASE_INSTALL)/bios_5_33_04 |
|---|
| 72 | endif |
|---|
| 73 | BASE_BUILDOS := $(BASE_SABIOS)/packages/ti/bios |
|---|
| 74 | |
|---|
| 75 | # ---------------------------------------------------------------------------- |
|---|
| 76 | # Base directory for the XDC tools |
|---|
| 77 | # ---------------------------------------------------------------------------- |
|---|
| 78 | XDCTOOLS_DIR := "$(XDC_INSTALL_DIR)" |
|---|
| 79 | ifeq ($(XDCTOOLS_DIR), "") |
|---|
| 80 | #XDCTOOLS_DIR := $(BASE_SABIOS)/xdctools |
|---|
| 81 | XDCTOOLS_DIR := $(BASE_INSTALL)/xdctools_3_15_00_50 |
|---|
| 82 | endif |
|---|
| 83 | |
|---|
| 84 | # ---------------------------------------------------------------------------- |
|---|
| 85 | # Base for code generation tools - compiler, linker, archiver etc. |
|---|
| 86 | # ---------------------------------------------------------------------------- |
|---|
| 87 | BASE_CGTOOLS := "$(CODEGEN_INSTALL_DIR)" |
|---|
| 88 | ifeq ($(BASE_CGTOOLS), "") |
|---|
| 89 | #BASE_CGTOOLS := $(BASE_INSTALL)/c6000/cgtools |
|---|
| 90 | BASE_CGTOOLS := $(BASE_INSTALL)/TI_CGT_C6000_6.1.17 |
|---|
| 91 | endif |
|---|
| 92 | BASE_CGTOOLSBIN := $(BASE_CGTOOLS)/bin |
|---|
| 93 | |
|---|
| 94 | # ---------------------------------------------------------------------------- |
|---|
| 95 | # Base for TCONF, platform files and dependent components |
|---|
| 96 | # ---------------------------------------------------------------------------- |
|---|
| 97 | BASE_TCONF := $(XDCTOOLS_DIR) |
|---|
| 98 | BASE_PLATFORMS := $(BASE_SABIOS)/packages |
|---|
| 99 | BASE_PSL := $(BASE_SABIOS)/packages/ti/psl |
|---|
| 100 | BASE_CSL := |
|---|
| 101 | BASE_RTDX := $(BASE_SABIOS)/packages/ti/rtdx |
|---|
| 102 | |
|---|
| 103 | # ---------------------------------------------------------------------------- |
|---|
| 104 | # Base directory for include files |
|---|
| 105 | # ---------------------------------------------------------------------------- |
|---|
| 106 | BASE_OSINC := $(BASE_BUILDOS)/include |
|---|
| 107 | BASE_CGTOOLSINC := $(BASE_CGTOOLS)/include |
|---|
| 108 | BASE_RTDXINC := $(BASE_RTDX)/include/c6000 |
|---|
| 109 | BASE_PSLINC := $(BASE_PSL)/include |
|---|
| 110 | BASE_CSLINC := |
|---|
| 111 | |
|---|
| 112 | OSINC_GENERIC := $(BASE_OSINC) |
|---|
| 113 | OSINC_PLATFORM := $(BASE_CGTOOLSINC) $(BASE_RTDXINC) \ |
|---|
| 114 | $(BASE_PSLINC) $(BASE_CSLINC) |
|---|
| 115 | |
|---|
| 116 | ifneq ("$(VARIANT)", "") |
|---|
| 117 | OSINC_VARIANT := $(BASE_OSINC) |
|---|
| 118 | endif |
|---|
| 119 | |
|---|
| 120 | |
|---|
| 121 | # ---------------------------------------------------------------------------- |
|---|
| 122 | # Base directory for libraries |
|---|
| 123 | # ---------------------------------------------------------------------------- |
|---|
| 124 | BASE_OSLIB := $(BASE_BUILDOS)/lib |
|---|
| 125 | BASE_CGTOOLSLIB := $(BASE_CGTOOLS)/lib |
|---|
| 126 | BASE_RTDXLIB := $(BASE_RTDX)/lib/c6000 |
|---|
| 127 | BASE_PSLLIB := $(BASE_PSL)/lib |
|---|
| 128 | BASE_CSLLIB := |
|---|
| 129 | |
|---|
| 130 | OSLIB_GENERIC := $(BASE_OSLIB) |
|---|
| 131 | OSLIB_PLATFORM := $(BASE_CGTOOLSLIB) $(BASE_RTDXLIB) \ |
|---|
| 132 | $(BASE_PSLLIB) $(BASE_CSLLIB) |
|---|
| 133 | |
|---|
| 134 | ifneq ("$(VARIANT)", "") |
|---|
| 135 | OSLIB_VARIANT := $(BASE_OSLIB) |
|---|
| 136 | endif |
|---|
| 137 | |
|---|
| 138 | |
|---|
| 139 | # ============================================================================ |
|---|
| 140 | # COMPILER |
|---|
| 141 | # ============================================================================ |
|---|
| 142 | |
|---|
| 143 | # ---------------------------------------------------------------------------- |
|---|
| 144 | # Name of the compiler |
|---|
| 145 | # ---------------------------------------------------------------------------- |
|---|
| 146 | COMPILER := $(BASE_CGTOOLSBIN)/cl6x |
|---|
| 147 | |
|---|
| 148 | # ---------------------------------------------------------------------------- |
|---|
| 149 | # Command line switches used by the compiler |
|---|
| 150 | # |
|---|
| 151 | # CC_SW_DEF Command line defines |
|---|
| 152 | # CC_SW_INC Search path for header files |
|---|
| 153 | # CC_SW_OBJ Object file directory |
|---|
| 154 | # CC_SW_DEB Include debug information |
|---|
| 155 | # CC_SW_REL Release build |
|---|
| 156 | # ---------------------------------------------------------------------------- |
|---|
| 157 | CC_SW_DEF := -d |
|---|
| 158 | CC_SW_INC := -I |
|---|
| 159 | CC_SW_OBJ := -fr |
|---|
| 160 | CC_SW_DEB := -g -d"_DEBUG" --no_compress |
|---|
| 161 | CC_SW_REL := -o3 |
|---|
| 162 | |
|---|
| 163 | # ---------------------------------------------------------------------------- |
|---|
| 164 | # Standard flags for the compiler |
|---|
| 165 | # ---------------------------------------------------------------------------- |
|---|
| 166 | STD_CC_FLAGS := -q -pdr -pdv -pden -ml3 -mv6400+ --disable:sploop |
|---|
| 167 | |
|---|
| 168 | # ---------------------------------------------------------------------------- |
|---|
| 169 | # Standard flags for the compiler when building an executable |
|---|
| 170 | # ---------------------------------------------------------------------------- |
|---|
| 171 | EXE_CC_FLAGS := |
|---|
| 172 | |
|---|
| 173 | # ---------------------------------------------------------------------------- |
|---|
| 174 | # Flags for the compiler when building an archive |
|---|
| 175 | # ---------------------------------------------------------------------------- |
|---|
| 176 | ARC_CC_FLAGS := |
|---|
| 177 | |
|---|
| 178 | # ---------------------------------------------------------------------------- |
|---|
| 179 | # Standard definitions for the compiler |
|---|
| 180 | # ---------------------------------------------------------------------------- |
|---|
| 181 | STD_CC_DEFNS := |
|---|
| 182 | |
|---|
| 183 | |
|---|
| 184 | # ============================================================================ |
|---|
| 185 | # ARCHIVER |
|---|
| 186 | # ============================================================================ |
|---|
| 187 | ARCHIVER := $(BASE_CGTOOLSBIN)/ar6x |
|---|
| 188 | |
|---|
| 189 | # ---------------------------------------------------------------------------- |
|---|
| 190 | # Standard flags for the archiver |
|---|
| 191 | # ---------------------------------------------------------------------------- |
|---|
| 192 | STD_AR_FLAGS := -r |
|---|
| 193 | |
|---|
| 194 | # ---------------------------------------------------------------------------- |
|---|
| 195 | # Archiver flags for extracting object files |
|---|
| 196 | # ---------------------------------------------------------------------------- |
|---|
| 197 | EXT_AR_FLAGS := xq |
|---|
| 198 | |
|---|
| 199 | |
|---|
| 200 | # ============================================================================ |
|---|
| 201 | # LINKER |
|---|
| 202 | # ============================================================================ |
|---|
| 203 | LINKER := $(BASE_CGTOOLSBIN)/cl6x -z |
|---|
| 204 | |
|---|
| 205 | # ---------------------------------------------------------------------------- |
|---|
| 206 | # Command line switches used by the linker |
|---|
| 207 | # |
|---|
| 208 | # LD_SW_INC Search path for libraries |
|---|
| 209 | # LD_SW_LIB Include library name |
|---|
| 210 | # LD_SW_OUT Output file name |
|---|
| 211 | # LD_SW_MAP Map file name |
|---|
| 212 | # LD_SW_RELOC Generate relocateable output |
|---|
| 213 | # ---------------------------------------------------------------------------- |
|---|
| 214 | LD_SW_INC := -i |
|---|
| 215 | LD_SW_LIB := -l |
|---|
| 216 | LD_SW_OUT := -o |
|---|
| 217 | LD_SW_MAP := -m |
|---|
| 218 | LD_SW_RELOC := -r |
|---|
| 219 | |
|---|
| 220 | # ---------------------------------------------------------------------------- |
|---|
| 221 | # Standard flags for the linker |
|---|
| 222 | # ---------------------------------------------------------------------------- |
|---|
| 223 | STD_LD_FLAGS := -c -q -x |
|---|
| 224 | |
|---|
| 225 | # ---------------------------------------------------------------------------- |
|---|
| 226 | # Flags for the linker when building an executable |
|---|
| 227 | # ---------------------------------------------------------------------------- |
|---|
| 228 | EXE_LD_FLAGS := |
|---|
| 229 | |
|---|
| 230 | # ============================================================================ |
|---|
| 231 | # TCONF |
|---|
| 232 | # ============================================================================ |
|---|
| 233 | TCONF := $(BASE_TCONF)/tconf |
|---|
| 234 | |
|---|
| 235 | |
|---|
| 236 | # ---------------------------------------------------------------------------- |
|---|
| 237 | # Standard flags for TCONF |
|---|
| 238 | # ---------------------------------------------------------------------------- |
|---|
| 239 | STD_TCF_FLAGS := |
|---|
| 240 | |
|---|
| 241 | |
|---|
| 242 | endif # ifndef C64XXP_5_XX_LINUX_MK |
|---|