OLD | NEW |
(Empty) | |
| 1 #------------------------------------------------------------------------------ |
| 2 # <copyright file="makefile" company="Atheros"> |
| 3 # Copyright (c) 2005-2008 Atheros Corporation. All rights reserved. |
| 4 # |
| 5 # This program is free software; you can redistribute it and/or modify |
| 6 # it under the terms of the GNU General Public License version 2 as |
| 7 # published by the Free Software Foundation; |
| 8 # |
| 9 # Software distributed under the License is distributed on an "AS |
| 10 # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
| 11 # implied. See the License for the specific language governing |
| 12 # rights and limitations under the License. |
| 13 # |
| 14 # |
| 15 #------------------------------------------------------------------------------ |
| 16 #============================================================================== |
| 17 # Author(s): ="Atheros" |
| 18 #============================================================================== |
| 19 |
| 20 # |
| 21 #SDIO HIF makefile for atheros SDIO stack |
| 22 # |
| 23 |
| 24 # Check for SDIO stack |
| 25 ifdef ATH_SDIO_STACK_BASE |
| 26 # Someone already set it on entry, the stack resides outside this tree, we will
try to build it |
| 27 _SDIO_STACK = YES |
| 28 else |
| 29 # Check for SDIO stack within this tree |
| 30 _SDIO_STACK = $(shell if [ -f $(ATH_SRC_BASE)/sdiostack/src/Makefile ]; then ech
o "YES"; else echo "NO"; fi) |
| 31 |
| 32 ifeq ($(_SDIO_STACK), YES) |
| 33 # SDIO stack is part of the kit and will need to be compiled |
| 34 ATH_SDIO_STACK_BASE := $(ATH_SRC_BASE)/sdiostack |
| 35 endif |
| 36 endif |
| 37 |
| 38 |
| 39 ifeq ($(ATH_BUS_SUBTYPE),linux_sdio) |
| 40 _HIF_SUB_TYPE = linux_sdio |
| 41 _SDIO_STACK = NO |
| 42 else |
| 43 _HIF_SUB_TYPE = linux_athsdio |
| 44 endif |
| 45 |
| 46 |
| 47 ifeq ($(_SDIO_STACK), YES) |
| 48 # Pass and translate build variables to the SDIO stack makefile |
| 49 _SDIO_STACK_MAKE_PARAMS := CT_BUILD_TYPE=$(ATH_BUILD_TYPE) \ |
| 50 CT_OS_TYPE=linux \ |
| 51 CT_OS_SUB_TYPE=$(ATH_OS_SUB_TYPE) \ |
| 52 CT_LINUXPATH=$(ATH_LINUXPATH) \ |
| 53 CT_BUILD_TYPE=$(ATH_BUILD_TYPE) \ |
| 54 CT_CROSS_COMPILE_TYPE=$(ATH_CROSS_COMPILE_TYPE) \ |
| 55 CT_ARCH_CPU_TYPE=$(ATH_ARCH_CPU_TYPE) \ |
| 56 CT_HC_DRIVERS=$(ATH_HC_DRIVERS) \ |
| 57 CT_MAKE_INCLUDE_OVERRIDE=$(_LOCALMAKE_INCLUDE) \ |
| 58 CT_BUILD_OUTPUT_OVERRIDE=$(COMPILED_IMAGE_OBJECTS_PAT
H) \ |
| 59 BUS_BUILD=1 |
| 60 endif |
| 61 EXTRA_CFLAGS += -I$(ATH_SRC_BASE)/hif/sdio/$(_HIF_SUB_TYPE)/include |
| 62 EXTRA_CFLAGS += -DSDIO |
| 63 EXTRA_CFLAGS += -I$(ATH_SDIO_STACK_BASE)/src/include |
| 64 |
| 65 ifeq ($(ATH_OS_SUB_TYPE),linux_2_4) |
| 66 obj-y += ../../hif/sdio/linux_athsdio/src/hif.o |
| 67 obj-y += ../../hif/sdio/linux_athsdio/src/hif_scatter.o |
| 68 endif |
| 69 |
| 70 ifneq ($(ATH_OS_SUB_TYPE),linux_2_4) |
| 71 ar6000-objs := ../../hif/sdio/$(_HIF_SUB_TYPE)/src/hif.o \ |
| 72 ../../hif/sdio/$(_HIF_SUB_TYPE)/src/hif_scatter.o |
| 73 |
| 74 |
| 75 endif |
| 76 |
| 77 all: |
| 78 ifeq ($(_SDIO_STACK),YES) |
| 79 $(MAKE) $(_SDIO_STACK_MAKE_PARAMS) -C $(ATH_SDIO_STACK_BASE)/src defaul
t |
| 80 -cp -f $(ATH_SDIO_STACK_BASE)/src/Module.symvers $(COMPILED_IMAGE_OBJECT
S_PATH) |
| 81 endif |
| 82 |
| 83 clean: |
| 84 ifeq ($(_SDIO_STACK),YES) |
| 85 $(MAKE) $(_SDIO_STACK_MAKE_PARAMS) -C $(ATH_SDIO_STACK_BASE)/src clean |
| 86 endif |
OLD | NEW |