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.
23 # Makefile for building the Atheros/MADWIFI HAL from source code on AmigaOS.
25 # This file is intended to be called by the Makefile in the hal
26 # directory with HALTARGET set to the desired target platform.
28 # There is support for multiple "generations" of Atheros hardware devices:
30 # AH_SUPPORT_AR5210 802.11a only MAC
31 # AH_SUPPORT_AR5211 802.11a+802.11b MAC (also pure g, but not yet supported)
32 # AH_SUPPORT_AR5212 802.11a+802.11b+802.11g MAC
33 # AH_SUPPORT_AR5312 5212 MAC WiSoC (requires AH_SUPPORT_AR5212)
34 # AH_SUPPORT_AR5416 802.11a+802.11g+802.11n MAC (requires AH_SUPPORT_5212)
35 # AH_SUPPORT_AR9160 802.11a+802.11g+802.11n MAC (requires AH_SUPPORT_5416)
37 # AH_SUPPORT_2133 2133 RF support for 5416
38 # AH_SUPPORT_2316 2316 RF (Cobra) support for 5212 et. al.
39 # AH_SUPPORT_2317 2317 RF (Spyder) support for 5212 et. al.
40 # AH_SUPPORT_2413 2413 RF support for 5212 et. al.
41 # AH_SUPPORT_2417 2425 RF (Nala) support for 5212 et. al.
42 # AH_SUPPORT_2425 2425 RF (Swan) support for 5212 et. al.
43 # AH_SUPPORT_5111 5111 RF support for 5212 et. al.
44 # AH_SUPPORT_5112 5112 RF support for 5212 et. al.
45 # AH_SUPPORT_5413 5413 RF support for 5212 et. al.
47 # and numerous optional debugging facilities (typically named AH_DEBUG_*):
49 # AH_DEBUG enables debugging stuff that's controlled by the sysctl:
51 # AH_ASSERT enables assertions that panic or trap into the debugger.
52 # AH_DEBUG_ALQ enables support for tracing register reads+writes
54 # AH_DEBUG_COUNTRY accept the CTR_DEBUG country code (for debugging
55 # the regulatory domain support)
56 # AH_REGOPS_FUNC arrange for OS_REG_READ and OS_REG_WRITE to be function
57 # calls and not inline expanded to memory references
58 # AH_ENABLE_AP_SUPPORT enables AP-specific support not publicly available
59 # (e.g. don't cap turbo power limits)
60 # AH_DISABLE_WME disable HAL_TXQ_USE_LOCKOUT_BKOFF_DIS support
62 # AH_PRIVATE_DIAG enable private diagnostic support
63 # AH_WRITE_EEPROM permit EEPROM writes (use with AH_PRIVATE_DIAG)
64 # AH_WRITE_REGDOMAIN permit EEPROM writes of the regulatory domain through
65 # ah_setRegulatoryDomain (implies AH_WRITE_EEPROM)
71 AH_SUPPORT_AR5210?=1 # 5210 support
72 AH_SUPPORT_AR5211?=1 # 5211 support
73 AH_SUPPORT_AR5212?=1 # 5212 support
74 AH_SUPPORT_AR5312?=0 # 5312 support
75 AH_SUPPORT_AR5416?=1 # 5416 support
76 AH_SUPPORT_AR9160?=0 # 9160 support
77 AH_SUPPORT_2316?=0 # 2316 RF support
78 AH_SUPPORT_2317?=0 # 2317 RF support
79 AH_SUPPORT_2133?=0 # 2133 RF support
80 AH_SUPPORT_2413?=1 # 2413 RF support
81 AH_SUPPORT_2417?=1 # 2417 RF support
82 AH_SUPPORT_2425?=1 # 2425 RF support
83 AH_SUPPORT_5111?=1 # 5111 RF support
84 AH_SUPPORT_5112?=1 # 5112 RF support
85 AH_SUPPORT_5413?=1 # 5413 RF support
87 AH_EEPROM_V3?=0 # v3+ EEPROM support
88 AH_EEPROM_V14?=0 # v14+ EEPROM support
90 AH_DEBUG?=0 # debugging (e.g. hw.ath.hal.debug)
91 AH_ASSERT?=0 # assertions (pretty lame)
92 AH_DEBUG_ALQ?=0 # ALQ register tracing support
93 AH_REGOPS_FUNC?=0 # use inline memory references
94 AH_WRITE_REGDOMAIN?=0 # support EEPROM writes of the regulatory domain
95 AH_DEBUG_COUNTRY?=0 # accept CTR_DEBUG country code
96 AH_DISABLE_WME?=0 # disable HAL_TXQ_USE_LOCKOUT_BKOFF_DIS
97 AH_ENABLE_AP_SUPPORT?=0 # enable AP-specific support
98 AH_WRITE_EEPROM?=0 # support EEPROM writes
99 AH_PRIVATE_DIAG?=0 # non-public diagnostic support
100 AH_NEED_DESC_SWAP?=0 # Need to swap TX descriptor
101 AH_ENABLE_FORCEBIAS?=0 # 2133 orientation sensitivity
104 # If 5312 support is enabled it's certain we're not going
105 # to use the 5210, 5211, or 5416 support so disable them.
107 ifeq ($(strip ${AH_SUPPORT_AR5312}),1)
116 AH_SUPPORT_AR5212=1 # force 5212 support
120 # 5211 and 5212 require v3 EEPROM support; do it here
121 # before we enable 5212 to support 5416 (this way we don't
122 # pull in v3 support as a side effect).
124 ifeq ($(strip ${AH_SUPPORT_AR5212}),1)
127 ifeq ($(strip ${AH_SUPPORT_AR5211}),1)
132 # If 9160 support is enabled force 5416 on also.
134 ifeq ($(strip ${AH_SUPPORT_AR9160}),1)
139 # If 5416 support is enabled force 5212 on also.
141 ifeq ($(strip ${AH_SUPPORT_AR5416}),1)
146 # 5416 support presently =>'s 2133 and force bias support;
147 # do those automatically (but separately from 5212 for now).
149 ifeq ($(strip ${AH_SUPPORT_AR5416}),1)
151 AH_ENABLE_FORCEBIAS=1
156 # 2417 support presently requires 2425 support
158 ifeq ($(strip ${AH_SUPPORT_2417}),1)
163 # Basic build components.
165 #OBJDIR= obj/${HALTARGET}
167 WARNFLAGS=-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
168 -Wmissing-prototypes -Wcast-qual -std=c99
169 # NB: can't do this until we fix register r/w macros
170 WARNFLAGS_NOTYET=-Wpointer-arith
171 COPTS= -Werror -g -O ${WARNFLAGS}
172 INCS= -I${OBJDIR} -I. -I..
173 CLEANFILES= ${OBJDIR}/.depend
175 #include ${PUBLIC}/${HALTARGET}.inc
177 USER_CFLAGS += ${INCS} ${COPTS}
179 HAL_SRCS=${HAL}/ah.c ${HAL}/ah_regdomain.c
180 HAL_OBJS=${OBJDIR}/ah.o ${OBJDIR}/ah_regdomain.o
182 ifeq ($(strip ${AH_EEPROM_V3}),1)
183 HAL_SRCS+=${HAL}/ah_eeprom_v3.c
184 HAL_OBJS+=${OBJDIR}/ah_eeprom_v3.o
187 ifeq ($(strip ${AH_EEPROM_V14}),1)
188 HAL_SRCS+=${HAL}/ah_eeprom_v14.c
189 HAL_OBJS+=${OBJDIR}/ah_eeprom_v14.o
192 ifeq ($(strip ${AH_SUPPORT_AR5210}),1)
193 AR5210= ${HAL}/ar5210
194 HAL_SRCS+=${AR5210}/ar5210_attach.c ${AR5210}/ar5210_beacon.c \
195 ${AR5210}/ar5210_interrupts.c ${AR5210}/ar5210_keycache.c \
196 ${AR5210}/ar5210_misc.c ${AR5210}/ar5210_power.c \
197 ${AR5210}/ar5210_phy.c ${AR5210}/ar5210_recv.c \
198 ${AR5210}/ar5210_reset.c ${AR5210}/ar5210_xmit.c
199 HAL_OBJS+=${OBJDIR}/ar5210_attach.o ${OBJDIR}/ar5210_beacon.o \
200 ${OBJDIR}/ar5210_interrupts.o ${OBJDIR}/ar5210_keycache.o \
201 ${OBJDIR}/ar5210_misc.o ${OBJDIR}/ar5210_power.o \
202 ${OBJDIR}/ar5210_phy.o ${OBJDIR}/ar5210_recv.o \
203 ${OBJDIR}/ar5210_reset.o ${OBJDIR}/ar5210_xmit.o
206 ifeq ($(strip ${AH_SUPPORT_AR5211}),1)
207 AR5211= ${HAL}/ar5211
208 HAL_SRCS+=${AR5211}/ar5211_attach.c ${AR5211}/ar5211_beacon.c \
209 ${AR5211}/ar5211_interrupts.c ${AR5211}/ar5211_keycache.c \
210 ${AR5211}/ar5211_misc.c ${AR5211}/ar5211_power.c \
211 ${AR5211}/ar5211_phy.c ${AR5211}/ar5211_recv.c \
212 ${AR5211}/ar5211_reset.c ${AR5211}/ar5211_xmit.c
213 HAL_OBJS+=${OBJDIR}/ar5211_attach.o ${OBJDIR}/ar5211_beacon.o \
214 ${OBJDIR}/ar5211_interrupts.o ${OBJDIR}/ar5211_keycache.o \
215 ${OBJDIR}/ar5211_misc.o ${OBJDIR}/ar5211_power.o \
216 ${OBJDIR}/ar5211_phy.o ${OBJDIR}/ar5211_recv.o \
217 ${OBJDIR}/ar5211_reset.o ${OBJDIR}/ar5211_xmit.o
220 ifeq ($(strip ${AH_SUPPORT_AR5212}),1)
221 AR5212= ${HAL}/ar5212
222 HAL_SRCS+=${AR5212}/ar5212_attach.c ${AR5212}/ar5212_beacon.c \
223 ${AR5212}/ar5212_eeprom.c ${AR5212}/ar5212_gpio.c \
224 ${AR5212}/ar5212_interrupts.c ${AR5212}/ar5212_keycache.c \
225 ${AR5212}/ar5212_misc.c ${AR5212}/ar5212_power.c \
226 ${AR5212}/ar5212_phy.c ${AR5212}/ar5212_recv.c \
227 ${AR5212}/ar5212_reset.c ${AR5212}/ar5212_xmit.c \
228 ${AR5212}/ar5212_ani.c
229 HAL_OBJS+=${OBJDIR}/ar5212_attach.o ${OBJDIR}/ar5212_beacon.o \
230 ${OBJDIR}/ar5212_eeprom.o ${OBJDIR}/ar5212_gpio.o \
231 ${OBJDIR}/ar5212_interrupts.o ${OBJDIR}/ar5212_keycache.o \
232 ${OBJDIR}/ar5212_misc.o ${OBJDIR}/ar5212_power.o \
233 ${OBJDIR}/ar5212_phy.o ${OBJDIR}/ar5212_recv.o \
234 ${OBJDIR}/ar5212_reset.o ${OBJDIR}/ar5212_xmit.o \
235 ${OBJDIR}/ar5212_ani.o
238 ifeq ($(strip ${AH_SUPPORT_AR5312}),1)
239 AR5312= ${HAL}/ar5312
240 HAL_SRCS+=${AR5312}/ar5312_attach.c ${AR5312}/ar5312_interrupts.c \
241 ${AR5312}/ar5312_eeprom.c \
242 ${AR5312}/ar5312_gpio.c ${AR5312}/ar5315_gpio.c \
243 ${AR5312}/ar5312_misc.c ${AR5312}/ar5312_power.c \
244 ${AR5312}/ar5312_reset.c
245 HAL_OBJS+=${OBJDIR}/ar5312_attach.o ${OBJDIR}/ar5312_interrupts.o \
246 ${OBJDIR}/ar5312_eeprom.o \
247 ${OBJDIR}/ar5312_gpio.o ${OBJDIR}/ar5315_gpio.o \
248 ${OBJDIR}/ar5312_misc.o ${OBJDIR}/ar5312_power.o \
249 ${OBJDIR}/ar5312_reset.o
252 ifeq ($(strip ${AH_SUPPORT_AR5416}),1)
253 AR5416= ${HAL}/ar5416
254 HAL_SRCS+=${AR5416}/ar5416_attach.c ${AR5416}/ar5416_beacon.c \
255 ${AR5416}/ar5416_eeprom.c ${AR5416}/ar5416_gpio.c \
256 ${AR5416}/ar5416_interrupts.c ${AR5416}/ar5416_keycache.c \
257 ${AR5416}/ar5416_misc.c ${AR5416}/ar5416_power.c \
258 ${AR5416}/ar5416_phy.c ${AR5416}/ar5416_recv.c \
259 ${AR5416}/ar5416_reset.c ${AR5416}/ar5416_xmit.c
260 HAL_OBJS+=${OBJDIR}/ar5416_attach.o ${OBJDIR}/ar5416_beacon.o \
261 ${OBJDIR}/ar5416_eeprom.o ${OBJDIR}/ar5416_gpio.o \
262 ${OBJDIR}/ar5416_interrupts.o ${OBJDIR}/ar5416_keycache.o \
263 ${OBJDIR}/ar5416_misc.o ${OBJDIR}/ar5416_power.o \
264 ${OBJDIR}/ar5416_phy.o ${OBJDIR}/ar5416_recv.o \
265 ${OBJDIR}/ar5416_reset.o ${OBJDIR}/ar5416_xmit.o
268 ifeq ($(strip ${AH_SUPPORT_AR9160}),1)
269 HAL_SRCS+=${AR5416}/ar9160_attach.c
270 HAL_OBJS+=${OBJDIR}/ar9160_attach.o
273 ifeq ($(strip ${AH_SUPPORT_2316}),1)
274 HAL_SRCS+=${AR5212}/ar2316.c
275 HAL_OBJS+=${OBJDIR}/ar2316.o
278 ifeq ($(strip ${AH_SUPPORT_2317}),1)
279 HAL_SRCS+=${AR5212}/ar2317.c
280 HAL_OBJS+=${OBJDIR}/ar2317.o
283 ifeq ($(strip ${AH_SUPPORT_2133}),1)
284 HAL_SRCS+=${AR5416}/ar2133.c
285 HAL_OBJS+=${OBJDIR}/ar2133.o
288 ifeq ($(strip ${AH_SUPPORT_2413}),1)
289 HAL_SRCS+=${AR5212}/ar2413.c
290 HAL_OBJS+=${OBJDIR}/ar2413.o
293 ifeq ($(strip ${AH_SUPPORT_2425}),1)
294 HAL_SRCS+=${AR5212}/ar2425.c
295 HAL_OBJS+=${OBJDIR}/ar2425.o
298 ifeq ($(strip ${AH_SUPPORT_5111}),1)
299 HAL_SRCS+=${AR5212}/ar5111.c
300 HAL_OBJS+=${OBJDIR}/ar5111.o
303 ifeq ($(strip ${AH_SUPPORT_5112}),1)
304 HAL_SRCS+=${AR5212}/ar5112.c
305 HAL_OBJS+=${OBJDIR}/ar5112.o
308 ifeq ($(strip ${AH_SUPPORT_5413}),1)
309 HAL_SRCS+=${AR5212}/ar5413.c
310 HAL_OBJS+=${OBJDIR}/ar5413.o
314 CLEANFILES+= ${OBJDIR}/opt_ah.h ${HAL_OBJS}
317 # NB: These are typically overridden in the target-specific specification.
321 # These are specific to the host doing the build.
331 # ARM binaries need their ELF header patched so they are marked
332 # as using "virtual floating point"; otherwise the resulting .o
333 # files will generate linker errors because they are marked as
334 # using hardware floating point.
336 ifneq (,$(findstring arm-elf,${TOOLPREFIX}))
337 ${OBJDIR}/hal.o: ${HAL_OBJS} Makefile wackelf
338 ${LD} -o $@ -r ${LDOPTS} ${HAL_OBJS}
341 # NB: use host tools; not cross-compilation tools
342 wackelf: ${PUBLIC}/wackelf.c
343 cc -o wackelf ${PUBLIC}/wackelf.c
347 ${OBJDIR}/hal.o: ${HAL_OBJS} Makefile
348 ${LD} -o $@ -r ${LDOPTS} ${HAL_OBJS}
351 release: ${OBJDIR}/hal.o
352 rm -f ${PUBLIC}/${HALTARGET}.hal.o.uu
353 (${SED} -e '1,/^$$/d' ${HAL}/COPYRIGHT; \
354 ${SED} -n -e '/ATH_HAL_VERSION/p' ${HAL}/version.h; \
355 ${UUENCODE} ${OBJDIR}/hal.o hal.o) > ${PUBLIC}/${HALTARGET}.hal.o.uu
356 cmp -s ${OBJDIR}/opt_ah.h ${PUBLIC}/${HALTARGET}.opt_ah.h || \
357 cp ${OBJDIR}/opt_ah.h ${PUBLIC}/${HALTARGET}.opt_ah.h
359 debug: ${OBJDIR}/hal.o
360 rm -f ${DEBUG}/${HALTARGET}.hal.o.uu
361 (${SED} -e '1,/^$$/d' ${HAL}/COPYRIGHT; \
362 ${SED} -n -e '/ATH_HAL_VERSION/p' ${HAL}/version.h; \
363 ${UUENCODE} ${OBJDIR}/hal.o hal.o) > ${DEBUG}/${HALTARGET}.hal.o.uu
364 cmp -s ${OBJDIR}/opt_ah.h ${DEBUG}/${HALTARGET}.opt_ah.h || \
365 cp ${OBJDIR}/opt_ah.h ${DEBUG}/${HALTARGET}.opt_ah.h
369 ${OBJDIR}/ah.o: ${HAL}/ah.c
370 ${CC} -c -o $@ ${CFLAGS} $<
371 ${OBJDIR}/ah_eeprom_v3.o: ${HAL}/ah_eeprom_v3.c
372 ${CC} -c -o $@ ${CFLAGS} $<
373 ${OBJDIR}/ah_eeprom_v14.o: ${HAL}/ah_eeprom_v14.c
374 ${CC} -c -o $@ ${CFLAGS} $<
375 ${OBJDIR}/ah_regdomain.o: ${HAL}/ah_regdomain.c
376 ${CC} -c -o $@ ${CFLAGS} $<
378 ${OBJDIR}/ar5210_attach.o: ${AR5210}/ar5210_attach.c
379 ${CC} -c -o $@ ${CFLAGS} $<
380 ${OBJDIR}/ar5210_beacon.o: ${AR5210}/ar5210_beacon.c
381 ${CC} -c -o $@ ${CFLAGS} $<
382 ${OBJDIR}/ar5210_interrupts.o: ${AR5210}/ar5210_interrupts.c
383 ${CC} -c -o $@ ${CFLAGS} $<
384 ${OBJDIR}/ar5210_keycache.o: ${AR5210}/ar5210_keycache.c
385 ${CC} -c -o $@ ${CFLAGS} $<
386 ${OBJDIR}/ar5210_misc.o: ${AR5210}/ar5210_misc.c
387 ${CC} -c -o $@ ${CFLAGS} $<
388 ${OBJDIR}/ar5210_power.o: ${AR5210}/ar5210_power.c
389 ${CC} -c -o $@ ${CFLAGS} $<
390 ${OBJDIR}/ar5210_phy.o: ${AR5210}/ar5210_phy.c
391 ${CC} -c -o $@ ${CFLAGS} $<
392 ${OBJDIR}/ar5210_recv.o: ${AR5210}/ar5210_recv.c
393 ${CC} -c -o $@ ${CFLAGS} $<
394 ${OBJDIR}/ar5210_reset.o: ${AR5210}/ar5210_reset.c
395 ${CC} -c -o $@ ${CFLAGS} $<
396 ${OBJDIR}/ar5210_xmit.o: ${AR5210}/ar5210_xmit.c
397 ${CC} -c -o $@ ${CFLAGS} $<
399 ${OBJDIR}/ar5211_attach.o: ${AR5211}/ar5211_attach.c
400 ${CC} -c -o $@ ${CFLAGS} $<
401 ${OBJDIR}/ar5211_beacon.o: ${AR5211}/ar5211_beacon.c
402 ${CC} -c -o $@ ${CFLAGS} $<
403 ${OBJDIR}/ar5211_interrupts.o: ${AR5211}/ar5211_interrupts.c
404 ${CC} -c -o $@ ${CFLAGS} $<
405 ${OBJDIR}/ar5211_keycache.o: ${AR5211}/ar5211_keycache.c
406 ${CC} -c -o $@ ${CFLAGS} $<
407 ${OBJDIR}/ar5211_misc.o: ${AR5211}/ar5211_misc.c
408 ${CC} -c -o $@ ${CFLAGS} $<
409 ${OBJDIR}/ar5211_power.o: ${AR5211}/ar5211_power.c
410 ${CC} -c -o $@ ${CFLAGS} $<
411 ${OBJDIR}/ar5211_phy.o: ${AR5211}/ar5211_phy.c
412 ${CC} -c -o $@ ${CFLAGS} $<
413 ${OBJDIR}/ar5211_recv.o: ${AR5211}/ar5211_recv.c
414 ${CC} -c -o $@ ${CFLAGS} $<
415 ${OBJDIR}/ar5211_reset.o: ${AR5211}/ar5211_reset.c
416 ${CC} -c -o $@ ${CFLAGS} $<
417 ${OBJDIR}/ar5211_xmit.o: ${AR5211}/ar5211_xmit.c
418 ${CC} -c -o $@ ${CFLAGS} $<
420 ${OBJDIR}/ar5212_ani.o: ${AR5212}/ar5212_ani.c
421 ${CC} -c -o $@ ${CFLAGS} $<
422 ${OBJDIR}/ar5212_attach.o: ${AR5212}/ar5212_attach.c
423 ${CC} -c -o $@ ${CFLAGS} $<
424 ${OBJDIR}/ar5212_beacon.o: ${AR5212}/ar5212_beacon.c
425 ${CC} -c -o $@ ${CFLAGS} $<
426 ${OBJDIR}/ar5212_eeprom.o: ${AR5212}/ar5212_eeprom.c
427 ${CC} -c -o $@ ${CFLAGS} $<
428 ${OBJDIR}/ar5212_gpio.o: ${AR5212}/ar5212_gpio.c
429 ${CC} -c -o $@ ${CFLAGS} $<
430 ${OBJDIR}/ar5212_interrupts.o: ${AR5212}/ar5212_interrupts.c
431 ${CC} -c -o $@ ${CFLAGS} $<
432 ${OBJDIR}/ar5212_keycache.o: ${AR5212}/ar5212_keycache.c
433 ${CC} -c -o $@ ${CFLAGS} $<
434 ${OBJDIR}/ar5212_misc.o: ${AR5212}/ar5212_misc.c
435 ${CC} -c -o $@ ${CFLAGS} $<
436 ${OBJDIR}/ar5212_power.o: ${AR5212}/ar5212_power.c
437 ${CC} -c -o $@ ${CFLAGS} $<
438 ${OBJDIR}/ar5212_phy.o: ${AR5212}/ar5212_phy.c
439 ${CC} -c -o $@ ${CFLAGS} $<
440 ${OBJDIR}/ar5212_recv.o: ${AR5212}/ar5212_recv.c
441 ${CC} -c -o $@ ${CFLAGS} $<
442 ${OBJDIR}/ar5212_reset.o: ${AR5212}/ar5212_reset.c
443 ${CC} -c -o $@ ${CFLAGS} $<
444 ${OBJDIR}/ar5212_xmit.o: ${AR5212}/ar5212_xmit.c
445 ${CC} -c -o $@ ${CFLAGS} $<
447 ${OBJDIR}/ar5312_attach.o: ${AR5312}/ar5312_attach.c
448 ${CC} -c -o $@ ${CFLAGS} $<
449 ${OBJDIR}/ar5312_eeprom.o: ${AR5312}/ar5312_eeprom.c
450 ${CC} -c -o $@ ${CFLAGS} $<
451 ${OBJDIR}/ar5312_gpio.o: ${AR5312}/ar5312_gpio.c
452 ${CC} -c -o $@ ${CFLAGS} $<
453 ${OBJDIR}/ar5315_gpio.o: ${AR5312}/ar5315_gpio.c
454 ${CC} -c -o $@ ${CFLAGS} $<
455 ${OBJDIR}/ar5312_interrupts.o: ${AR5312}/ar5312_interrupts.c
456 ${CC} -c -o $@ ${CFLAGS} $<
457 ${OBJDIR}/ar5312_misc.o: ${AR5312}/ar5312_misc.c
458 ${CC} -c -o $@ ${CFLAGS} $<
459 ${OBJDIR}/ar5312_power.o: ${AR5312}/ar5312_power.c
460 ${CC} -c -o $@ ${CFLAGS} $<
461 ${OBJDIR}/ar5312_reset.o: ${AR5312}/ar5312_reset.c
462 ${CC} -c -o $@ ${CFLAGS} $<
464 ${OBJDIR}/ar2316.o: ${AR5212}/ar2316.c
465 ${CC} -c -o $@ ${CFLAGS} $<
466 ${OBJDIR}/ar2317.o: ${AR5212}/ar2317.c
467 ${CC} -c -o $@ ${CFLAGS} $<
468 ${OBJDIR}/ar2413.o: ${AR5212}/ar2413.c
469 ${CC} -c -o $@ ${CFLAGS} $<
470 ${OBJDIR}/ar2425.o: ${AR5212}/ar2425.c
471 ${CC} -c -o $@ ${CFLAGS} $<
472 ${OBJDIR}/ar5111.o: ${AR5212}/ar5111.c
473 ${CC} -c -o $@ ${CFLAGS} $<
474 ${OBJDIR}/ar5112.o: ${AR5212}/ar5112.c
475 ${CC} -c -o $@ ${CFLAGS} $<
476 ${OBJDIR}/ar5413.o: ${AR5212}/ar5413.c
477 ${CC} -c -o $@ ${CFLAGS} $<
479 ${OBJDIR}/ar5416_attach.o: ${AR5416}/ar5416_attach.c
480 ${CC} -c -o $@ ${CFLAGS} $<
481 ${OBJDIR}/ar5416_beacon.o: ${AR5416}/ar5416_beacon.c
482 ${CC} -c -o $@ ${CFLAGS} $<
483 ${OBJDIR}/ar5416_eeprom.o: ${AR5416}/ar5416_eeprom.c
484 ${CC} -c -o $@ ${CFLAGS} $<
485 ${OBJDIR}/ar5416_gpio.o: ${AR5416}/ar5416_gpio.c
486 ${CC} -c -o $@ ${CFLAGS} $<
487 ${OBJDIR}/ar5416_interrupts.o: ${AR5416}/ar5416_interrupts.c
488 ${CC} -c -o $@ ${CFLAGS} $<
489 ${OBJDIR}/ar5416_keycache.o: ${AR5416}/ar5416_keycache.c
490 ${CC} -c -o $@ ${CFLAGS} $<
491 ${OBJDIR}/ar5416_misc.o: ${AR5416}/ar5416_misc.c
492 ${CC} -c -o $@ ${CFLAGS} $<
493 ${OBJDIR}/ar5416_power.o: ${AR5416}/ar5416_power.c
494 ${CC} -c -o $@ ${CFLAGS} $<
495 ${OBJDIR}/ar5416_phy.o: ${AR5416}/ar5416_phy.c
496 ${CC} -c -o $@ ${CFLAGS} $<
497 ${OBJDIR}/ar5416_recv.o: ${AR5416}/ar5416_recv.c
498 ${CC} -c -o $@ ${CFLAGS} $<
499 ${OBJDIR}/ar5416_reset.o: ${AR5416}/ar5416_reset.c
500 ${CC} -c -o $@ ${CFLAGS} $<
501 ${OBJDIR}/ar5416_xmit.o: ${AR5416}/ar5416_xmit.c
502 ${CC} -c -o $@ ${CFLAGS} $<
504 ${OBJDIR}/ar9160_attach.o: ${AR5416}/ar9160_attach.c
505 ${CC} -c -o $@ ${CFLAGS} $<
507 ${OBJDIR}/ar2133.o: ${AR5416}/ar2133.c
508 ${CC} -c -o $@ ${CFLAGS} $<
511 test -d ${OBJDIR} || mkdir -p ${OBJDIR}
512 ifeq ($(strip ${AH_SUPPORT_AR5210}),1)
513 echo "#define AH_SUPPORT_AR5210 1" >> ${OBJDIR}/opt_ah.h
515 ifeq ($(strip ${AH_SUPPORT_AR5211}),1)
516 echo "#define AH_SUPPORT_AR5211 1" >> ${OBJDIR}/opt_ah.h
518 ifeq ($(strip ${AH_SUPPORT_AR5212}),1)
519 echo "#define AH_SUPPORT_AR5212 1" >> ${OBJDIR}/opt_ah.h
521 ifeq ($(strip ${AH_SUPPORT_AR5312}),1)
522 echo "#define AH_SUPPORT_AR5312 1" >> ${OBJDIR}/opt_ah.h
524 ifeq ($(strip ${AH_SUPPORT_AR5416}),1)
525 echo "#define AH_SUPPORT_AR5416 1" >> ${OBJDIR}/opt_ah.h
527 ifeq ($(strip ${AH_SUPPORT_AR9160}),1)
528 echo "#define AH_SUPPORT_AR9160 1" >> ${OBJDIR}/opt_ah.h
530 ifeq ($(strip ${AH_SUPPORT_2316}),1)
531 echo "#define AH_SUPPORT_2316 1" >> ${OBJDIR}/opt_ah.h
533 ifeq ($(strip ${AH_SUPPORT_2317}),1)
534 echo "#define AH_SUPPORT_2317 1" >> ${OBJDIR}/opt_ah.h
536 ifeq ($(strip ${AH_SUPPORT_2133}),1)
537 echo "#define AH_SUPPORT_2133 1" >> ${OBJDIR}/opt_ah.h
539 ifeq ($(strip ${AH_SUPPORT_2413}),1)
540 echo "#define AH_SUPPORT_2413 1" >> ${OBJDIR}/opt_ah.h
542 ifeq ($(strip ${AH_SUPPORT_2417}),1)
543 echo "#define AH_SUPPORT_2417 1" >> ${OBJDIR}/opt_ah.h
545 ifeq ($(strip ${AH_SUPPORT_2425}),1)
546 echo "#define AH_SUPPORT_2425 1" >> ${OBJDIR}/opt_ah.h
548 ifeq ($(strip ${AH_SUPPORT_5111}),1)
549 echo "#define AH_SUPPORT_5111 1" >> ${OBJDIR}/opt_ah.h
551 ifeq ($(strip ${AH_SUPPORT_5112}),1)
552 echo "#define AH_SUPPORT_5112 1" >> ${OBJDIR}/opt_ah.h
554 ifeq ($(strip ${AH_SUPPORT_5413}),1)
555 echo "#define AH_SUPPORT_5413 1" >> ${OBJDIR}/opt_ah.h
557 ifeq ($(strip ${AH_ASSERT}),1)
558 echo "#define AH_ASSERT 1" >> ${OBJDIR}/opt_ah.h
560 ifeq ($(strip ${AH_DEBUG_ALQ}),1)
561 echo "#define AH_DEBUG_ALQ 1" >> ${OBJDIR}/opt_ah.h
563 ifeq ($(strip ${AH_DEBUG}),1)
564 echo "#define AH_DEBUG 1" >> ${OBJDIR}/opt_ah.h
566 ifeq ($(strip ${AH_WRITE_REGDOMAIN}),1)
567 echo "#define AH_SUPPORT_WRITE_REGDOMAIN 1" >>${OBJDIR}/opt_ah.h
568 echo "#define AH_SUPPORT_WRITE_EEPROM 1">>${OBJDIR}/opt_ah.h
570 ifeq ($(strip ${AH_WRITE_EEPROM}),1)
571 echo "#define AH_SUPPORT_WRITE_EEPROM 1">>${OBJDIR}/opt_ah.h
574 ifeq ($(strip ${AH_DEBUG_COUNTRY}),1)
575 echo "#define AH_DEBUG_COUNTRY 1" >>${OBJDIR}/opt_ah.h
577 ifeq ($(strip ${AH_REGOPS_FUNC}),1)
578 echo "#define AH_REGOPS_FUNC 1" >>${OBJDIR}/opt_ah.h
580 ifeq ($(strip ${AH_DISABLE_WME}),1)
581 echo "#define AH_DISABLE_WME 1" >>${OBJDIR}/opt_ah.h
583 ifeq ($(strip ${AH_ENABLE_AP_SUPPORT}),1)
584 echo "#define AH_ENABLE_AP_SUPPORT 1" >>${OBJDIR}/opt_ah.h
586 ifeq ($(strip ${AH_PRIVATE_DIAG}),1)
587 echo "#define AH_PRIVATE_DIAG 1" >>${OBJDIR}/opt_ah.h
589 ifeq ($(strip ${AH_NEED_DESC_SWAP}),1)
590 echo "#define AH_NEED_DESC_SWAP 1" >>${OBJDIR}/opt_ah.h
592 ifeq ($(strip ${AH_ENABLE_FORCEBIAS}),1)
593 echo "#define AH_ENABLE_FORCEBIAS 1" >>${OBJDIR}/opt_ah.h
596 endif # AH_AROS_BUILD
599 # rm -f ${ALL} ${OBJS} ${CLEANFILES}
600 # -rmdir -p ${OBJDIR}
602 #depend: beforedepend .depend afterdepend
603 #${OBJDIR}/.depend: ${SRCS} ${OBJDIR}/opt_ah.h
604 # rm -f ${OBJDIR}/.depend
605 # ${CC} -M ${CFLAGS} ${SRCS} | \
606 # ${SED} 's,\(.*\)\.o:,${OBJDIR}/\1.o:,g' > ${OBJDIR}/.depend
608 #-include ${OBJDIR}/.depend