aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/bcm4330/src/Makerules.env
blob: 4d8a82ad61cf3596e27386927c3831406b9abade (plain) (blame)
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
#*******************************************************************************
# $Id: Makerules.env,v 2.34 2009-04-10 04:27:33 Exp $
# Top-level Makerules for defining environment variables
# can be included by anyone doing software at Epigram
#*******************************************************************************

# HOSTOS is either unix or Windows_NT.
# HOSTENV differentiates HOSTOS and is either freebsd, sun4, or Windows_NT.
# This refers to the *BUILD* environment. All environments use "GNU C" 
# except Windows_NT which may use "GNU C" or "Microsoft C".

ifndef	HOSTENV
    # Figure what type of host we are in. 
    UNAME = $(shell uname)

    ifneq ($(findstring "$(UNAME)", "FreeBSD" "NetBSD"), )
	HOSTENV = freebsd
	HOSTOS = unix
    else
	ifneq ($(findstring "$(UNAME)", "sun4" "SunOS"), )
	    HOSTENV = sun4
	    HOSTOS = unix
	else
	    ifeq ($(UNAME), Linux)
		HOSTENV = linux
		HOSTOS = unix
	    else
		ifneq ($(findstring "$(UNAME)", "CYGWIN32_NT" "CYGWIN32/NT" "i386" "CYGWIN_NT-4.0" "CYGWIN_NT-5.0" "CYGWIN_NT-5.1" "CYGWIN_NT-5.2" "i586" "i686"), )
		    HOSTENV = Windows_NT
		    HOSTOS = Windows_NT
		else
		    ifeq ($(UNAME), Darwin)
			HOSTENV = macos
			HOSTOS = unix
		    else	
		    	HOSTENV = unknown
		    	HOSTOS = unknown
		    endif
		endif
	    endif
	endif
    endif
endif
# In case we just defined them, make sure they are known
export HOSTENV
export HOSTOS
	
# TARGETENV is one of freebsd, sun4, linux, linuxarm, android, linuxmips, linuxmips_be, cygwin32, win32, or macos
# TARGETENV defaults to HOSTENV unless HOSTENV is Windows_NT, in
# which case it defaults to win32.

ifndef	TARGETENV
    ifeq ($(HOSTENV), Windows_NT)
	TARGETENV = win32
    else
        TARGETENV = $(HOSTENV)
    endif
endif
export TARGETENV

# TARGETOS defaults to HOSTOS in most cases
ifneq ($(findstring "$(TARGETENV)", "freebsd" "linux" "linuxarm" "linuxarm_le" "android" "linuxmips" "linux26mips" "linuxmips_be" "sun4" "cygwin32" "win32" "macos"), )
    TARGETOS = $(HOSTOS)
endif
ifeq	($(TARGETENV), bcmmips)
    TARGETOS = bcmmips
endif
ifeq	($(TARGETENV), klsi)
    TARGETOS = klsi
endif
ifeq	($(TARGETENV), nucleusarm)
    TARGETOS = nucleus
endif
ifndef TARGETOS
    TARGETOS = unknown
endif
export TARGETOS

# TARGETARCH is the target processor architecture
# Currently valid values are: x86, x86_mmx, sparc, unknown, or a list of any
# of the valid values.
# For the x86* family, a generic x86 is assuemd if not otherwise specified
# Order is important since "linux" matches both linuxmips and linux.
ifndef TARGETARCH
    ifneq ($(findstring "$(TARGETENV)", "android"), )
	TARGETARCH = arm_android
    endif
    ifneq ($(findstring "$(TARGETENV)", "linuxarm_le"), )
	TARGETARCH = arm_le
    endif
    ifneq ($(findstring "$(TARGETENV)", "linuxarm nucleusarm"), )
	TARGETARCH = arm
    endif
    ifneq ($(findstring "$(TARGETENV)", "bcmmips" "linuxmips" "linuxmips_be" "linux26mips"), )
	TARGETARCH = mips
    endif
    ifneq ($(findstring "$(TARGETENV)", "sun4"), )
	TARGETARCH = sparc
    endif
    ifneq ($(findstring "$(TARGETENV)", "freebsd" "linux" "cygwin32" "win32"), )
	TARGETCPU = $(shell uname -m)
	ifneq ($(findstring "$(TARGETCPU)", "sparc" "sparc64"), )
		TARGETARCH = $(TARGETCPU)
	else
		TARGETARCH = x86_mmx
	endif
    endif
    ifeq	($(TARGETENV), macos)
	TARGETCPU = $(shell uname -p)
	ifneq ($(findstring "$(TARGETCPU)", "powerpc"), )
		TARGETARCH = PPC
	else
		TARGETARCH = x86
	endif
    endif
    ifeq	($(TARGETENV), klsi)
	TARGETARCH = klsi
    endif
    ifndef TARGETARCH
	TARGETARCH = unknown
    endif
endif
export TARGETARCH

# TARGET_TYPE is either "all" or one or more of: float64, float32, int16
# default is int16.  "all" will get expanded into a list of all possible types
ifndef  TARGET_TYPE
	TARGET_TYPE = int16
endif
        
ifeq ($(TARGET_TYPE), all)
	TARGET_TYPE = int16 float32 float64
endif
export TARGET_TYPE