1 # This makefile, which has been adapted from http://lwn.net/Kernel/LDD3/, CH02,
2 # allows to compile the driver either inside or outside the kernel tree
3 # without further modifications.
5 # * Inside the kernel tree: simply configure and compile the kernel in the usual
6 # way, making sure that the CONFIG_ACX_MAC80211 option and at least one of the
7 # CONFIG_ACX_MAC80211_PCI or CONFIG_ACX_MAC80211_USB options are set
9 # * Outside the kernel tree: either provide the configuration options mentioned
10 # above on the command line or define them within this makefile. You then simply
11 # have to invoke 'make' and an optional target.
13 # Remove the following two lines once the driver is in the kernel. Alternatively,
14 # they can also be removed if they are specified from the command-line, as in:
16 # export CONFIG_ACX_MAC80211=m && export CONFIG_ACX_MAC80211_PCI=y && make
18 # If you are not actually running the kernel that you are building for, you can
19 # supply a KERNELDIR= option on the command line or set the KERNELDIR
20 # environment variable
22 CONFIG_ACX_MAC80211_PCI
=y
24 # If KERNELRELEASE is defined, we've been invoked from the
25 # kernel build system and can use its language.
26 # First pass, kernel Makefile reads module objects
27 ifneq ($(KERNELRELEASE
),)
28 obj-
$(CONFIG_ACX_MAC80211
) += acx-mac80211.o
29 acx-mac80211-obj-
$(CONFIG_ACX_MAC80211_PCI
) += pci.o
30 acx-mac80211-obj-
$(CONFIG_ACX_MAC80211_USB
) += usb.o
31 acx-mac80211-objs
:= common.o log.o irq.o
$(acx-mac80211-obj-y
)
33 # Otherwise we were called directly from the command
34 # line; invoke the kernel build system.
35 # Second pass, the actual build.
37 KERNELDIR ?
= /lib
/modules
/$(shell uname
-r
)/build
40 $(MAKE
) -C
$(KERNELDIR
) M
=$(PWD
) modules
43 $(MAKE
) -C
$(KERNELDIR
) M
=$(PWD
) clean
46 $(MAKE
) -C
$(KERNELDIR
) M
=$(PWD
) help