Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / devs / networks / atheros5000 / hal / linux / makefile
blob829398639b6e3782d0578125c3a70f4e636499e4
2 # Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
3 # Copyright (c) 2002-2008 Atheros Communications, Inc.
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 # $Id$
19 DEPTH= ..
22 # Makefile for building the Atheros/MADWIFI HAL from source code with gmake
24 HAL= ${DEPTH}
25 PUBLIC= ${HAL}/public
26 DEBUG_OPTS=AH_DEBUG=1 AH_ASSERT=1
29 ifdef TARGET
30 ALL= ${TARGET}
31 else
32 ALL= i386-elf \
33 x86_64-elf \
34 alpha-elf \
35 arm-elf \
36 mipsisa32-be-elf mips3-elf mips2-elf mips1-elf \
37 powerpc-eabi powerpc-elf \
38 sh4-elf sparc-elf soc
39 endif
42 all: ${ALL}
44 release:
45 for i in ${ALL}; do \
46 ${MAKE} $$i-release; \
47 done
49 debug:
50 for i in ${ALL}; do \
51 ${MAKE} $$i-debug; \
52 done
54 clean:
55 for i in ${ALL}; do \
56 ${MAKE} $$i-clean; \
57 done
60 # XXX someone with some gmake foo should be able to do this right...
62 i386-elf: ${PUBLIC}/i386-elf.inc
63 ${MAKE} -f Makefile.inc TARGET=i386-elf
64 i386-elf-release:
65 ${MAKE} -f Makefile.inc TARGET=i386-elf release
66 i386-elf-debug:
67 ${MAKE} -f Makefile.inc TARGET=i386-elf ${DEBUG_OPTS} debug
68 i386-elf-clean:
69 ${MAKE} -f Makefile.inc TARGET=i386-elf clean
71 x86_64-elf: ${PUBLIC}/x86_64-elf.inc
72 ${MAKE} -f Makefile.inc TARGET=x86_64-elf
73 x86_64-elf-release:
74 ${MAKE} -f Makefile.inc TARGET=x86_64-elf release
75 x86_64-elf-debug:
76 ${MAKE} -f Makefile.inc TARGET=x86_64-elf ${DEBUG_OPTS} debug
77 x86_64-elf-clean:
78 ${MAKE} -f Makefile.inc TARGET=x86_64-elf clean
80 alpha-elf: ${PUBLIC}/alpha-elf.inc
81 ${MAKE} -f Makefile.inc TARGET=alpha-elf
82 alpha-elf-release:
83 ${MAKE} -f Makefile.inc TARGET=alpha-elf release
84 alpha-elf-debug:
85 ${MAKE} -f Makefile.inc TARGET=alpha-elf ${DEBUG_OPTS} debug
86 alpha-elf-clean:
87 ${MAKE} -f Makefile.inc TARGET=alpha-elf clean
89 arm-elf: armv4-be-elf armv4-le-elf arm9-le-thumb-elf xscale-elf
90 arm-elf-release: armv4-be-elf-release armv4-le-elf-release \
91 arm9-le-thumb-elf-release xscale-elf-release
92 arm-elf-debug: armv4-be-elf-debug armv4-le-elf-debug \
93 arm9-le-thumb-elf-debug xscale-elf-debug
94 arm-elf-clean: armv4-be-elf-clean armv4-le-elf-clean \
95 arm9-le-thumb-elf-clean xscale-elf-clean
97 armv4-be-elf: ${PUBLIC}/armv4-be-elf.inc
98 ${MAKE} -f Makefile.inc TARGET=armv4-be-elf
99 armv4-be-elf-release:
100 ${MAKE} -f Makefile.inc TARGET=armv4-be-elf release
101 armv4-be-elf-debug:
102 ${MAKE} -f Makefile.inc TARGET=armv4-be-elf ${DEBUG_OPTS} debug
103 armv4-be-elf-clean:
104 ${MAKE} -f Makefile.inc TARGET=armv4-be-elf clean
105 armv4-le-elf: ${PUBLIC}/armv4-le-elf.inc
106 ${MAKE} -f Makefile.inc TARGET=armv4-le-elf
107 armv4-le-elf-release:
108 ${MAKE} -f Makefile.inc TARGET=armv4-le-elf release
109 armv4-le-elf-debug:
110 ${MAKE} -f Makefile.inc TARGET=armv4-le-elf ${DEBUG_OPTS} debug
111 armv4-le-elf-clean:
112 ${MAKE} -f Makefile.inc TARGET=armv4-le-elf clean
113 arm9-le-thumb-elf: ${PUBLIC}/arm9-le-thumb-elf.inc
114 ${MAKE} -f Makefile.inc TARGET=arm9-le-thumb-elf
115 arm9-le-thumb-elf-release:
116 ${MAKE} -f Makefile.inc TARGET=arm9-le-thumb-elf release
117 arm9-le-thumb-elf-debug:
118 ${MAKE} -f Makefile.inc TARGET=arm9-le-thumb-elf ${DEBUG_OPTS} debug
119 arm9-le-thumb-elf-clean:
120 ${MAKE} -f Makefile.inc TARGET=arm9-le-thumb-elf clean
122 xscale-elf: xscale-be-elf xscale-le-elf
123 xscale-elf-release: xscale-be-elf-release xscale-le-elf-release
124 xscale-elf-debug: xscale-be-elf-debug xscale-le-elf-debug
125 xscale-elf-clean: xscale-be-elf-clean xscale-le-elf-clean
127 xscale-be-elf: ${PUBLIC}/xscale-be-elf.inc
128 ${MAKE} -f Makefile.inc TARGET=xscale-be-elf
129 xscale-be-elf-release:
130 ${MAKE} -f Makefile.inc TARGET=xscale-be-elf release
131 xscale-be-elf-debug:
132 ${MAKE} -f Makefile.inc TARGET=xscale-be-elf ${DEBUG_OPTS} debug
133 xscale-be-elf-clean:
134 ${MAKE} -f Makefile.inc TARGET=xscale-be-elf clean
135 xscale-le-elf: ${PUBLIC}/xscale-le-elf.inc
136 ${MAKE} -f Makefile.inc TARGET=xscale-le-elf
137 xscale-le-elf-release:
138 ${MAKE} -f Makefile.inc TARGET=xscale-le-elf release
139 xscale-le-elf-debug:
140 ${MAKE} -f Makefile.inc TARGET=xscale-le-elf ${DEBUG_OPTS} debug
141 xscale-le-elf-clean:
142 ${MAKE} -f Makefile.inc TARGET=xscale-le-elf clean
144 mipsisa32-be-elf: mips3-be-elf
145 mipsisa32-be-elf-release: mips3-be-elf-release
146 mipsisa32-be-elf-debug: mips3-be-elf-debug
147 mipsisa32-be-elf-clean: mips3-be-elf-clean
149 mips3-elf: mips3-be-elf mips3-le-elf
150 mips3-elf-release: mips3-be-elf-release mips3-le-elf-release
151 mips3-elf-debug: mips3-be-elf-debug mips3-le-elf-debug
152 mips3-elf-clean: mips3-be-elf-clean mips3-le-elf-clean
154 # NB: the .inc file naming is historical and needs changing
155 mips3-be-elf: ${PUBLIC}/mipsisa32-be-elf.inc
156 ${MAKE} -f Makefile.inc TARGET=mipsisa32-be-elf
157 mips3-be-elf-release:
158 ${MAKE} -f Makefile.inc TARGET=mipsisa32-be-elf release
159 mips3-be-elf-debug:
160 ${MAKE} -f Makefile.inc TARGET=mipsisa32-be-elf ${DEBUG_OPTS} debug
161 mips3-be-elf-clean:
162 ${MAKE} -f Makefile.inc TARGET=mipsisa32-be-elf clean
164 mips3-le-elf: ${PUBLIC}/mipsisa32-le-elf.inc
165 ${MAKE} -f Makefile.inc TARGET=mipsisa32-le-elf
166 mips3-le-elf-release:
167 ${MAKE} -f Makefile.inc TARGET=mipsisa32-le-elf release
168 mips3-le-elf-debug:
169 ${MAKE} -f Makefile.inc TARGET=mipsisa32-le-elf ${DEBUG_OPTS} debug
170 mips3-le-elf-clean:
171 ${MAKE} -f Makefile.inc TARGET=mipsisa32-le-elf clean
173 # NB: the .inc file naming is historical and needs changing
174 mips2-elf: mips2-be-elf mips2-le-elf
175 mips2-elf-release: mips2-be-elf-release mips2-le-elf-release
176 mips2-elf-debug: mips2-be-elf-debug mips2-le-elf-debug
177 mips2-elf-clean: mips2-be-elf-clean mips2-le-elf-clean
179 mips2-be-elf: ${PUBLIC}/mips-be-elf.inc
180 ${MAKE} -f Makefile.inc TARGET=mips-be-elf
181 mips2-be-elf-release:
182 ${MAKE} -f Makefile.inc TARGET=mips-be-elf release
183 mips2-be-elf-debug:
184 ${MAKE} -f Makefile.inc TARGET=mips-be-elf ${DEBUG_OPTS} debug
185 mips2-be-elf-clean:
186 ${MAKE} -f Makefile.inc TARGET=mips-be-elf clean
188 mips2-le-elf: ${PUBLIC}/mips-le-elf.inc
189 ${MAKE} -f Makefile.inc TARGET=mips-le-elf
190 mips2-le-elf-release:
191 ${MAKE} -f Makefile.inc TARGET=mips-le-elf release
192 mips2-le-elf-debug:
193 ${MAKE} -f Makefile.inc TARGET=mips-le-elf ${DEBUG_OPTS} debug
194 mips2-le-elf-clean:
195 ${MAKE} -f Makefile.inc TARGET=mips-le-elf clean
197 mips1-elf: mips1-be-elf mips1-le-elf
198 mips1-elf-release: mips1-be-elf-release mips1-le-elf-release
199 mips1-elf-debug: mips1-be-elf-debug mips1-le-elf-debug
200 mips1-elf-clean: mips1-be-elf-clean mips1-le-elf-clean
202 mips1-be-elf: ${PUBLIC}/mips1-be-elf.inc
203 ${MAKE} -f Makefile.inc TARGET=mips1-be-elf
204 mips1-be-elf-release:
205 ${MAKE} -f Makefile.inc TARGET=mips1-be-elf release
206 mips1-be-elf-debug:
207 ${MAKE} -f Makefile.inc TARGET=mips1-be-elf ${DEBUG_OPTS} debug
208 mips1-be-elf-clean:
209 ${MAKE} -f Makefile.inc TARGET=mips1-be-elf clean
211 mips1-le-elf: ${PUBLIC}/mips1-le-elf.inc
212 ${MAKE} -f Makefile.inc TARGET=mips1-le-elf
213 mips1-le-elf-release:
214 ${MAKE} -f Makefile.inc TARGET=mips1-le-elf release
215 mips1-le-elf-debug:
216 ${MAKE} -f Makefile.inc TARGET=mips1-le-elf ${DEBUG_OPTS} debug
217 mips1-le-elf-clean:
218 ${MAKE} -f Makefile.inc TARGET=mips1-le-elf clean
220 powerpc-eabi: powerpc-be-eabi powerpc-le-eabi
221 powerpc-eabi-release: powerpc-be-eabi-release powerpc-le-eabi-release
222 powerpc-eabi-debug: powerpc-be-eabi-debug powerpc-le-eabi-debug
223 powerpc-eabi-clean: powerpc-be-eabi-clean powerpc-le-eabi-clean
225 powerpc-be-eabi: ${PUBLIC}/powerpc-be-eabi.inc
226 ${MAKE} -f Makefile.inc TARGET=powerpc-be-eabi
227 powerpc-be-eabi-release:
228 ${MAKE} -f Makefile.inc TARGET=powerpc-be-eabi release
229 powerpc-be-eabi-debug:
230 ${MAKE} -f Makefile.inc TARGET=powerpc-be-eabi ${DEBUG_OPTS} debug
231 powerpc-be-eabi-clean:
232 ${MAKE} -f Makefile.inc TARGET=powerpc-be-eabi clean
233 powerpc-le-eabi: ${PUBLIC}/powerpc-le-eabi.inc
234 ${MAKE} -f Makefile.inc TARGET=powerpc-le-eabi
235 powerpc-le-eabi-release:
236 ${MAKE} -f Makefile.inc TARGET=powerpc-le-eabi release
237 powerpc-le-eabi-debug:
238 ${MAKE} -f Makefile.inc TARGET=powerpc-le-eabi ${DEBUG_OPTS} debug
239 powerpc-le-eabi-clean:
240 ${MAKE} -f Makefile.inc TARGET=powerpc-le-eabi clean
242 powerpc-elf: powerpc-be-elf
243 powerpc-elf-release: powerpc-be-elf-release
244 powerpc-elf-debug: powerpc-be-elf-debug
245 powerpc-elf-clean: powerpc-be-elf-clean
247 powerpc-be-elf: ${PUBLIC}/powerpc-be-elf.inc
248 ${MAKE} -f Makefile.inc TARGET=powerpc-be-elf
249 powerpc-be-elf-release:
250 ${MAKE} -f Makefile.inc TARGET=powerpc-be-elf release
251 powerpc-be-elf-debug:
252 ${MAKE} -f Makefile.inc TARGET=powerpc-be-elf ${DEBUG_OPTS} debug
253 powerpc-be-elf-clean:
254 ${MAKE} -f Makefile.inc TARGET=powerpc-be-elf clean
256 sh4-elf: sh4-le-elf
257 sh4-elf-release: sh4-le-elf-release
258 sh4-elf-debug: sh4-le-elf-debug
259 sh4-elf-clean: sh4-le-elf-clean
261 sh4-le-elf: ${PUBLIC}/sh4-le-elf.inc
262 ${MAKE} -f Makefile.inc TARGET=sh4-le-elf
263 sh4-le-elf-release:
264 ${MAKE} -f Makefile.inc TARGET=sh4-le-elf release
265 sh4-le-elf-debug:
266 ${MAKE} -f Makefile.inc TARGET=sh4-le-elf ${DEBUG_OPTS} debug
267 sh4-le-elf-clean:
268 ${MAKE} -f Makefile.inc TARGET=sh4-le-elf clean
270 sparc-elf: sparc64-be-elf sparc-be-elf
271 sparc-elf-release: sparc64-be-elf-release sparc-be-elf-release
272 sparc-elf-debug: sparc64-be-elf-debug sparc-be-elf-debug
273 sparc-elf-clean: sparc64-be-elf-clean sparc-be-elf-clean
275 sparc64-be-elf: ${PUBLIC}/sparc64-be-elf.inc
276 ${MAKE} -f Makefile.inc TARGET=sparc64-be-elf
277 sparc64-be-elf-release:
278 ${MAKE} -f Makefile.inc TARGET=sparc64-be-elf release
279 sparc64-be-elf-debug:
280 ${MAKE} -f Makefile.inc TARGET=sparc64-be-elf ${DEBUG_OPTS} debug
281 sparc64-be-elf-clean:
282 ${MAKE} -f Makefile.inc TARGET=sparc64-be-elf clean
284 sparc-be-elf: ${PUBLIC}/sparc-be-elf.inc
285 ${MAKE} -f Makefile.inc TARGET=sparc-be-elf
286 sparc-be-elf-release:
287 ${MAKE} -f Makefile.inc TARGET=sparc-be-elf release
288 sparc-be-elf-debug:
289 ${MAKE} -f Makefile.inc TARGET=sparc-be-elf ${DEBUG_OPTS} debug
290 sparc-be-elf-clean:
291 ${MAKE} -f Makefile.inc TARGET=sparc-be-elf clean
294 # SoC builds
296 # Use the ap43 build for an ap48 board
298 soc: ap30 ap43 ap51 ap61 wisoc
299 soc-release: ap30-release ap43-release ap51-release ap61-release wisoc-release
300 soc-debug: ap30-debug ap43-debug ap51-debug ap61-debug wisoc-debug
301 soc-clean: ap30-clean ap43-clean ap51-clean ap61-clean wisoc-clean
303 ap30: ${PUBLIC}/ap30.inc
304 ${MAKE} -f Makefile.inc TARGET=ap30 \
305 AH_SUPPORT_AR5312=1 AH_NEED_DESC_SWAP=1
306 ap30-release: ${PUBLIC}/ap30.inc
307 ${MAKE} -f Makefile.inc TARGET=ap30 \
308 AH_SUPPORT_AR5312=1 AH_NEED_DESC_SWAP=1 release
309 ap30-debug: ${PUBLIC}/ap30.inc
310 ${MAKE} -f Makefile.inc TARGET=ap30 \
311 AH_SUPPORT_AR5312=1 AH_NEED_DESC_SWAP=1 ${DEBUG_OPTS} debug
312 ap30-clean:
313 ${MAKE} -f Makefile.inc TARGET=ap30 clean
315 ap43: ${PUBLIC}/ap43.inc
316 ${MAKE} -f Makefile.inc TARGET=ap43 AH_SUPPORT_AR5312=1
317 ap43-release: ${PUBLIC}/ap43.inc
318 ${MAKE} -f Makefile.inc TARGET=ap43 AH_SUPPORT_AR5312=1 release
319 ap43-debug: ${PUBLIC}/ap43.inc
320 ${MAKE} -f Makefile.inc TARGET=ap43 AH_SUPPORT_AR5312=1 ${DEBUG_OPTS} debug
321 ap43-clean:
322 ${MAKE} -f Makefile.inc TARGET=ap43 clean
324 ap51: ${PUBLIC}/ap51.inc
325 ${MAKE} -f Makefile.inc TARGET=ap51 \
326 AH_SUPPORT_2316=1 AH_SUPPORT_5111=0 AH_SUPPORT_5112=0 \
327 AH_SUPPORT_AR5312=1 AH_NEED_DESC_SWAP=1
328 ap51-release: ${PUBLIC}/ap51.inc
329 ${MAKE} -f Makefile.inc TARGET=ap51 \
330 AH_SUPPORT_2316=1 AH_SUPPORT_5111=0 AH_SUPPORT_5112=0 \
331 AH_SUPPORT_AR5312=1 AH_NEED_DESC_SWAP=1 release
332 ap51-debug: ${PUBLIC}/ap51.inc
333 ${MAKE} -f Makefile.inc TARGET=ap51 \
334 AH_SUPPORT_2316=1 AH_SUPPORT_5111=0 AH_SUPPORT_5112=0 \
335 AH_SUPPORT_AR5312=1 AH_NEED_DESC_SWAP=1 ${DEBUG_OPTS} debug
336 ap51-clean:
337 ${MAKE} -f Makefile.inc TARGET=ap51 clean
339 ap61: ${PUBLIC}/ap61.inc
340 ${MAKE} -f Makefile.inc TARGET=ap61 \
341 AH_SUPPORT_2317=1 AH_SUPPORT_5111=0 AH_SUPPORT_5112=0 \
342 AH_SUPPORT_AR5312=1
343 ap61-release: ${PUBLIC}/ap61.inc
344 ${MAKE} -f Makefile.inc TARGET=ap61 \
345 AH_SUPPORT_2317=1 AH_SUPPORT_5111=0 AH_SUPPORT_5112=0 \
346 AH_SUPPORT_AR5312=1 release
347 ap61-debug: ${PUBLIC}/ap61.inc
348 ${MAKE} -f Makefile.inc TARGET=ap61 \
349 AH_SUPPORT_2317=1 AH_SUPPORT_5111=0 AH_SUPPORT_5112=0 \
350 AH_SUPPORT_AR5312=1 ${DEBUG_OPTS} debug
351 ap61-clean:
352 ${MAKE} -f Makefile.inc TARGET=ap61 clean
354 wisoc: ${PUBLIC}/wisoc.inc
355 ${MAKE} -f Makefile.inc TARGET=wisoc \
356 AH_SUPPORT_2316=1 \
357 AH_SUPPORT_2317=1 \
358 AH_NEED_DESC_SWAP=1 \
359 AH_SUPPORT_AR5312=1
360 wisoc-release: ${PUBLIC}/wisoc.inc
361 ${MAKE} -f Makefile.inc TARGET=wisoc \
362 AH_SUPPORT_2316=1 \
363 AH_SUPPORT_2317=1 \
364 AH_NEED_DESC_SWAP=1 \
365 AH_SUPPORT_AR5312=1 release
366 wisoc-debug: ${PUBLIC}/wisoc.inc
367 ${MAKE} -f Makefile.inc TARGET=wisoc \
368 AH_SUPPORT_2316=1 \
369 AH_SUPPORT_2317=1 \
370 AH_NEED_DESC_SWAP=1 \
371 AH_SUPPORT_AR5312=1 ${DEBUG_OPTS} debug
372 wisoc-clean:
373 ${MAKE} -f Makefile.inc TARGET=wisoc clean