| 1 | # ============================================================================ |
|---|
| 2 | # @file omap3530_2.6.mk |
|---|
| 3 | # |
|---|
| 4 | # @path $(DSPLINK)/make/Linux/ |
|---|
| 5 | # |
|---|
| 6 | # @desc This makefile defines OS specific macros used by MAKE system for |
|---|
| 7 | # the OMAP 3530 Linux distribution. |
|---|
| 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 OMAP3530_LINUX2_6_22_MK |
|---|
| 44 | |
|---|
| 45 | define OMAP3530_LINUX2_6_22_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 GPP OS |
|---|
| 62 | # ---------------------------------------------------------------------------- |
|---|
| 63 | #BASE_BUILDOS := ${HOME}/omap3530/AM35x-OMAP35x-PSP-SDK-03.00.00.05/src/kernel/linux-03.00.00.05 |
|---|
| 64 | BASE_BUILDOS := ${HOME}/oe/tmp/sysroots/beagleboard-angstrom-linux-gnueabi/kernel |
|---|
| 65 | |
|---|
| 66 | # ---------------------------------------------------------------------------- |
|---|
| 67 | # Base for toolchain |
|---|
| 68 | # ---------------------------------------------------------------------------- |
|---|
| 69 | #BASE_TOOLCHAIN := ${HOME}/toolchains/git/arm-2009q1-203 |
|---|
| 70 | BASE_TOOLCHAIN := ${HOME}/oe/tmp/sysroots/i686-linux/usr/armv7a |
|---|
| 71 | |
|---|
| 72 | # ---------------------------------------------------------------------------- |
|---|
| 73 | # Base for code generation tools - compiler, linker, archiver etc. |
|---|
| 74 | # ---------------------------------------------------------------------------- |
|---|
| 75 | BASE_CGTOOLS := $(BASE_TOOLCHAIN)/bin |
|---|
| 76 | |
|---|
| 77 | # ---------------------------------------------------------------------------- |
|---|
| 78 | # Base directory for include files provided by GPP OS |
|---|
| 79 | # ---------------------------------------------------------------------------- |
|---|
| 80 | BASE_OSINC := $(BASE_BUILDOS)/include |
|---|
| 81 | |
|---|
| 82 | OSINC_GENERIC := $(BASE_OSINC) |
|---|
| 83 | #OSINC_PLATFORM := $(BASE_TOOLCHAIN)/lib/gcc/arm-none-linux-gnueabi/4.2.3/include |
|---|
| 84 | OSINC_PLATFORM := $(BASE_TOOLCHAIN)/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/include |
|---|
| 85 | #OSINC_TARGET := $(BASE_TOOLCHAIN)/arm-none-linux-gnueabi/libc/usr/include |
|---|
| 86 | OSINC_TARGET := $(BASE_TOOLCHAIN)/arm-angstrom-linux-gnueabi/include |
|---|
| 87 | |
|---|
| 88 | ifneq ("$(VARIANT)", "") |
|---|
| 89 | OSINC_VARIANT := $(BASE_OSINC) |
|---|
| 90 | endif |
|---|
| 91 | |
|---|
| 92 | |
|---|
| 93 | # ---------------------------------------------------------------------------- |
|---|
| 94 | # Base directory for libraries provided by GPP OS |
|---|
| 95 | # ---------------------------------------------------------------------------- |
|---|
| 96 | BASE_OSLIB := $(BASE_TOOLCHAIN)/lib |
|---|
| 97 | |
|---|
| 98 | OSLIB_GENERIC := $(BASE_OSLIB) |
|---|
| 99 | OSLIB_PLATFORM := $(BASE_OSLIB) |
|---|
| 100 | |
|---|
| 101 | |
|---|
| 102 | ifneq ("$(VARIANT)", "") |
|---|
| 103 | OSLIB_VARIANT := $(BASE_OSLIB) |
|---|
| 104 | endif |
|---|
| 105 | |
|---|
| 106 | |
|---|
| 107 | # ============================================================================ |
|---|
| 108 | # COMPILER |
|---|
| 109 | # ============================================================================ |
|---|
| 110 | |
|---|
| 111 | # ---------------------------------------------------------------------------- |
|---|
| 112 | # Name of the compiler |
|---|
| 113 | # ---------------------------------------------------------------------------- |
|---|
| 114 | #COMPILER := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-gcc |
|---|
| 115 | COMPILER := $(BASE_CGTOOLS)/arm-angstrom-linux-gnueabi-gcc |
|---|
| 116 | #LD := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-ld |
|---|
| 117 | LD := $(BASE_CGTOOLS)/arm-angstrom-linux-gnueabi-ld |
|---|
| 118 | |
|---|
| 119 | #CROSS_COMPILE := arm-none-linux-gnueabi- |
|---|
| 120 | #export CROSS_COMPILE |
|---|
| 121 | CROSS_COMPILE := arm-angstrom-linux-gnueabi-export CROSS_COMPILE |
|---|
| 122 | |
|---|
| 123 | # ---------------------------------------------------------------------------- |
|---|
| 124 | # Command line switches used by the compiler |
|---|
| 125 | # |
|---|
| 126 | # CC_SW_DEF Command line defines |
|---|
| 127 | # CC_SW_INC Search path for header files |
|---|
| 128 | # CC_SW_OBJ Create object file |
|---|
| 129 | # CC_SW_DEB Include debug information |
|---|
| 130 | # ---------------------------------------------------------------------------- |
|---|
| 131 | CC_SW_DEF := -D |
|---|
| 132 | CC_SW_INC := -I |
|---|
| 133 | CC_SW_OBJ := -o |
|---|
| 134 | CC_SW_DEB := -g |
|---|
| 135 | |
|---|
| 136 | # ---------------------------------------------------------------------------- |
|---|
| 137 | # Standard flags for the compiler |
|---|
| 138 | # ---------------------------------------------------------------------------- |
|---|
| 139 | STD_USER_FLAGS := -Wall -c |
|---|
| 140 | |
|---|
| 141 | # ---------------------------------------------------------------------------- |
|---|
| 142 | # Standard flags for the compiler when building an executable |
|---|
| 143 | # ---------------------------------------------------------------------------- |
|---|
| 144 | EXE_CC_FLAGS := |
|---|
| 145 | |
|---|
| 146 | # ---------------------------------------------------------------------------- |
|---|
| 147 | # Flags for the compiler when building a driver |
|---|
| 148 | # ---------------------------------------------------------------------------- |
|---|
| 149 | DRV_CC_FLAGS := -nostdinc |
|---|
| 150 | |
|---|
| 151 | # ---------------------------------------------------------------------------- |
|---|
| 152 | # Flags for the compiler when building a library |
|---|
| 153 | # ---------------------------------------------------------------------------- |
|---|
| 154 | LIB_CC_FLAGS := |
|---|
| 155 | |
|---|
| 156 | # ---------------------------------------------------------------------------- |
|---|
| 157 | # Standard definitions for the compiler |
|---|
| 158 | # ---------------------------------------------------------------------------- |
|---|
| 159 | STD_CC_DEFNS := -D_REENTRANT |
|---|
| 160 | |
|---|
| 161 | # ============================================================================ |
|---|
| 162 | # ARCHIVER2 - This denotes the archiver. |
|---|
| 163 | # ============================================================================ |
|---|
| 164 | #ARCHIVER := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-ar |
|---|
| 165 | ARCHIVER := $(BASE_CGTOOLS)/arm-angstrom-linux-gnueabi-ar |
|---|
| 166 | |
|---|
| 167 | # ---------------------------------------------------------------------------- |
|---|
| 168 | # Standard flags for the archiver |
|---|
| 169 | # ---------------------------------------------------------------------------- |
|---|
| 170 | STD_AR_FLAGS := -rs |
|---|
| 171 | |
|---|
| 172 | |
|---|
| 173 | # ============================================================================ |
|---|
| 174 | # LINKER - The compiler is used for linking purpose as well. |
|---|
| 175 | # ============================================================================ |
|---|
| 176 | #LINKER := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-gcc |
|---|
| 177 | LINKER := $(BASE_CGTOOLS)/arm-angstrom-linux-gnueabi-gcc |
|---|
| 178 | |
|---|
| 179 | # ---------------------------------------------------------------------------- |
|---|
| 180 | # Command line switches used by the linker |
|---|
| 181 | # |
|---|
| 182 | # LD_SW_LIB Search path for libraries |
|---|
| 183 | # LD_SW_OUT Output filename |
|---|
| 184 | # LD_SW_RELOC Generate relocateable output |
|---|
| 185 | # ---------------------------------------------------------------------------- |
|---|
| 186 | LD_SW_LIB := -L |
|---|
| 187 | LD_SW_OUT := -o |
|---|
| 188 | LD_SW_RELOC := -r |
|---|
| 189 | |
|---|
| 190 | # ---------------------------------------------------------------------------- |
|---|
| 191 | # Standard flags for the linker |
|---|
| 192 | # ---------------------------------------------------------------------------- |
|---|
| 193 | STD_LD_FLAGS := |
|---|
| 194 | |
|---|
| 195 | # ---------------------------------------------------------------------------- |
|---|
| 196 | # Flags for the linker when building an executable |
|---|
| 197 | # ---------------------------------------------------------------------------- |
|---|
| 198 | EXE_LD_FLAGS := -lpthread -lc |
|---|
| 199 | |
|---|
| 200 | # ---------------------------------------------------------------------------- |
|---|
| 201 | # Flags for the linker when building a driver |
|---|
| 202 | # ---------------------------------------------------------------------------- |
|---|
| 203 | DRV_LD_FLAGS := |
|---|
| 204 | |
|---|
| 205 | |
|---|
| 206 | # ============================================================================ |
|---|
| 207 | # Post processing utilities for Linux 2.6 |
|---|
| 208 | # ============================================================================ |
|---|
| 209 | ifneq ($(CONFIG_MODVERSIONS),) |
|---|
| 210 | CMD_MODPOST_FLAGS := -m -i |
|---|
| 211 | else |
|---|
| 212 | CMD_MODPOST_FLAGS := -i |
|---|
| 213 | endif |
|---|
| 214 | |
|---|
| 215 | CMD_MODPOST := $(BASE_BUILDOS)/scripts/mod/modpost \ |
|---|
| 216 | $(CMD_MODPOST_FLAGS) $(BASE_BUILDOS)/Module.symvers \ |
|---|
| 217 | $(BASE_BUILDOS)/vmlinux |
|---|
| 218 | |
|---|
| 219 | endif # ifndef OMAP3530_LINUX2_6_22_MK |
|---|