| 1 | ############################################################ |
|---|
| 2 | # Copyright (c) 2003-2010, Broadcom Corporation |
|---|
| 3 | # All Rights Reserved |
|---|
| 4 | # Confidential Property of Broadcom Corporation |
|---|
| 5 | # |
|---|
| 6 | # THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | # AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | # EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | # |
|---|
| 10 | # $brcm_Workfile: Makefile.magnum $ |
|---|
| 11 | # $brcm_Revision: 14 $ |
|---|
| 12 | # $brcm_Date: 1/20/10 5:29p $ |
|---|
| 13 | # |
|---|
| 14 | # Module Description: |
|---|
| 15 | # |
|---|
| 16 | # Revision History: |
|---|
| 17 | # |
|---|
| 18 | # Created: 02/09/2001 by Marcus Kellerman |
|---|
| 19 | # |
|---|
| 20 | # $brcm_Log: /BSEAV/api/build/Makefile.magnum $ |
|---|
| 21 | # |
|---|
| 22 | # 14 1/20/10 5:29p garetht |
|---|
| 23 | # SW7420-553: Add platform for 93380vms |
|---|
| 24 | # |
|---|
| 25 | # 13 1/19/10 2:49p nickh |
|---|
| 26 | # SW7420-541: Rename 97420dvr2 to 97420 |
|---|
| 27 | # |
|---|
| 28 | # 12 11/17/09 2:15p erickson |
|---|
| 29 | # SW7405-3408: use $(filter) instead of $(findstring) |
|---|
| 30 | # |
|---|
| 31 | # 11 10/30/09 5:25p nickh |
|---|
| 32 | # SW7420-331: Rename 97410c to 97410 |
|---|
| 33 | # |
|---|
| 34 | # 10 9/15/09 5:01p nickh |
|---|
| 35 | # SW7420-331: Add 7410 support |
|---|
| 36 | # |
|---|
| 37 | # 9 2/4/09 10:16a jrubio |
|---|
| 38 | # PR51629: add 7336 support |
|---|
| 39 | # |
|---|
| 40 | # 8 12/14/08 6:31p nickh |
|---|
| 41 | # PR50205: Add support for 97420dvr2 |
|---|
| 42 | # |
|---|
| 43 | # 7 6/20/08 6:18p anilmm |
|---|
| 44 | # PR43453: Add support for 97459 |
|---|
| 45 | # |
|---|
| 46 | # 6 5/21/08 11:50a rjlewis |
|---|
| 47 | # PR40352: tell me your installing the lib. |
|---|
| 48 | # |
|---|
| 49 | # 5 5/6/08 12:47p vsilyaev |
|---|
| 50 | # PR 42470: Decoupled BTRC and BPROFILE (BTRC could be used without |
|---|
| 51 | # BPROFILE) and made BTRC macros avaliable all the time |
|---|
| 52 | # |
|---|
| 53 | # 4 12/10/07 6:40p mward |
|---|
| 54 | # PR38078: Create PLATFORM for 97018, 97018RNG |
|---|
| 55 | # |
|---|
| 56 | # 3 12/3/07 4:48p katrep |
|---|
| 57 | # PR37217: added 7335 |
|---|
| 58 | # |
|---|
| 59 | # 2 11/7/07 4:54p vsilyaev |
|---|
| 60 | # PR 26656: Returned back -finstrument-function |
|---|
| 61 | # |
|---|
| 62 | # 1 10/16/07 12:37p erickson |
|---|
| 63 | # PR36068: api/build/Makefile is now a simple switch based on |
|---|
| 64 | # BUILD_SYSTEM. previous Makefile moved to Makefile.magnum. |
|---|
| 65 | # |
|---|
| 66 | # 34 10/3/07 5:40p jrubio |
|---|
| 67 | # PR35015: add 7325 |
|---|
| 68 | # |
|---|
| 69 | # 33 8/15/07 2:31p vsilyaev |
|---|
| 70 | # PR 34089: Use C99 standard to compile linux user level code |
|---|
| 71 | # |
|---|
| 72 | # 32 1/29/07 12:33p erickson |
|---|
| 73 | # PR25902: linux kernel cflags are now explicit, for future isolation |
|---|
| 74 | # |
|---|
| 75 | # 31 1/17/07 11:48a anilmm |
|---|
| 76 | # PR27129: add 97458A0 platform support |
|---|
| 77 | # |
|---|
| 78 | # 30 12/15/06 6:27p vsilyaev |
|---|
| 79 | # PR 26656: Added BPRofile support |
|---|
| 80 | # |
|---|
| 81 | # 29 10/31/06 9:13a erickson |
|---|
| 82 | # PR25109: add 7403 support |
|---|
| 83 | # |
|---|
| 84 | # 28 9/29/06 4:28p mward |
|---|
| 85 | # PR24604: create PLATFORM for 97118RNG. |
|---|
| 86 | # |
|---|
| 87 | # 27 7/14/06 11:31a jgarrett |
|---|
| 88 | # PR 19909: Merging to latest baseline |
|---|
| 89 | # |
|---|
| 90 | # PR19909/2 7/6/06 4:43p jgarrett |
|---|
| 91 | # PR 19909: Merging to latest baseline |
|---|
| 92 | # |
|---|
| 93 | # 26 7/6/06 12:10p rjlewis |
|---|
| 94 | # PR22498: only update the fcntlcom.h if not linux server. |
|---|
| 95 | # |
|---|
| 96 | # 25 6/13/06 11:56a mphillip |
|---|
| 97 | # PR21883: Experimental aggressive optimization for p3d, opengles, vdc, |
|---|
| 98 | # and grc enabled for 7038. |
|---|
| 99 | # |
|---|
| 100 | # 24 5/30/06 5:55p rjlewis |
|---|
| 101 | # PR20134: vxworks 6 has new fcntlcom.h file. |
|---|
| 102 | # |
|---|
| 103 | # 97401_200605/1 5/23/06 6:27p rjlewis |
|---|
| 104 | # PR20134: vxworks 6 has new fcntlcom file. |
|---|
| 105 | # |
|---|
| 106 | # 23 5/26/06 9:02a mward |
|---|
| 107 | # PR21671: Add support for 7118 chip 97118 board. |
|---|
| 108 | # |
|---|
| 109 | # 22 5/17/06 3:28p vsilyaev |
|---|
| 110 | # PR 21171: Use custom rule to make SRC target, that allows to keep .so |
|---|
| 111 | # extension for shared objects |
|---|
| 112 | # |
|---|
| 113 | # 21 4/27/06 5:29p haisongw |
|---|
| 114 | # PR 20984: add 97456 platform support |
|---|
| 115 | # |
|---|
| 116 | # 20 4/20/06 3:15p erickson |
|---|
| 117 | # PR19738: 97435 merge |
|---|
| 118 | # |
|---|
| 119 | # PROD_97435C_REFSW_Devel/1 4/18/06 6:53p gqli |
|---|
| 120 | # PR19738: add BCM97435C support |
|---|
| 121 | # |
|---|
| 122 | # PR19909/1 7/6/06 10:51a jgarrett |
|---|
| 123 | # PR 19909: Reducing brutus build output |
|---|
| 124 | # |
|---|
| 125 | # 18 1/18/06 11:48a rjlewis |
|---|
| 126 | # PR19044: Don't copy if already done. Don't copy for vxworks 6. |
|---|
| 127 | # |
|---|
| 128 | # 17 11/23/05 5:10p erickson |
|---|
| 129 | # PR18256: added 97455 support |
|---|
| 130 | # |
|---|
| 131 | # 16 10/10/05 11:37a vsilyaev |
|---|
| 132 | # PR9497: Make Q_ options overwritable |
|---|
| 133 | # |
|---|
| 134 | # 15 9/16/05 1:14p erickson |
|---|
| 135 | # PR17150: remove reference to 97395 |
|---|
| 136 | # |
|---|
| 137 | # 14 9/7/05 5:06p vsilyaev |
|---|
| 138 | # PR 15377: Merged 7401 changes |
|---|
| 139 | # |
|---|
| 140 | # Refsw_97401_Bringup/2 8/24/05 2:40p vsilyaev |
|---|
| 141 | # Backmerge from /main/ |
|---|
| 142 | # |
|---|
| 143 | # 13 8/17/05 9:39p bandrews |
|---|
| 144 | # PR16360: Initial lip sync impl |
|---|
| 145 | # |
|---|
| 146 | # 12 8/9/05 1:47p rjlewis |
|---|
| 147 | # PR16609: merged vxworks changes from branch PR15236. |
|---|
| 148 | # PR15236: PR15236: Modified to copy over vxworks file |
|---|
| 149 | # |
|---|
| 150 | # 11 8/5/05 2:46p erickson |
|---|
| 151 | # PR16583: use BUILD_SYSTEM=proxy for proxy builds so that PLATFORM |
|---|
| 152 | # information is available in the proxy layer |
|---|
| 153 | # |
|---|
| 154 | # 10 7/18/05 6:13p vsilyaev |
|---|
| 155 | # PR 15377: Refactoring of the board support package |
|---|
| 156 | # |
|---|
| 157 | # Refsw_97401_Bringup/1 7/12/05 1:47a vsilyaev |
|---|
| 158 | # Added support for 97401 |
|---|
| 159 | # |
|---|
| 160 | # 9 7/8/05 10:32a erickson |
|---|
| 161 | # PR15145: modified find_latest_ccase_file so that it's ignored on |
|---|
| 162 | # DEBUG=y builds, but fails on DEBUG=n builds. This must be resolved as |
|---|
| 163 | # part of the release process now. |
|---|
| 164 | # |
|---|
| 165 | # 8 5/13/05 12:05p vsilyaev |
|---|
| 166 | # PR15145: Fixed use of find_latest_ccase_file |
|---|
| 167 | # |
|---|
| 168 | # 7 5/5/05 2:31p erickson |
|---|
| 169 | # PR15159: added double quotes for DOS builds |
|---|
| 170 | # |
|---|
| 171 | # 6 5/2/05 12:29p erickson |
|---|
| 172 | # PR15145: added test to see if bsettop.h is latest checkin |
|---|
| 173 | # |
|---|
| 174 | # 5 3/24/05 12:52p vsilyaev |
|---|
| 175 | # PR 14593: 93560 support |
|---|
| 176 | # |
|---|
| 177 | # Refsw_93560_Bringup/1 3/10/05 6:50p vsilyaev |
|---|
| 178 | # Added 93560 support |
|---|
| 179 | # |
|---|
| 180 | # 4 3/9/05 7:44p vsilyaev |
|---|
| 181 | # PR 14402: Moved compose into the toplevel makefile. |
|---|
| 182 | # |
|---|
| 183 | # 3 2/22/05 1:52p erickson |
|---|
| 184 | # PR14180: DEBUG is now defaulted in tools.mak |
|---|
| 185 | # |
|---|
| 186 | # 2 2/17/05 1:51p erickson |
|---|
| 187 | # PR9497: make vxworks-friendly |
|---|
| 188 | # |
|---|
| 189 | # 1 2/7/05 6:54p dlwin |
|---|
| 190 | # Merge down for release 2005_REFSW_MERGETOMAIN: |
|---|
| 191 | # |
|---|
| 192 | # Irvine_BSEAVSW_Devel/34 1/28/05 11:13a erickson |
|---|
| 193 | # PR13908: refactor to make external include of Makefile.core correct |
|---|
| 194 | # |
|---|
| 195 | # Irvine_BSEAVSW_Devel/33 1/25/05 5:11p erickson |
|---|
| 196 | # PR13908: Settop API makefile rework |
|---|
| 197 | # |
|---|
| 198 | ############################################################ |
|---|
| 199 | |
|---|
| 200 | ############################### |
|---|
| 201 | # |
|---|
| 202 | # Build Options |
|---|
| 203 | # |
|---|
| 204 | |
|---|
| 205 | ifeq ($(Q_),) |
|---|
| 206 | # Override this to nothing if you want verbose output |
|---|
| 207 | Q_=@ |
|---|
| 208 | endif |
|---|
| 209 | |
|---|
| 210 | ifeq ($(BPROFILE_SUPPORT),y) |
|---|
| 211 | CFLAGS_BPROFILE = -DB_HAS_BPROFILE=1 -DB_HAS_TRC |
|---|
| 212 | CFLAGS_BPROFILE+= -finstrument-functions |
|---|
| 213 | endif |
|---|
| 214 | |
|---|
| 215 | |
|---|
| 216 | |
|---|
| 217 | ifeq ($(Q_),@) |
|---|
| 218 | MAKE_OPTS = -s |
|---|
| 219 | endif |
|---|
| 220 | |
|---|
| 221 | include tools.mak |
|---|
| 222 | BSEAV = $(shell cd "../.." && ${PWD}) |
|---|
| 223 | |
|---|
| 224 | # all: must be on top |
|---|
| 225 | ifeq (${STATICLIB},no) |
|---|
| 226 | all: check_environment shared |
|---|
| 227 | else |
|---|
| 228 | ifeq (${SHAREDLIB},no) |
|---|
| 229 | all: check_environment static |
|---|
| 230 | else |
|---|
| 231 | all: check_environment shared static |
|---|
| 232 | endif |
|---|
| 233 | endif |
|---|
| 234 | |
|---|
| 235 | # proxy builds require BUILD_SYSTEM=proxy set externally |
|---|
| 236 | ifneq ($(filter $(PLATFORM),93560 97038 97018 97018RNG 97118 97118RNG 97398 97401 97403 97325 97335 97336 97405 97455 97456 97458 97459 97400 97435 97420 97410 93380vms),) |
|---|
| 237 | BUILD_SYSTEM = magnum |
|---|
| 238 | else |
|---|
| 239 | BUILD_SYSTEM = legacy |
|---|
| 240 | endif |
|---|
| 241 | |
|---|
| 242 | ############################### |
|---|
| 243 | # |
|---|
| 244 | # Source |
|---|
| 245 | # |
|---|
| 246 | |
|---|
| 247 | # System specific source (This is the core of the Settop API) |
|---|
| 248 | include ${BUILD_SYSTEM}/Makefile.core |
|---|
| 249 | |
|---|
| 250 | # Encoder Source |
|---|
| 251 | include Makefile.encoder |
|---|
| 252 | |
|---|
| 253 | # PVR Source |
|---|
| 254 | include Makefile.pvr |
|---|
| 255 | |
|---|
| 256 | include $(ROCKFORD)/inc/compose.mak |
|---|
| 257 | SRCS += $(addsuffix .c, ${notdir ${OBJ}}) |
|---|
| 258 | OPTIMIZE_SRCS += $(addsuffix .c, ${notdir ${OPTIMIZE_OBJ}}) |
|---|
| 259 | CFLAGS += ${MAGNUM_INC} |
|---|
| 260 | CFLAGS += ${B_REFSW_C_ONLY_FLAGS} |
|---|
| 261 | NOPROFILE_OBJ = breg_mem bdbg bdbg_output |
|---|
| 262 | NOPROFILE_SRCS += $(addsuffix .c, ${notdir ${NOPROFILE_OBJ}}) |
|---|
| 263 | |
|---|
| 264 | ############################### |
|---|
| 265 | # |
|---|
| 266 | # If VxWorks copy over the fnctlcom.h file it contains O_DIRECT definitions. |
|---|
| 267 | # USE WIND_BASE set when torVars.bat is executed. |
|---|
| 268 | # Note: cannot update the fcntlcom.h file if building on a linux server (no write permissions). |
|---|
| 269 | # |
|---|
| 270 | |
|---|
| 271 | ifeq ($(SYSTEM),vxworks) |
|---|
| 272 | ifneq ($(OSTYPE),linux) |
|---|
| 273 | OTHER_MAKES += copy_fcntlcom |
|---|
| 274 | .PHONY: copy_fcntlcom |
|---|
| 275 | ifeq ($(vxWorksVersion),6) |
|---|
| 276 | VXWORKS_VERSION=$(ROCKFORD)/bsp/vxWorks6x |
|---|
| 277 | else |
|---|
| 278 | VXWORKS_VERSION=$(ROCKFORD)/bsp/vxWorks55 |
|---|
| 279 | endif |
|---|
| 280 | copy_fcntlcom: $(WIND_BASE)/target/h/sys/fcntlcom.h |
|---|
| 281 | $(WIND_BASE)/target/h/sys/fcntlcom.h: $(VXWORKS_VERSION)/fcntlcom.h |
|---|
| 282 | @echo "***********************" |
|---|
| 283 | @echo "$(WIND_BASE)/target/h/sys/fcntlcom.h file is replaced." |
|---|
| 284 | @echo "***********************" |
|---|
| 285 | @$(CP) $(VXWORKS_VERSION)/fcntlcom.h $(WIND_BASE)/target/h/sys/ |
|---|
| 286 | endif |
|---|
| 287 | endif |
|---|
| 288 | |
|---|
| 289 | # temp for linuxkernel |
|---|
| 290 | ifeq ($(SYSTEM),linuxkernel) |
|---|
| 291 | CFLAGS += ${B_REFSW_LINUXKERNEL_CFLAGS} |
|---|
| 292 | endif |
|---|
| 293 | |
|---|
| 294 | ############################### |
|---|
| 295 | # |
|---|
| 296 | # For release builds, test the public api to see if bsettop.h is the latest file. |
|---|
| 297 | # If not, then BSETTOP_VERSION has probably not been incremented. Fail the build. |
|---|
| 298 | # This only happens for release builds, therefore it should be always caught on prerelease validation. |
|---|
| 299 | |
|---|
| 300 | ifneq ($(SYSTEM),vxworks) |
|---|
| 301 | ifeq ($(DEBUG),n) |
|---|
| 302 | OTHER_MAKES=test_bsettop_version |
|---|
| 303 | .PHONY: test_bsettop_version |
|---|
| 304 | test_bsettop_version: |
|---|
| 305 | @if [ `env BSEAV=${BSEAV} /usr/bin/perl find_latest_ccase_file.pl` != "bsettop.h" ]; then \ |
|---|
| 306 | echo "***********************"; \ |
|---|
| 307 | echo "bsettop.h is not up-to-date. BSETTOP_VERSION should be incremented for release."; \ |
|---|
| 308 | echo "***********************"; \ |
|---|
| 309 | test -z this_build_must_die; \ |
|---|
| 310 | fi |
|---|
| 311 | endif |
|---|
| 312 | endif |
|---|
| 313 | |
|---|
| 314 | ifeq ($(BPROFILE_SUPPORT),y) |
|---|
| 315 | #for now compile symbol table only for BPROFILE |
|---|
| 316 | SYM_SRC = bsymbols.c |
|---|
| 317 | CFLAGS += -DB_HAS_SYMTABLE |
|---|
| 318 | endif |
|---|
| 319 | |
|---|
| 320 | ############################### |
|---|
| 321 | # |
|---|
| 322 | # Build rules - requires the following to be defined: |
|---|
| 323 | # |
|---|
| 324 | # LIB - name of the lib |
|---|
| 325 | # SRCS - the source files to build |
|---|
| 326 | # vpath - for finding source |
|---|
| 327 | # CFLAGS - for build source |
|---|
| 328 | # |
|---|
| 329 | |
|---|
| 330 | LIB = settop |
|---|
| 331 | include rules.mak |
|---|
| 332 | |
|---|
| 333 | ############################### |
|---|
| 334 | # |
|---|
| 335 | # Optional installation |
|---|
| 336 | # |
|---|
| 337 | ifeq ($(INSTALL_DIR),) |
|---|
| 338 | install: |
|---|
| 339 | $(error You must define INSTALL_DIR) |
|---|
| 340 | else |
|---|
| 341 | ifeq ($(BSETTOP_LIBS),) |
|---|
| 342 | install: |
|---|
| 343 | @echo "Static build has no files to install." |
|---|
| 344 | else |
|---|
| 345 | install: all |
|---|
| 346 | @echo "[Install... libs]" |
|---|
| 347 | ${Q_}$(CP) $(BSETTOP_LIBS) $(INSTALL_DIR) |
|---|
| 348 | endif |
|---|
| 349 | endif |
|---|
| 350 | |
|---|
| 351 | CFLAGS += -DBSYNC_XVD_TSM_ALLOWS_EARLY_FRAME |
|---|