| 1 | ############################################################ |
|---|
| 2 | # (c)2003-2011 Broadcom Corporation |
|---|
| 3 | # |
|---|
| 4 | # This program is the proprietary software of Broadcom Corporation and/or its licensors, |
|---|
| 5 | # and may only be used, duplicated, modified or distributed pursuant to the terms and |
|---|
| 6 | # conditions of a separate, written license agreement executed between you and Broadcom |
|---|
| 7 | # (an "Authorized License"). Except as set forth in an Authorized License, Broadcom grants |
|---|
| 8 | # no license (express or implied), right to use, or waiver of any kind with respect to the |
|---|
| 9 | # Software, and Broadcom expressly reserves all rights in and to the Software and all |
|---|
| 10 | # intellectual property rights therein. IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU |
|---|
| 11 | # HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY |
|---|
| 12 | # NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE. |
|---|
| 13 | # |
|---|
| 14 | # Except as expressly set forth in the Authorized License, |
|---|
| 15 | # |
|---|
| 16 | # 1. This program, including its structure, sequence and organization, constitutes the valuable trade |
|---|
| 17 | # secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof, |
|---|
| 18 | # and to use this information only in connection with your use of Broadcom integrated circuit products. |
|---|
| 19 | # |
|---|
| 20 | # 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" |
|---|
| 21 | # AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR |
|---|
| 22 | # WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO |
|---|
| 23 | # THE SOFTWARE. BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES |
|---|
| 24 | # OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, |
|---|
| 25 | # LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION |
|---|
| 26 | # OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF |
|---|
| 27 | # USE OR PERFORMANCE OF THE SOFTWARE. |
|---|
| 28 | # |
|---|
| 29 | # 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS |
|---|
| 30 | # LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR |
|---|
| 31 | # EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR |
|---|
| 32 | # USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF |
|---|
| 33 | # THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT |
|---|
| 34 | # ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE |
|---|
| 35 | # LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF |
|---|
| 36 | # ANY LIMITED REMEDY. |
|---|
| 37 | # |
|---|
| 38 | # $brcm_Workfile: nexus_defs.inc $ |
|---|
| 39 | # $brcm_Revision: 22 $ |
|---|
| 40 | # $brcm_Date: 10/3/11 10:21a $ |
|---|
| 41 | # |
|---|
| 42 | # Module Description: |
|---|
| 43 | # This file contains a set of definitions for building or using nexus |
|---|
| 44 | # |
|---|
| 45 | # Revision History: |
|---|
| 46 | # |
|---|
| 47 | # Created: 08/28/2007 by Jon Garrett |
|---|
| 48 | # |
|---|
| 49 | # $brcm_Log: /nexus/build/nexus_defs.inc $ |
|---|
| 50 | # |
|---|
| 51 | # 22 10/3/11 10:21a erickson |
|---|
| 52 | # SW7425-1343: force NEXUS_SERVER_SUPPORT=n if NEXUS_BASE_ONLY=y |
|---|
| 53 | # |
|---|
| 54 | # 21 9/2/11 12:39p erickson |
|---|
| 55 | # SW7420-1148: move NEXUS_SERVER_SUPPORT to nexus_defs.inc for general |
|---|
| 56 | # use |
|---|
| 57 | # |
|---|
| 58 | # 20 12/14/10 5:01p erickson |
|---|
| 59 | # SW7420-1264: use NEXUS_BIN_DIR and NEXUS_BUILD_DIR for final and |
|---|
| 60 | # intermediate binaries |
|---|
| 61 | # |
|---|
| 62 | # 19 11/10/10 6:55p ttrammel |
|---|
| 63 | # SW7420-1228: Initial Support for Android. |
|---|
| 64 | # |
|---|
| 65 | # 18 8/21/10 2:08p ttrammel |
|---|
| 66 | # SW7420-973: Change FIRMWARE_SUPPORT to NEXUS_FIRMWARE_SUPPORT |
|---|
| 67 | # |
|---|
| 68 | # 17 8/11/10 4:56p ttrammel |
|---|
| 69 | # SW7420-943: Merge NFE to main branch. |
|---|
| 70 | # |
|---|
| 71 | # NFE/1 5/10/10 6:04p ttrammel |
|---|
| 72 | # SW7405-4315: Initial NFE check-in. |
|---|
| 73 | # |
|---|
| 74 | # 16 12/15/09 4:34p erickson |
|---|
| 75 | # SW7400-2640: wrap some variable defines with ifeq to allow for |
|---|
| 76 | # customization |
|---|
| 77 | # |
|---|
| 78 | # 15 9/16/09 5:30p erickson |
|---|
| 79 | # SW7400-2511: move NEXUS_POWER_MANAGEMENT to core.inc |
|---|
| 80 | # |
|---|
| 81 | # 14 9/16/09 1:38p erickson |
|---|
| 82 | # SW7400-2511: add B_REFSW_ or NEXUS_ prefix to build variables |
|---|
| 83 | # |
|---|
| 84 | # 13 8/17/09 10:45a jrubio |
|---|
| 85 | # PR55882: remove PowerManagement default for 7342/7340 |
|---|
| 86 | # |
|---|
| 87 | # 12 8/16/09 6:37p nickh |
|---|
| 88 | # PR47760: Enable power management for 7420 |
|---|
| 89 | # |
|---|
| 90 | # 11 6/25/09 2:28p erickson |
|---|
| 91 | # PR50407: enable power management for 7405 |
|---|
| 92 | # |
|---|
| 93 | # 10 6/12/09 9:09a erickson |
|---|
| 94 | # PR55685: remove 7405 exception |
|---|
| 95 | # |
|---|
| 96 | # 9 6/3/09 3:15p erickson |
|---|
| 97 | # PR55685: default NEXUS_POWER_MANAGEMENT=n until 7405's BPWR_Open sets |
|---|
| 98 | # initial state |
|---|
| 99 | # |
|---|
| 100 | # 8 5/29/09 5:57p jrubio |
|---|
| 101 | # PR55232: add 7342/7340 |
|---|
| 102 | # |
|---|
| 103 | # 7 5/15/09 12:32p erickson |
|---|
| 104 | # PR54843: default NEXUS_POWER_MANAGEMENT for 7325/7335 |
|---|
| 105 | # |
|---|
| 106 | # 6 3/13/09 2:42p vsilyaev |
|---|
| 107 | # PR 53225: Adeed NEXUS_BIN_DIR_SUFFIX and NEXUS_BIN_DIR |
|---|
| 108 | # |
|---|
| 109 | # 5 11/21/08 4:42p vsilyaev |
|---|
| 110 | # PR 38808: Fixed definition of BDBG_DEBUG_BUILD |
|---|
| 111 | # |
|---|
| 112 | # 4 10/30/08 8:22p erickson |
|---|
| 113 | # PR40799: only turn on pm for DTV now |
|---|
| 114 | # |
|---|
| 115 | # 3 10/30/08 1:23p erickson |
|---|
| 116 | # PR40799: default NEXUS_POWER_MANAGEMENT on |
|---|
| 117 | # |
|---|
| 118 | # 2 10/5/08 11:50p erickson |
|---|
| 119 | # PR40799: added NEXUS_POWER_MANAGEMENT, defaults off |
|---|
| 120 | # |
|---|
| 121 | # 1 1/18/08 2:12p jgarrett |
|---|
| 122 | # PR 38808: Merging to main branch |
|---|
| 123 | # |
|---|
| 124 | # Nexus_Devel/3 1/18/08 1:10p vsilyaev |
|---|
| 125 | # PR 38682: Repartition os_tools.inc and os_rules.inc, to os_tools, |
|---|
| 126 | # os_flags, os_flags_nexus and os_rules.inc |
|---|
| 127 | # |
|---|
| 128 | # Nexus_Devel/2 1/17/08 6:07p jgarrett |
|---|
| 129 | # PR 38808: Updating file locations |
|---|
| 130 | # |
|---|
| 131 | # Nexus_Devel/1 10/2/07 11:54a jgarrett |
|---|
| 132 | # PR 34416: Adding nexus_defs.inc |
|---|
| 133 | # |
|---|
| 134 | ############################################################ |
|---|
| 135 | |
|---|
| 136 | ############################################################ |
|---|
| 137 | # Overview: |
|---|
| 138 | # |
|---|
| 139 | # This file is used by both nexus and application Makefiles |
|---|
| 140 | # It is included by the platform Makefile (for internal nexus builds) |
|---|
| 141 | # It is included by the platform_app.inc (for application builds) |
|---|
| 142 | # |
|---|
| 143 | ############################################################ |
|---|
| 144 | |
|---|
| 145 | # |
|---|
| 146 | # Sanity check that NEXUS_TOP is defined |
|---|
| 147 | # |
|---|
| 148 | ifndef NEXUS_TOP |
|---|
| 149 | $(error NEXUS_TOP is not defined.) |
|---|
| 150 | endif |
|---|
| 151 | |
|---|
| 152 | # backward-compatibility |
|---|
| 153 | ifdef PLATFORM |
|---|
| 154 | NEXUS_PLATFORM ?= $(PLATFORM) |
|---|
| 155 | endif |
|---|
| 156 | ifdef MODE |
|---|
| 157 | NEXUS_MODE ?= $(MODE) |
|---|
| 158 | endif |
|---|
| 159 | ifdef OS |
|---|
| 160 | B_REFSW_OS ?= $(OS) |
|---|
| 161 | endif |
|---|
| 162 | ifdef DEBUG |
|---|
| 163 | B_REFSW_DEBUG ?= $(DEBUG) |
|---|
| 164 | endif |
|---|
| 165 | ifdef VERBOSE |
|---|
| 166 | B_REFSW_VERBOSE ?= $(VERBOSE) |
|---|
| 167 | endif |
|---|
| 168 | ifdef ARCH |
|---|
| 169 | B_REFSW_ARCH ?= $(ARCH) |
|---|
| 170 | endif |
|---|
| 171 | ifdef SHAREABLE |
|---|
| 172 | B_REFSW_SHAREABLE ?= $(SHAREABLE) |
|---|
| 173 | endif |
|---|
| 174 | |
|---|
| 175 | ifdef NEXUS_FIRMWARE_SUPPORT |
|---|
| 176 | B_REFSW_FIRMWARE ?= $(NEXUS_FIRMWARE_SUPPORT) |
|---|
| 177 | endif |
|---|
| 178 | |
|---|
| 179 | ifdef NEXUS_ANDROID_SUPPORT |
|---|
| 180 | ifndef ANDROID |
|---|
| 181 | $(error ANDROID must point to the top of a previously built Android source directory.) |
|---|
| 182 | endif |
|---|
| 183 | |
|---|
| 184 | B_REFSW_ANDROID ?= $(NEXUS_ANDROID_SUPPORT) |
|---|
| 185 | endif |
|---|
| 186 | |
|---|
| 187 | # |
|---|
| 188 | # Builds default to linuxuser |
|---|
| 189 | # |
|---|
| 190 | ifeq ($(B_REFSW_OS),) |
|---|
| 191 | B_REFSW_OS = linuxuser |
|---|
| 192 | endif |
|---|
| 193 | |
|---|
| 194 | # |
|---|
| 195 | # Define the bin directories |
|---|
| 196 | # |
|---|
| 197 | ifeq ($(NEXUS_BIN_DIR),) |
|---|
| 198 | # location of final binaries |
|---|
| 199 | NEXUS_BIN_DIR = ${NEXUS_TOP}/bin${NEXUS_BIN_DIR_SUFFIX} |
|---|
| 200 | endif |
|---|
| 201 | ifeq ($(NEXUS_BUILD_DIR),) |
|---|
| 202 | # location of intermediate binaries and build artifacts |
|---|
| 203 | NEXUS_BUILD_DIR = ${NEXUS_TOP}/platforms/$(NEXUS_PLATFORM)/bin${NEXUS_BIN_DIR_SUFFIX} |
|---|
| 204 | endif |
|---|
| 205 | ifeq ($(NEXUS_SYNCTHUNK_DIR),) |
|---|
| 206 | # subdir for auto-generated thunk files |
|---|
| 207 | NEXUS_SYNCTHUNK_DIR = $(NEXUS_BUILD_DIR)/syncthunk |
|---|
| 208 | endif |
|---|
| 209 | |
|---|
| 210 | # |
|---|
| 211 | # Set OS-independent defaults |
|---|
| 212 | # |
|---|
| 213 | ifeq ($(B_REFSW_DEBUG),) |
|---|
| 214 | B_REFSW_DEBUG = y |
|---|
| 215 | endif |
|---|
| 216 | |
|---|
| 217 | # |
|---|
| 218 | # Define root of other trees |
|---|
| 219 | # |
|---|
| 220 | MAGNUM := $(NEXUS_TOP)/../magnum |
|---|
| 221 | ROCKFORD := $(MAGNUM)/../rockford |
|---|
| 222 | BSEAV := $(MAGNUM)/../BSEAV |
|---|
| 223 | |
|---|
| 224 | # |
|---|
| 225 | # Define options for quiet builds |
|---|
| 226 | # |
|---|
| 227 | ifneq ($(B_REFSW_VERBOSE),) |
|---|
| 228 | Q_:= |
|---|
| 229 | else |
|---|
| 230 | Q_:=@ |
|---|
| 231 | MAKEFLAGS += --no-print-directory |
|---|
| 232 | endif |
|---|
| 233 | |
|---|
| 234 | # |
|---|
| 235 | # Define debug options |
|---|
| 236 | # |
|---|
| 237 | ifeq ($(B_REFSW_DEBUG),y) |
|---|
| 238 | NEXUS_CFLAGS += -DBDBG_DEBUG_BUILD=1 |
|---|
| 239 | endif |
|---|
| 240 | |
|---|
| 241 | # multiprocess support |
|---|
| 242 | # enables class verification code |
|---|
| 243 | NEXUS_SERVER_SUPPORT ?= y |
|---|
| 244 | ifeq ($(NEXUS_BASE_ONLY),y) |
|---|
| 245 | NEXUS_SERVER_SUPPORT = n |
|---|
| 246 | endif |
|---|
| 247 | ifeq ($(NEXUS_SERVER_SUPPORT),y) |
|---|
| 248 | NEXUS_CFLAGS += -DNEXUS_SERVER_SUPPORT=1 |
|---|
| 249 | endif |
|---|
| 250 | |
|---|
| 251 | |
|---|
| 252 | # |
|---|
| 253 | # Include os tools and flags |
|---|
| 254 | # |
|---|
| 255 | include $(NEXUS_TOP)/build/os/$(B_REFSW_OS)/os_tools.inc |
|---|
| 256 | include $(NEXUS_TOP)/build/os/$(B_REFSW_OS)/os_flags.inc |
|---|
| 257 | |
|---|
| 258 | # |
|---|
| 259 | # Define a flag to indicate this file has been included |
|---|
| 260 | # |
|---|
| 261 | NEXUS_DEFS_INCLUDED := yes |
|---|
| 262 | |
|---|