source: svn/newcon3bcm2_21bu/BSEAV/api/build/tools.mak @ 76

Last change on this file since 76 was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 6.8 KB
Line 
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: tools.mak $
11# $brcm_Revision: 23 $
12# $brcm_Date: 4/26/10 6:25p $
13#
14# Module Description:
15#
16# Revision History:
17#
18# $brcm_Log: /BSEAV/api/build/tools.mak $
19#
20# 23   4/26/10 6:25p mward
21# SW7125-253: Set CROSS_COMPILE for big-endian.
22#
23# 22   4/16/10 10:07a erickson
24# SW7400-2511: avoid circular reference if ARCH is defined
25#
26# 21   4/15/10 2:36p erickson
27# SW7400-2511: support B_REFSW_ARCH
28#
29# 20   4/9/10 4:50p jrubio
30# SW7125-253: fix for Big Endian
31#
32# 19   4/2/10 6:07p mward
33# SW7125-253:  stbgcc-4.4.3-1.0 has mipsel-linux-uclibc-gcc not  mipsel-
34# uclibc-gcc.
35#
36# 18   3/24/10 11:16a erickson
37# SW7405-4104: remove comment about g++ GPL contamination
38#
39# 17   11/17/09 2:15p erickson
40# SW7405-3408: use $(filter) instead of $(findstring)
41#
42# 16   3/26/09 10:56a vsilyaev
43# PR 53611: Use simply expanded variables everywhere where  is used. It
44# prevents evaluation of  every where variable is used
45#
46# 15   12/12/07 9:30a erickson
47# PR32813: changed comment
48#
49# 14   7/25/07 11:28a vsilyaev
50# PR 32813: Added Windows MINGW support
51#
52# 13   12/15/06 6:27p vsilyaev
53# PR 26656: Added BPRofile support
54#
55# 12   7/19/06 5:39p jgarrett
56# PR 19909: Fixing make -j errors
57#
58# 11   7/14/06 11:31a jgarrett
59# PR 19909: Merging to latest baseline
60#
61# PR19909/2   7/7/06 1:30p jgarrett
62# PR 19909: Changed Q_ from ?= to := for vxWorks.
63#
64# PR19909/1   7/6/06 10:51a jgarrett
65# PR 19909: Reducing brutus build output
66#
67# 9   2/17/06 2:34p rjlewis
68# PR19725: v6 and linux versions can use -p option.
69#
70# 8   1/18/06 11:51a rjlewis
71# PR19044: added MV definition (for move).
72#
73# 7   12/7/05 4:10p hkuhnert
74# PR15072: Change chdir to pwd when compiling from linux host.
75#
76# 6   8/4/05 4:41p erickson
77# PR15139: collected generic build configuration into
78# BSEAV/build/refsw_inc.mak
79#
80# 5   2/23/05 2:40p erickson
81# PR14180: tools.mak must define SYSTEM too
82#
83# 4   2/22/05 1:53p erickson
84# PR14180: default DEBUG to y, added better ARCH/PLATFORM support for
85# vxworks
86#
87# 3   2/17/05 1:51p erickson
88# PR9497: modified ARCH for vxworks to be more meaningful
89#
90# 2   2/16/05 4:45p erickson
91# PR9497: allow dos mkdir to work
92#
93# 1   2/7/05 6:57p dlwin
94# Merge down for release 2005_REFSW_MERGETOMAIN:
95#
96# Irvine_BSEAVSW_Devel/13   9/10/04 9:44a erickson
97# PR12621: use which and dirname to determine TOOLCHAIN_DIR from bottom
98# up
99#
100# Irvine_BSEAVSW_Devel/12   6/24/04 11:40a erickson
101# PR11135: converted backticks to $(shell) command
102#
103# Irvine_BSEAVSW_Devel/11   6/24/04 10:27a erickson
104# PR11135: dynamically determine toolchain path
105#
106# Irvine_BSEAVSW_Devel/10   6/1/04 11:38a erickson
107# PR9447: setting default to uclibc
108#
109# Irvine_BSEAVSW_Devel/9   3/1/04 2:02p erickson
110# PR9447: define TOOLCHAIN_DIR in the tool.mak file
111#
112# Irvine_BSEAVSW_Devel/8   1/30/04 4:39p erickson
113# PR9107: added option for ARCH=i386-linux, this should default
114# CROSS_COMPILE to nothing
115#
116# Irvine_BSEAVSW_Devel/7   1/29/04 6:42p vsilyaev
117# PR 9447: Default arch is mipsel-linux until further notice.
118#
119# Irvine_BSEAVSW_Devel/6   1/27/04 5:56p vsilyaev
120# PR 9497: Added tools for VxWorks
121#
122# Irvine_BSEAVSW_Devel/5   1/23/04 11:17a erickson
123# PR9447: using common tools.mak so that conversion to uclibc is easier
124#
125# Irvine_BSEAVSW_Devel/4   1/22/04 4:32p erickson
126# PR9447: default ARCH to mipsel-uclibc
127#
128# Irvine_BSEAVSW_Devel/3   10/28/03 1:13p erickson
129# convert from g++ to c++
130#
131# Irvine_BSEAVSW_Devel/2   10/9/03 2:34p erickson
132# fixed uclibc support
133#
134#
135###########################################################################
136
137# This make include defines macros for cross-development tools.
138# It is used in a wide range of environments, so don't add anything
139# that doesn't belong here.
140
141# ARCH must indentify the CPU and operating system being compiled for.
142# If you chose a value of ARCH which doesn't uniquely identify this, you
143# will have an unstable or hacked-up build system elsewhere.
144
145# Valid values include:
146#  i386-linux = Intel Linux systems(e.g. unix host compiler)
147#  i386-mingw = host compiler in Windows Mingw environment
148#  mipsel-linux = glibc, little endian Linux on MIPS
149#  mips-linux = glibc, big endian Linux on MIPS
150#  mipsel-uclibc = uclibc (busybox), little endian Linux on MIPS
151#  mips-uclibc = uclibc (busybox), big endian Linux on MIPS
152#  mips-vxworks = vxworks, big endian on MIPS
153
154ifdef B_REFSW_ARCH
155ARCH ?= $(B_REFSW_ARCH)
156endif
157
158# Handle vxworks from either the SYSTEM or ARCH variable.
159ifeq ($(ARCH),mips-vxworks)
160SYSTEM=vxworks
161endif
162
163ifeq ($(SYSTEM),vxworks)
164
165ARCH = mips-vxworks
166CROSS_COMPILE = mips
167CC      = cc${CROSS_COMPILE}
168CXX     = c++${CROSS_COMPILE}
169LD      = ld${CROSS_COMPILE}
170AR      = ar${CROSS_COMPILE}
171NM      = nm${CROSS_COMPILE}
172STRIP   = strip${CROSS_COMPILE}
173OBJCOPY = objcopy${CROSS_COMPILE}
174OBJDUMP = objdump${CROSS_COMPILE}
175RANLIB  = ranlib${CROSS_COMPILE}
176
177# MKDIR must make recursive dirs, and not fail if already existing
178ifeq ($(OSTYPE),linux)
179MKDIR   = mkdir -p
180PWD     = pwd
181MV      = mv
182else
183ifeq ($(vxWorksVersion),6)
184MKDIR   = mkdir -p
185PWD     = pwd
186MV      = mv
187else
188# These are really DOS options:
189MKDIR   = -mkdir
190PWD     = chdir
191MV      = move
192endif
193endif
194
195else
196
197#
198# Default toolchain
199#
200ARCH ?= mipsel-uclibc
201SYSTEM ?= linux
202
203#
204# Set variables based on the toolchain
205#
206ifeq ($(filter ${ARCH}, i386-linux i386-mingw), ${ARCH})
207CROSS_COMPILE ?=
208TOOLCHAIN_DIR=/usr/bin
209else
210ifeq ($(filter ${ARCH}, mips-linux mips-uclibc mips-linux-uclibc), ${ARCH})
211TOOLCHAIN_DIR:=$(shell dirname $(shell dirname $(shell which mips-linux-uclibc-gcc 2>/dev/null) 2>/dev/null))
212CROSS_COMPILE ?= mips-linux-uclibc-
213else
214# Default Little Endian
215#
216TOOLCHAIN_DIR:=$(shell dirname $(shell dirname $(shell which mipsel-linux-uclibc-gcc 2>/dev/null) 2>/dev/null))
217CROSS_COMPILE ?= mipsel-linux-uclibc-
218endif
219endif
220
221# Define make variables
222AS      = $(CROSS_COMPILE)as
223LD      = $(CROSS_COMPILE)ld
224CC      = $(CROSS_COMPILE)gcc
225CXX     = $(CROSS_COMPILE)c++
226AR      = $(CROSS_COMPILE)ar
227NM      = $(CROSS_COMPILE)nm
228STRIP   = $(CROSS_COMPILE)strip
229OBJCOPY = $(CROSS_COMPILE)objcopy
230OBJDUMP = $(CROSS_COMPILE)objdump
231RANLIB  = $(CROSS_COMPILE)ranlib
232MKDIR   = mkdir -p
233PWD     = pwd
234MV      = mv
235
236endif
237
238# These are operations common to all environments.
239CPP     = $(CC) -E
240CP      = cp -f
241RM      = rm -f
242SORT    = sort
243SED     = sed
244TOUCH   = touch
245AWK     = awk
246
247# Define options for quiet builds
248export VERBOSE
249ifneq ($(VERBOSE),)
250Q_:=
251else
252# This was Q_?=@, but that caused vxWorks problems.  VERBOSE=y must be used now to get verbose msgs.
253Q_:=@
254MAKEFLAGS += --no-print-directory
255endif
256
Note: See TracBrowser for help on using the repository browser.