| 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.inc $ |
|---|
| 39 | # $brcm_Revision: 35 $ |
|---|
| 40 | # $brcm_Date: 11/9/11 3:52p $ |
|---|
| 41 | # |
|---|
| 42 | # Module Description: |
|---|
| 43 | # This makefile contains the OS-independent rules for building |
|---|
| 44 | # nexus modules. |
|---|
| 45 | # |
|---|
| 46 | # Revision History: |
|---|
| 47 | # |
|---|
| 48 | # Created: 08/28/2007 by Jon Garrett |
|---|
| 49 | # |
|---|
| 50 | # $brcm_Log: /nexus/build/nexus.inc $ |
|---|
| 51 | # |
|---|
| 52 | # 35 11/9/11 3:52p erickson |
|---|
| 53 | # SW7420-1148: if GL_SUPPORT=y, don't generate or build proxy for |
|---|
| 54 | # graphics3d module |
|---|
| 55 | # |
|---|
| 56 | # 34 5/3/11 5:07p erickson |
|---|
| 57 | # SW7420-1819: repartition so NFE is a standard feature |
|---|
| 58 | # |
|---|
| 59 | # 32 12/15/10 11:59a erickson |
|---|
| 60 | # SW35230-2585: move circular DEPENDENCIES check into module_vars.pl |
|---|
| 61 | # |
|---|
| 62 | # 31 12/14/10 5:01p erickson |
|---|
| 63 | # SW7420-1264: use NEXUS_BIN_DIR and NEXUS_BUILD_DIR for final and |
|---|
| 64 | # intermediate binaries |
|---|
| 65 | # |
|---|
| 66 | # 30 12/9/10 3:33p erickson |
|---|
| 67 | # SW7420-1308: add NEXUS_STUB_MODULES so that stub modules can have their |
|---|
| 68 | # API included but still avoid having NEXUS_HAS_<MODULE> defined |
|---|
| 69 | # |
|---|
| 70 | # 29 9/29/10 9:33a erickson |
|---|
| 71 | # SW7420-1123: add linux usermode IPC |
|---|
| 72 | # |
|---|
| 73 | # 28 8/26/10 6:01p mward |
|---|
| 74 | # SW7125-576: Adding a list variable MAGNUM_NO_STRICT_ALIASING_SRCS, of |
|---|
| 75 | # files to be compiled with -fno-strict-aliasing. Only files with |
|---|
| 76 | # strict-aliasing warnings caused by kernel headers or other non- |
|---|
| 77 | # Broadcom source should be listed. |
|---|
| 78 | # |
|---|
| 79 | # 27 8/11/10 4:49p ttrammel |
|---|
| 80 | # SW7420-943: Merge NFE to main branch. |
|---|
| 81 | # |
|---|
| 82 | # NFE/1 5/10/10 5:47p ttrammel |
|---|
| 83 | # SW7405-4315: Initial NFE check-in. |
|---|
| 84 | # |
|---|
| 85 | # 26 11/24/09 1:06p erickson |
|---|
| 86 | # SW7420-457: remove security code from general nexus.inc file |
|---|
| 87 | # |
|---|
| 88 | # 25 11/17/09 2:02p erickson |
|---|
| 89 | # SW7405-3408: use $(filter) instead of $(findstring) |
|---|
| 90 | # |
|---|
| 91 | # 24 11/5/09 4:16p erickson |
|---|
| 92 | # SW7400-2511: add more build variables to NEXUS_OPTIONS |
|---|
| 93 | # |
|---|
| 94 | # 23 9/16/09 1:38p erickson |
|---|
| 95 | # SW7400-2511: add B_REFSW_ or NEXUS_ prefix to build variables |
|---|
| 96 | # |
|---|
| 97 | # 22 9/1/09 3:52p jgarrett |
|---|
| 98 | # SW7335-529: Replacing direct access to MAGNUM_MODULES with |
|---|
| 99 | # NEXUS_EXTRA_MODULES to avoid magnum paths leaking into application |
|---|
| 100 | # include paths |
|---|
| 101 | # |
|---|
| 102 | # 21 6/23/09 9:11a erickson |
|---|
| 103 | # PR54881: Provide emulation support in Nexus |
|---|
| 104 | # |
|---|
| 105 | # 20 4/8/09 4:31p vsilyaev |
|---|
| 106 | # PR 54016: Added support for precompiled header |
|---|
| 107 | # |
|---|
| 108 | # 19 3/26/09 11:06a vsilyaev |
|---|
| 109 | # PR 53611: Use simply expanded variables in complex substitutions |
|---|
| 110 | # |
|---|
| 111 | # 18 3/16/09 6:16p yili |
|---|
| 112 | # PR52990:Add region verification |
|---|
| 113 | # |
|---|
| 114 | # 17 3/16/09 5:28p vsilyaev |
|---|
| 115 | # PR 53225: Added suffix to the MAGNUM_PRECOMPILED_DIR |
|---|
| 116 | # |
|---|
| 117 | # 16 3/9/09 4:15p yili |
|---|
| 118 | # PR52990:Adding region verification to Nexus |
|---|
| 119 | # |
|---|
| 120 | # 15 11/6/08 12:45p erickson |
|---|
| 121 | # PR47312: added comment regarding PUBLIC_INCLUDES |
|---|
| 122 | # |
|---|
| 123 | # 14 10/6/08 4:04p vsilyaev |
|---|
| 124 | # PR 47440: Added option to link other static libraries with nexus |
|---|
| 125 | # |
|---|
| 126 | # 13 10/3/08 12:15p vsilyaev |
|---|
| 127 | # PR 45361: Fixed BTRC and BPROFILE support with -std=c89 |
|---|
| 128 | # |
|---|
| 129 | # 12 10/3/08 11:18a vsilyaev |
|---|
| 130 | # PR 45361: Fixed BTRC and BPROFILE support with -std=c89 |
|---|
| 131 | # |
|---|
| 132 | # 11 9/29/08 2:37p vsilyaev |
|---|
| 133 | # PR 47440: Added hooks that allow embedding external makefiles into the |
|---|
| 134 | # nexus build process |
|---|
| 135 | # |
|---|
| 136 | # 10 9/25/08 10:25a erickson |
|---|
| 137 | # PR45361: default to c99 for BTRC_SUPPORT or BPROFILE_SUPPORT |
|---|
| 138 | # |
|---|
| 139 | # 9 9/16/08 9:20a erickson |
|---|
| 140 | # PR45458: convert SYSTEM to OS |
|---|
| 141 | # |
|---|
| 142 | # 8 6/27/08 8:58a erickson |
|---|
| 143 | # PR43846: convert to $(PERL) |
|---|
| 144 | # |
|---|
| 145 | # 7 6/4/08 11:21a rjlewis |
|---|
| 146 | # PR40352: can't set this for VxWorks. |
|---|
| 147 | # |
|---|
| 148 | # 6 4/21/08 7:29p jgarrett |
|---|
| 149 | # PR 41575: Adding binary object support |
|---|
| 150 | # |
|---|
| 151 | # 5 4/14/08 4:31p vsilyaev |
|---|
| 152 | # PR 41083: Added BPROFILE |
|---|
| 153 | # |
|---|
| 154 | # 4 3/27/08 5:09p rjlewis |
|---|
| 155 | # PR40352: file was being included twice during make process. |
|---|
| 156 | # |
|---|
| 157 | # 3 1/23/08 9:21p vobadm |
|---|
| 158 | # PR35457: update docs |
|---|
| 159 | # |
|---|
| 160 | # 2 1/23/08 3:17p vsilyaev |
|---|
| 161 | # PR 38682: Added support for linux kernel/userspace proxy mode |
|---|
| 162 | # |
|---|
| 163 | # 1 1/18/08 2:12p jgarrett |
|---|
| 164 | # PR 38808: Merging to main branch |
|---|
| 165 | # |
|---|
| 166 | # Nexus_Devel/12 1/18/08 1:10p vsilyaev |
|---|
| 167 | # PR 38682: Repartition os_tools.inc and os_rules.inc, to os_tools, |
|---|
| 168 | # os_flags, os_flags_nexus and os_rules.inc |
|---|
| 169 | # |
|---|
| 170 | # Nexus_Devel/11 11/12/07 6:49p jgarrett |
|---|
| 171 | # PR 36953: Workaround for bad 3563 rap definitions |
|---|
| 172 | # |
|---|
| 173 | # Nexus_Devel/10 11/8/07 9:19a jgarrett |
|---|
| 174 | # PR 34416: Adding standard module define |
|---|
| 175 | # |
|---|
| 176 | # Nexus_Devel/9 10/8/07 5:04p jgarrett |
|---|
| 177 | # PR 34416: Ensuring syncthunk dir is available prior to vpath |
|---|
| 178 | # |
|---|
| 179 | # Nexus_Devel/8 10/2/07 11:54a jgarrett |
|---|
| 180 | # PR 34416: Removing nexus.h generation |
|---|
| 181 | # |
|---|
| 182 | # Nexus_Devel/7 9/24/07 4:18p jgarrett |
|---|
| 183 | # PR 35002: Adding platform to module include paths for |
|---|
| 184 | # platform_features.h. |
|---|
| 185 | # |
|---|
| 186 | # Nexus_Devel/6 9/21/07 11:19a erickson |
|---|
| 187 | # PR34254: rename platform to platforms |
|---|
| 188 | # |
|---|
| 189 | # Nexus_Devel/5 9/14/07 4:16p jgarrett |
|---|
| 190 | # PR 34416: Adding BDBG_DEBUG_BUILD |
|---|
| 191 | # |
|---|
| 192 | # Nexus_Devel/4 9/4/07 12:29p jgarrett |
|---|
| 193 | # PR 34416: Adding bchp and breg to nexus build |
|---|
| 194 | # |
|---|
| 195 | # Nexus_Devel/3 9/4/07 11:40a jgarrett |
|---|
| 196 | # PR 34416: Adding endian to nexus.h |
|---|
| 197 | # |
|---|
| 198 | # Nexus_Devel/2 8/31/07 6:28p jgarrett |
|---|
| 199 | # PR 34416: Adding nexus.h regeneration on header file addition |
|---|
| 200 | # |
|---|
| 201 | # Nexus_Devel/1 8/31/07 4:15p jgarrett |
|---|
| 202 | # PR 34416: Adding build framework |
|---|
| 203 | # |
|---|
| 204 | ############################################################ |
|---|
| 205 | |
|---|
| 206 | ############################################################ |
|---|
| 207 | # Overview: |
|---|
| 208 | # |
|---|
| 209 | # This is an internal nexus Makefile include. It is used for processing the module .inc files and generated build rules. |
|---|
| 210 | # This file is included by nexus/platform/$(NEXUS_PLATFORM)/build/Makefile |
|---|
| 211 | # |
|---|
| 212 | # This file should never be included by applications. |
|---|
| 213 | # Applications should include nexus/platform/$(NEXUS_PLATFORM)/build/platform_app.inc into their Makefile. |
|---|
| 214 | # Please see nexus/build/nexus_defs.inc for a .inc which is common for internal nexus use and application use. |
|---|
| 215 | # |
|---|
| 216 | ############################################################ |
|---|
| 217 | |
|---|
| 218 | # Make sure files are included in the correct order |
|---|
| 219 | ifndef NEXUS_DEFS_INCLUDED |
|---|
| 220 | $(error nexus_defs.inc was not included first.) |
|---|
| 221 | endif |
|---|
| 222 | |
|---|
| 223 | ifneq ($(B_REFSW_OS),vxworks) |
|---|
| 224 | BSTD_OMIT_DEFAULT_CONFIG := 1 |
|---|
| 225 | endif |
|---|
| 226 | |
|---|
| 227 | # Create NEXUS_SOURCE_DIRS from all modules in NEXUS_MODULES |
|---|
| 228 | NEXUS_SOURCE_DIRS := $(sort $(foreach module,$(NEXUS_MODULES),$(dir $(NEXUS_$(module)_SOURCES)))) |
|---|
| 229 | # Add the nexus source dirs to the search path for .c files. |
|---|
| 230 | ifdef NEXUS_SYNCTHUNK_DIR |
|---|
| 231 | $(shell $(MKDIR) $(NEXUS_SYNCTHUNK_DIR)) |
|---|
| 232 | endif |
|---|
| 233 | vpath %.c $(NEXUS_SOURCE_DIRS) |
|---|
| 234 | |
|---|
| 235 | ifeq ($(BPROFILE_SUPPORT),y) |
|---|
| 236 | NEXUS_CFLAGS_BPROFILE = -DB_HAS_BPROFILE=1 -finstrument-functions |
|---|
| 237 | endif |
|---|
| 238 | |
|---|
| 239 | |
|---|
| 240 | # Create NEXUS CFLAGS from base include path and defines |
|---|
| 241 | NEXUS_DEFINES := $(sort $(foreach module, $(NEXUS_MODULES),$(NEXUS_$(module)_DEFINES))) |
|---|
| 242 | NEXUS_DEFINES += $(foreach module, $(NEXUS_MODULES),NEXUS_HAS_$(module)) |
|---|
| 243 | NEXUS_CFLAGS += -I$(NEXUS_TOP)/base/include/$(B_REFSW_OS)/config $(addprefix -D,$(NEXUS_DEFINES)) |
|---|
| 244 | NEXUS_CFLAGS += $(addprefix -I,$(NEXUS_EXTRA_INCLUDES)) |
|---|
| 245 | NEXUS_CFLAGS += $(addprefix -I,$(NEXUS_PLATFORM_PUBLIC_INCLUDES)) |
|---|
| 246 | NEXUS_MAGNUM_PRECOMPILED_HEADER := ${MAGNUM}/basemodules/std/bstd.h |
|---|
| 247 | NEXUS_PRECOMPILED_HEADER := ${NEXUS_TOP}/base/include/nexus_base.h |
|---|
| 248 | |
|---|
| 249 | # Create NEXUS_XXX_CFLAGS and NEXUS_XXX_OBJECTS using PERL |
|---|
| 250 | $(shell $(PERL) $(NEXUS_TOP)/build/module_vars.pl $(NEXUS_BUILD_DIR)/module_vars.inc $(NEXUS_MODULES) $(NEXUS_STUB_MODULES)) |
|---|
| 251 | |
|---|
| 252 | # Include result into makefile |
|---|
| 253 | include $(NEXUS_BUILD_DIR)/module_vars.inc |
|---|
| 254 | |
|---|
| 255 | # Include NEXUS OS-specific flags |
|---|
| 256 | include $(NEXUS_TOP)/build/os/$(B_REFSW_OS)/os_flags_nexus.inc |
|---|
| 257 | |
|---|
| 258 | # Include Magnum Modules |
|---|
| 259 | NEXUS_MAGNUM_MODULES := $(foreach module,$(NEXUS_MODULES),$(NEXUS_$(module)_MAGNUM_MODULES)) |
|---|
| 260 | include $(sort $(NEXUS_MAGNUM_MODULES)) |
|---|
| 261 | |
|---|
| 262 | # Include any extra modules requested by nexus .inc files as well. |
|---|
| 263 | MAGNUM_MODULES += $(sort $(NEXUS_EXTRA_MODULES)) |
|---|
| 264 | |
|---|
| 265 | # The 3563 RAP code has some .o files that should be .c |
|---|
| 266 | # Expand Magnum Variables |
|---|
| 267 | MAGNUM_INCLUDES := $(sort $(foreach module, $(MAGNUM_MODULES), $($(module)_INCLUDES))) |
|---|
| 268 | |
|---|
| 269 | ifneq ($(filter ${NEXUS_MODE},client proxy),) |
|---|
| 270 | # For client/proxy environments, we only compile in a small subset of magnum modules |
|---|
| 271 | MAGNUM_SOURCES := $(patsubst %.o,%.c,$(sort $(foreach module, $(NEXUS_EXTRA_MODULES) ${MAGNUM_CLIENT_MODULES}, $($(module)_SOURCES)))) |
|---|
| 272 | else |
|---|
| 273 | # Don't compile magnum modules that are accesses using proxy interface |
|---|
| 274 | MAGNUM_SOURCES := $(patsubst %.o,%.c,$(sort $(foreach module, ${MAGNUM_MODULES}, $($(module)_SOURCES)))) |
|---|
| 275 | endif |
|---|
| 276 | |
|---|
| 277 | MAGNUM_DEFINES := $(sort $(foreach module, $(MAGNUM_MODULES), $($(module)_DEFINES))) |
|---|
| 278 | MAGNUM_CFLAGS := $(addprefix -D,$(MAGNUM_DEFINES)) $(addprefix -I,$(MAGNUM_INCLUDES)) |
|---|
| 279 | MAGNUM_SOURCE_DIRS := $(foreach module,$(MAGNUM_MODULES),$(dir $($(module)_SOURCES))) |
|---|
| 280 | MAGNUM_OPTIONS := $(sort $(foreach module,$(MAGNUM_MODULES),$($(module)_OPTIONS))) |
|---|
| 281 | MAGNUM_NOPROFILE_SRCS += bdbg.c bdbg_output.c bdbg_os_priv.c bkni.c |
|---|
| 282 | ifeq ($(B_REFSW_OS), linuxemu) |
|---|
| 283 | NEXUS_CFLAGS += $(addprefix -I,$(NEXUS_PLATFORM_PRIVATE_INCLUDES)) |
|---|
| 284 | MAGNUM_NOPROFILE_SRCS += breg_client.c |
|---|
| 285 | else |
|---|
| 286 | MAGNUM_NOPROFILE_SRCS += breg_mem.c |
|---|
| 287 | endif |
|---|
| 288 | MAGNUM_STATIC_LIBS := $(sort $(foreach module,$(MAGNUM_MODULES),$($(module)_STATIC_LIBS))) |
|---|
| 289 | |
|---|
| 290 | #MAGNUM_NO_STRICT_ALIASING_SRCS lists files which will be compile with -fno-strict-aliasing. strict-aliasing is a useful and |
|---|
| 291 | #important optimization, which is turned off by including a file in this list. Don't add files to this list unless strict-aliasing |
|---|
| 292 | #warnings are caused by code outside our control (Linux kernel headers). If at all possible, fix the condition that causes |
|---|
| 293 | #the warning. |
|---|
| 294 | MAGNUM_NO_STRICT_ALIASING_SRCS := brpc_socket.c |
|---|
| 295 | |
|---|
| 296 | # Set other makes |
|---|
| 297 | NEXUS_OTHER_MAKES := $(sort $(foreach module, $(NEXUS_MODULES),$(NEXUS_$(module)_MAKES))) $(sort $(foreach module, $(MAGNUM_MODULES), $($(module)_MAKES))) |
|---|
| 298 | |
|---|
| 299 | # Remove pre-compiled files from the build |
|---|
| 300 | MAGNUM_PRECOMPILED_DIR := $(NEXUS_BUILD_DIR)/libmagnum.$(B_REFSW_OS).$(B_REFSW_ARCH) |
|---|
| 301 | MAGNUM_PRECOMPILED_SOURCES := $(patsubst %.$(NEXUS_OBJ_SUFFIX),%.c,$(notdir $(wildcard $(MAGNUM_PRECOMPILED_DIR)/*))) |
|---|
| 302 | |
|---|
| 303 | # Check that all precompiled files are actually being requested by the build. Otherwise, flags are probably mismatched somewhere. |
|---|
| 304 | $(foreach precomp,$(MAGNUM_PRECOMPILED_SOURCES),$(if $(filter $(precomp),$(notdir $(MAGNUM_SOURCES))),,$(warning precompiled file $(precomp) is not being used in your build))) |
|---|
| 305 | |
|---|
| 306 | MAGNUM_OBJECTS := $(addprefix $(NEXUS_OBJ_DIR)/MAGNUM/,$(patsubst %.c,%.$(NEXUS_OBJ_SUFFIX),$(filter-out $(MAGNUM_PRECOMPILED_SOURCES),$(notdir $(MAGNUM_SOURCES))))) |
|---|
| 307 | MAGNUM_PRECOMPILED_OBJECTS += $(wildcard $(MAGNUM_PRECOMPILED_DIR)/*) |
|---|
| 308 | |
|---|
| 309 | # Add the magnum source dirs to the search path for .c files. |
|---|
| 310 | vpath %.c $(MAGNUM_SOURCE_DIRS) |
|---|
| 311 | |
|---|
| 312 | # Add all magnum CFLAGS to NEXUS_CFLAGS |
|---|
| 313 | NEXUS_CFLAGS += $(MAGNUM_CFLAGS) |
|---|
| 314 | |
|---|
| 315 | # Include os-dependencies and expand nexus rules |
|---|
| 316 | # Sanity Check that we have included an OS-dependent set of defines |
|---|
| 317 | ifndef NEXUS_OBJ_SUFFIX |
|---|
| 318 | $(error NEXUS_OBJ_SUFFIX has not been defined. Stop.) |
|---|
| 319 | endif |
|---|
| 320 | |
|---|
| 321 | ifndef NEXUS_OBJ_DIR |
|---|
| 322 | $(error NEXUS_OBJ_DIR has not been defined. Stop.) |
|---|
| 323 | endif |
|---|
| 324 | |
|---|
| 325 | ifndef NEXUS_ENDIAN |
|---|
| 326 | $(error NEXUS_ENDIAN has not been defined. Stop.) |
|---|
| 327 | endif |
|---|
| 328 | |
|---|
| 329 | # Generate module rules using PERL |
|---|
| 330 | ifeq ($(GL_SUPPORT),y) |
|---|
| 331 | # for P3D, graphics3d is user-mode only even in kernel mode |
|---|
| 332 | MODULE_RULES_OPTIONS=-no_proxy GRAPHICS3D |
|---|
| 333 | endif |
|---|
| 334 | $(shell $(PERL) $(NEXUS_TOP)/build/os/$(B_REFSW_OS)/module_rules.pl $(NEXUS_BUILD_DIR)/module_rules.inc $(MODULE_RULES_OPTIONS) $(NEXUS_MODULES)) |
|---|
| 335 | |
|---|
| 336 | include $(NEXUS_BUILD_DIR)/module_rules.inc |
|---|
| 337 | |
|---|
| 338 | # Create NEXUS_OPTIONS from list of all options |
|---|
| 339 | NEXUS_OPTIONS := $(sort $(foreach module, $(NEXUS_MODULES),$(NEXUS_$(module)_OPTIONS))) |
|---|
| 340 | |
|---|
| 341 | # Create single list of all nexus objects for convenience |
|---|
| 342 | NEXUS_OBJECTS := $(foreach module,$(NEXUS_MODULES),$(NEXUS_$(module)_OBJECTS)) |
|---|
| 343 | |
|---|
| 344 | # Include OS-specific rules |
|---|
| 345 | include $(NEXUS_TOP)/build/os/$(B_REFSW_OS)/os_rules.inc |
|---|
| 346 | |
|---|
| 347 | # Debug rule to dump all options specified in NEXUS_OPTIONS |
|---|
| 348 | define OPTION_template |
|---|
| 349 | @echo $(1)=$(if $($(1)),$($(1)),"<value not set>") |
|---|
| 350 | |
|---|
| 351 | endef |
|---|
| 352 | |
|---|
| 353 | NEXUS_OPTIONS += NEXUS_PLATFORM NEXUS_MODE B_REFSW_OS B_REFSW_DEBUG B_REFSW_ARCH B_REFSW_SHAREABLE NEXUS_POWER_MANAGEMENT B_REFSW_FIRMWARE |
|---|
| 354 | |
|---|
| 355 | .PHONY: nexus_print_options |
|---|
| 356 | nexus_print_options: |
|---|
| 357 | ifneq ($(NEXUS_OPTIONS),) |
|---|
| 358 | @echo "---Nexus Options---" |
|---|
| 359 | $(foreach option,$(sort $(NEXUS_OPTIONS)),$(call OPTION_template,$(option))) |
|---|
| 360 | endif |
|---|
| 361 | ifneq ($(MAGNUM_OPTIONS),) |
|---|
| 362 | @echo "---Magnum Options---" |
|---|
| 363 | $(foreach option,$(sort $(MAGNUM_OPTIONS)),$(call OPTION_template,$(option))) |
|---|
| 364 | endif |
|---|
| 365 | |
|---|
| 366 | # NOTE: It's important that NEXUS_$(module)_PUBLIC_INCLUDES not be rolled up into a single, global include path inside nexus.inc. |
|---|
| 367 | # Having per-module include paths is required for perserving modularity by preventing unmanaged calls from one module to another. |
|---|
| 368 | # See platform_app.inc for a rolled up NEXUS_$(module)_PUBLIC_INCLUDES usable by applications to access the entire Nexus public API. |
|---|
| 369 | |
|---|