-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile.vxworks-bmw
256 lines (224 loc) · 7.85 KB
/
Makefile.vxworks-bmw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# $Id: Makefile.vxworks-bmw 1.24.174.1 Broadcom SDK $
# $Copyright: Copyright 2011 Broadcom Corporation.
# This program is the proprietary software of Broadcom Corporation
# and/or its licensors, and may only be used, duplicated, modified
# or distributed pursuant to the terms and conditions of a separate,
# written license agreement executed between you and Broadcom
# (an "Authorized License"). Except as set forth in an Authorized
# License, Broadcom grants no license (express or implied), right
# to use, or waiver of any kind with respect to the Software, and
# Broadcom expressly reserves all rights in and to the Software
# and all intellectual property rights therein. IF YOU HAVE
# NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS SOFTWARE
# IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
# ALL USE OF THE SOFTWARE.
#
# Except as expressly set forth in the Authorized License,
#
# 1. This program, including its structure, sequence and organization,
# constitutes the valuable trade secrets of Broadcom, and you shall use
# all reasonable efforts to protect the confidentiality thereof,
# and to use this information only in connection with your use of
# Broadcom integrated circuit products.
#
# 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS
# PROVIDED "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
# REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
# OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY
# DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
# NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
# ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
# CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING
# OUT OF USE OR PERFORMANCE OF THE SOFTWARE.
#
# 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL
# BROADCOM OR ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL,
# INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER
# ARISING OUT OF OR IN ANY WAY RELATING TO YOUR USE OF OR INABILITY
# TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF
# THE AMOUNT ACTUALLY PAID FOR THE SOFTWARE ITSELF OR USD 1.00,
# WHICHEVER IS GREATER. THESE LIMITATIONS SHALL APPLY NOTWITHSTANDING
# ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.$
#
# Makefile for MPC8240 host running VxWorks
include ${SDK}/make/Makefile.vxworks-common
# WIND_BASE and WIND_HOST_TYPE must be modified according to your
# installed location. The environment variables are ignored intentionally.
ifndef VX_VERSION
VX_VERSION = 55
endif
ifeq ($(HOSTTYPE),Windows2000PC)
else
ifeq ($(HOSTTYPE),Windows_Cygnus)
WIND_BASE ?= //fs-sj1-21/Projects-V2/ntsw-tools/wrs/tms_201
WIND_HOST_TYPE ?= x86-win32
else
WIND_BASE_531 = /net/igor/export/home/tornado/ppc
WIND_BASE_54 = /projects/ntsw-tools/wrs/tornado/t2
WIND_BASE_55 = /projects/ntsw-tools/wrs/tornado/t2.2.1
ifeq ($(VX_VERSION),62)
ifeq ($(HOSTTYPE),i386-linux)
WIND_HOME ?= /tools/windriver/vxworks/6.2/Linux
else
WIND_HOME ?= /tools/windriver/vxworks/6.2/SunOS
endif
WIND_GNU_PATH = $(WIND_HOME)/gnu/3.3.2-vxworks-6.2
WIND_DIAB_PATH = $(WIND_HOME)/diab/5.3.1.0
WIND_BASE_62 = $(WIND_HOME)/vxworks-6.2
endif
WIND_BASE ?= ${WIND_BASE_${VX_VERSION}}
ifeq ($(HOSTTYPE),i386-linux)
ifeq ($(VX_VERSION),62)
WIND_HOST_TYPE ?= x86-linux2
else
WIND_HOST_TYPE ?= x86-linux
endif
endif
ifeq ($(HOSTTYPE),NetBSD)
#compat
ifeq ($(VX_VERSION),62)
WIND_HOST_TYPE ?= x86-linux2
else
WIND_HOST_TYPE ?= x86-linux
endif
endif
ifeq ($(HOSTTYPE),sun4)
WIND_HOST_TYPE ?= sun4-solaris2
endif
#default
ifeq ($(HOSTTYPE),)
WIND_HOST_TYPE ?= sun4-solaris2
endif
endif
endif
CPU = PPC603
TOOL = gnu
ifdef ALT_BMW_BSP_DIR
VX_SRC = \
${ALT_BMW_BSP_DIR}
else
VX_SRC = \
${SDK}/systems/vxworks/bmw/mpc824x
endif
VX_SRC_ALL = \
$(VX_SRC)/all
# Extra libraries for this platform
ifeq ($(VX_VERSION),55)
COND_LIB_BSP = $(VX_SRC)/tffs/libTFFS55.a
else
ifeq ($(VX_VERSION),54)
COND_LIB_BSP = $(VX_SRC)/tffs/libTFFS54.a
else
ifeq ($(VX_VERSION),62)
else
COND_LIB_BSP = $(VX_SRC)/tffs/libTFFS.a
endif
endif
endif
# Configuration Flags
CFGFLAGS += -DBCM_PLATFORM_STRING=\"BMW_MPC8245\"
# fast pci access
CFGFLAGS+= -DSOC_CM_MEMORY_BASE=bcm_bde_soc_cm_memory_base \
-DEXTERN_SOC_CM_MEMORY_BASE=bcm_bde_soc_cm_memory_base \
-DSOC_CM_MEMORY_OFFSET=0x00010000
# Use FTP2 for VxWorks 5.5
ifeq ($(VX_VERSION),55)
CFLAGS += -DUSE_FTP2
endif
ifeq ($(VX_VERSION),62)
toolbase = $(WIND_GNU_PATH)/$(WIND_HOST_TYPE)/bin/
toolbase_alt = $(WIND_BASE)/../workbench-2.4/$(WIND_HOST_TYPE)/bin/
export GCC_EXEC_PREFIX=$(WIND_HOME)/gnu/3.3.2-vxworks-6.2/$(WIND_HOST_TYPE)/lib/gcc-lib/
else
ifeq ($(VX_VERSION),65)
WIND_GNU_PATH = $(WIND_HOME)/gnu/3.4.4-vxworks-6.5
toolbase = $(WIND_GNU_PATH)/$(WIND_HOST_TYPE)/bin/
toolbase_alt = $(WIND_GNU_PATH)/$(WIND_HOST_TYPE)/bin/
else
toolbase = $(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/
toolbase_alt = $(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/
#
# Set GCC prefix and PATH to find what it needs, and export them to subshells
# etc.
#
export GCC_EXEC_PREFIX=$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/
endif
endif
CC = $(toolbase)ccppc
CPP = $(toolbase)cppppc
CXX = $(toolbase)g++ppc
RANLIB = $(toolbase)ranlibppc
AR = $(toolbase)arppc
LD = $(toolbase)ldppc
NM = $(toolbase_alt)nmppc
SIZE = $(toolbase_alt)sizeppc
STRIP = $(toolbase_alt)stripppc
OPTFLAGS_DEFAULT = -O2
MFLAGS = $(OPTFLAGS) -DCPU=$(CPU)
ARFLAGS = -rc
# TARGETTYPE Defines: This defines the type of system you are compiling
# the driver for; there are several values allowed. New values can be created
# by porting the routines (system.c) to your platform and adding
# the define in this Makefile.
TARGETTYPE = BMW
# OSType Defines: This defines the type of RTOS or microkernel which you
# are compiling the SAL (and its associated driver) for. New platforms
# can be created by porting the routines (system.c) to your platform and
# adding the define in this Makefile.
OSTYPE = VXWORKS
INCS += -I$(VX_SRC) -I${VX_SRC_ALL} -I$(WIND_BASE)/target/h
ifeq ($(VX_VERSION),62)
INCS += -I$(WIND_BASE)/target/h/wrn/coreip
endif
LIBS =
#
# STD_{C|CPP|CXX}FLAGS - Standard flags used by ALL compilations
# BCM_{C|CPP|CXX}FLAGS - Flags used for Broadcom source files
# OPT_{C|CPP|CXX}FLAGS - Defined in local make files BEFORE inclusion of
# this Makefile, to define local "Extra" flags.
#
# We include -DTRUE=1 to fix a Tornado 1 problem where stdarg macros are
# defined incorrectly if TRUE is not defined ahead of including stdarg.h.
# NOTE: Extra -I${INCDIR} puts $SDK/include before system incs, for assert.h
#
ifeq ($(HOSTTYPE),Windows2000PC)
STD_CFLAGS = -fno-builtin -nostdlib $(MFLAGS) \
-I${INCDIR} ${INCS} -D${TARGETTYPE} -D${OSTYPE} \
-DVX_VERSION=${VX_VERSION} -DBROADCOM_BSP \
${CFGFLAGS} -DTRUE=1 -DBE_HOST=1
STD_CPPFLAGS = ${STD_CFLAGS}
STD_CXXFLAGS = ${STD_CFLAGS}
else
ifeq ($(VX_VERSION),55)
STD_CFLAGS = -fno-builtin -nostdlib $(MFLAGS) \
-I${INCDIR} ${INCS} -D${TARGETTYPE} -D${OSTYPE} \
-DVX_VERSION=${VX_VERSION} -DBROADCOM_BSP \
${CFGFLAGS} -DTRUE=1 -DBE_HOST=1
STD_CPPFLAGS = ${STD_CFLAGS}
STD_CXXFLAGS = ${STD_CFLAGS}
else
ifeq ($(VX_VERSION),62)
STD_CFLAGS = -fno-builtin -nostdlib -fno-strict-aliasing $(MFLAGS) \
-I${INCDIR} ${INCS} -D${TARGETTYPE} -D${OSTYPE} \
-DVX_VERSION=${VX_VERSION} -DBROADCOM_BSP \
${CFGFLAGS} -DTRUE=1 -DBE_HOST=1
STD_CPPFLAGS = ${STD_CFLAGS}
STD_CXXFLAGS = ${STD_CFLAGS}
else
ifeq ($(VX_VERSION),65)
STD_CFLAGS = -fno-builtin $(MFLAGS) \
-I${INCDIR} ${INCS} -D${TARGETTYPE} -D${OSTYPE} \
-DVX_VERSION=${VX_VERSION} -DBROADCOM_BSP \
${CFGFLAGS} -DTRUE=1 -DBE_HOST=1 -DVXWORKS_NETWORK_STACK_6_5
else
STD_CFLAGS = -fno-builtin -nostdinc $(MFLAGS) \
-I${INCDIR} ${INCS} -D${TARGETTYPE} -D${OSTYPE} \
-DVX_VERSION=${VX_VERSION} -DBROADCOM_BSP \
${CFGFLAGS} -DTRUE=1 -DBE_HOST=1
STD_CPPFLAGS = ${STD_CFLAGS}
STD_CXXFLAGS = ${STD_CFLAGS}
endif
endif
endif
endif