| 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.61.03 |
|---|
| 10 | # ============================================================================ |
|---|
| 11 | # Copyright (c) Texas Instruments Incorporated 2002-2008 |
|---|
| 12 | # |
|---|
| 13 | # Use of this software is controlled by the terms and conditions found in the |
|---|
| 14 | # license agreement under which this software has been supplied or provided. |
|---|
| 15 | # ============================================================================ |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | ifndef OMAP3530_LINUX2_6_22_MK |
|---|
| 19 | |
|---|
| 20 | define OMAP3530_LINUX2_6_22_MK |
|---|
| 21 | endef |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | # ============================================================================ |
|---|
| 25 | # Let the make system know that a specific distribution for the GPP OS |
|---|
| 26 | # is being used. |
|---|
| 27 | # ============================================================================ |
|---|
| 28 | USE_DISTRIBUTION := 1 |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | # ============================================================================ |
|---|
| 32 | # Set the values of necessary variables to be used for the OS. |
|---|
| 33 | # ============================================================================ |
|---|
| 34 | |
|---|
| 35 | # ---------------------------------------------------------------------------- |
|---|
| 36 | # Base directory for the GPP OS |
|---|
| 37 | # ---------------------------------------------------------------------------- |
|---|
| 38 | #BASE_BUILDOS := ${HOME}/omap3530/REL_OMAP35x_02.01.00.02/PSP_02.01.00.02/src/linux-02.01.00.02 |
|---|
| 39 | BASE_BUILDOS := ${HOME}/oe/tmp/staging/beagleboard-angstrom-linux-gnueabi/kernel |
|---|
| 40 | |
|---|
| 41 | # ---------------------------------------------------------------------------- |
|---|
| 42 | # Base for toolchain |
|---|
| 43 | # ---------------------------------------------------------------------------- |
|---|
| 44 | #BASE_TOOLCHAIN := ${HOME}/omap3530/arm-2008q1 |
|---|
| 45 | BASE_TOOLCHAIN := ${HOME}/oe/tmp/cross/armv7a |
|---|
| 46 | |
|---|
| 47 | # ---------------------------------------------------------------------------- |
|---|
| 48 | # Base for code generation tools - compiler, linker, archiver etc. |
|---|
| 49 | # ---------------------------------------------------------------------------- |
|---|
| 50 | #BASE_CGTOOLS := $(BASE_TOOLCHAIN)/bin |
|---|
| 51 | BASE_CGTOOLS := $(BASE_TOOLCHAIN)/bin |
|---|
| 52 | |
|---|
| 53 | # ---------------------------------------------------------------------------- |
|---|
| 54 | # Base directory for include files provided by GPP OS |
|---|
| 55 | # ---------------------------------------------------------------------------- |
|---|
| 56 | BASE_OSINC := $(BASE_BUILDOS)/include |
|---|
| 57 | |
|---|
| 58 | OSINC_GENERIC := $(BASE_OSINC) |
|---|
| 59 | #OSINC_PLATFORM := $(BASE_TOOLCHAIN)/lib/gcc/arm-none-linux-gnueabi/4.2.3/include |
|---|
| 60 | OSINC_PLATFORM := $(BASE_TOOLCHAIN)/lib/gcc/arm-angstrom-linux-gnueabi/4.3.1/include |
|---|
| 61 | #OSINC_TARGET := $(BASE_TOOLCHAIN)/arm-none-linux-gnueabi/libc/usr/include |
|---|
| 62 | OSINC_TARGET := ${HOME}/omap3530/arm-2008q1/arm-none-linux-gnueabi/libc/usr/include |
|---|
| 63 | |
|---|
| 64 | ifneq ("$(VARIANT)", "") |
|---|
| 65 | OSINC_VARIANT := $(BASE_OSINC) |
|---|
| 66 | endif |
|---|
| 67 | |
|---|
| 68 | |
|---|
| 69 | # ---------------------------------------------------------------------------- |
|---|
| 70 | # Base directory for libraries provided by GPP OS |
|---|
| 71 | # ---------------------------------------------------------------------------- |
|---|
| 72 | BASE_OSLIB := $(BASE_TOOLCHAIN)/lib |
|---|
| 73 | |
|---|
| 74 | OSLIB_GENERIC := $(BASE_OSLIB) |
|---|
| 75 | OSLIB_PLATFORM := $(BASE_OSLIB) |
|---|
| 76 | |
|---|
| 77 | |
|---|
| 78 | ifneq ("$(VARIANT)", "") |
|---|
| 79 | OSLIB_VARIANT := $(BASE_OSLIB) |
|---|
| 80 | endif |
|---|
| 81 | |
|---|
| 82 | |
|---|
| 83 | # ============================================================================ |
|---|
| 84 | # COMPILER |
|---|
| 85 | # ============================================================================ |
|---|
| 86 | |
|---|
| 87 | # ---------------------------------------------------------------------------- |
|---|
| 88 | # Name of the compiler |
|---|
| 89 | # ---------------------------------------------------------------------------- |
|---|
| 90 | #COMPILER := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-gcc |
|---|
| 91 | COMPILER := $(BASE_CGTOOLS)/arm-angstrom-linux-gnueabi-gcc |
|---|
| 92 | #LD := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-ld |
|---|
| 93 | LD := $(BASE_CGTOOLS)/arm-angstrom-linux-gnueabi-ld |
|---|
| 94 | |
|---|
| 95 | #CROSS_COMPILE := arm-none-linux-gnueabi- |
|---|
| 96 | #export CROSS_COMPILE |
|---|
| 97 | CROSS_COMPILE := $(BASE_CGTOOLS)/arm-angstrom-linux-gnueabi- |
|---|
| 98 | export CROSS_COMPILE |
|---|
| 99 | |
|---|
| 100 | # ---------------------------------------------------------------------------- |
|---|
| 101 | # Command line switches used by the compiler |
|---|
| 102 | # |
|---|
| 103 | # CC_SW_DEF Command line defines |
|---|
| 104 | # CC_SW_INC Search path for header files |
|---|
| 105 | # CC_SW_OBJ Create object file |
|---|
| 106 | # CC_SW_DEB Include debug information |
|---|
| 107 | # ---------------------------------------------------------------------------- |
|---|
| 108 | CC_SW_DEF := -D |
|---|
| 109 | CC_SW_INC := -I |
|---|
| 110 | CC_SW_OBJ := -o |
|---|
| 111 | CC_SW_DEB := -g |
|---|
| 112 | |
|---|
| 113 | # ---------------------------------------------------------------------------- |
|---|
| 114 | # Standard flags for the compiler |
|---|
| 115 | # ---------------------------------------------------------------------------- |
|---|
| 116 | STD_KRNL_FLAGS := -c -nostdinc -isystem -Iinclude -I$(BASE_BUILDOS)/arch/arm/include -include $(BASE_OSINC)/linux/autoconf.h -D__KERNEL__ -mlittle-endian -I$(BASE_OSINC)/../arch/arm/mach-omap2/include -I$(BASE_OSINC)/../arch/arm/plat-omap/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -marm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign |
|---|
| 117 | STD_USER_FLAGS := -Wall -c |
|---|
| 118 | |
|---|
| 119 | # ---------------------------------------------------------------------------- |
|---|
| 120 | # Standard flags for the compiler when building an executable |
|---|
| 121 | # ---------------------------------------------------------------------------- |
|---|
| 122 | EXE_CC_FLAGS := |
|---|
| 123 | |
|---|
| 124 | # ---------------------------------------------------------------------------- |
|---|
| 125 | # Flags for the compiler when building a driver |
|---|
| 126 | # ---------------------------------------------------------------------------- |
|---|
| 127 | DRV_CC_FLAGS := -nostdinc |
|---|
| 128 | |
|---|
| 129 | # ---------------------------------------------------------------------------- |
|---|
| 130 | # Flags for the compiler when building a library |
|---|
| 131 | # ---------------------------------------------------------------------------- |
|---|
| 132 | LIB_CC_FLAGS := |
|---|
| 133 | |
|---|
| 134 | # ---------------------------------------------------------------------------- |
|---|
| 135 | # Standard definitions for the compiler |
|---|
| 136 | # ---------------------------------------------------------------------------- |
|---|
| 137 | STD_CC_DEFNS := -D_REENTRANT |
|---|
| 138 | |
|---|
| 139 | # ============================================================================ |
|---|
| 140 | # ARCHIVER2 - This denotes the archiver. |
|---|
| 141 | # ============================================================================ |
|---|
| 142 | #ARCHIVER := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-ar |
|---|
| 143 | ARCHIVER := $(BASE_CGTOOLS)/arm-angstrom-linux-gnueabi-ar |
|---|
| 144 | |
|---|
| 145 | # ---------------------------------------------------------------------------- |
|---|
| 146 | # Standard flags for the archiver |
|---|
| 147 | # ---------------------------------------------------------------------------- |
|---|
| 148 | STD_AR_FLAGS := -rs |
|---|
| 149 | |
|---|
| 150 | |
|---|
| 151 | # ============================================================================ |
|---|
| 152 | # LINKER - The compiler is used for linking purpose as well. |
|---|
| 153 | # ============================================================================ |
|---|
| 154 | #LINKER := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-gcc |
|---|
| 155 | LINKER := $(BASE_CGTOOLS)/arm-angstrom-linux-gnueabi-gcc |
|---|
| 156 | |
|---|
| 157 | # ---------------------------------------------------------------------------- |
|---|
| 158 | # Command line switches used by the linker |
|---|
| 159 | # |
|---|
| 160 | # LD_SW_LIB Search path for libraries |
|---|
| 161 | # LD_SW_OUT Output filename |
|---|
| 162 | # LD_SW_RELOC Generate relocateable output |
|---|
| 163 | # ---------------------------------------------------------------------------- |
|---|
| 164 | LD_SW_LIB := -L |
|---|
| 165 | LD_SW_OUT := -o |
|---|
| 166 | LD_SW_RELOC := -r |
|---|
| 167 | |
|---|
| 168 | # ---------------------------------------------------------------------------- |
|---|
| 169 | # Standard flags for the linker |
|---|
| 170 | # ---------------------------------------------------------------------------- |
|---|
| 171 | STD_LD_FLAGS := |
|---|
| 172 | |
|---|
| 173 | # ---------------------------------------------------------------------------- |
|---|
| 174 | # Flags for the linker when building an executable |
|---|
| 175 | # ---------------------------------------------------------------------------- |
|---|
| 176 | EXE_LD_FLAGS := -lpthread -lc |
|---|
| 177 | |
|---|
| 178 | # ---------------------------------------------------------------------------- |
|---|
| 179 | # Flags for the linker when building a driver |
|---|
| 180 | # ---------------------------------------------------------------------------- |
|---|
| 181 | DRV_LD_FLAGS := |
|---|
| 182 | |
|---|
| 183 | |
|---|
| 184 | # ============================================================================ |
|---|
| 185 | # Post processing utilities for Linux 2.6 |
|---|
| 186 | # ============================================================================ |
|---|
| 187 | CMD_MODPOST := $(BASE_BUILDOS)/scripts/mod/modpost -i $(BASE_BUILDOS)/Module.symvers $(BASE_BUILDOS)/vmlinux |
|---|
| 188 | |
|---|
| 189 | |
|---|
| 190 | endif # ifndef OMAP3530_LINUX2_6_22_MK |
|---|