3 # The ACX100 Open Source Project <acx100-devel@lists.sourceforge.net>
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # This makefile, allows compiling driver either inside or outside the kernel
19 # tree without further modifications.
21 # Please read the INSTALL file for further information.
23 ifneq ($(KERNELRELEASE
),)
24 # If KERNELRELEASE is defined, we've been invoked from the kernel build system
25 # and can use its language (this variable can only be set only from the top
26 # level Makefile of the source tree). We simply have to declare the modules and
27 # leave the rest to the kernel build system.
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
$(acx-mac80211-obj-y
)
33 # Otherwise we were called directly from the command line: the the kernel build
34 # system must be explicitly invoked.
36 CONFIG_ACX_MAC80211
=m \
37 CONFIG_ACX_MAC80211_PCI
=y
40 $(patsubst CONFIG_
%, -DCONFIG_
%=1, $(patsubst %=m
,%,$(filter %=m
,$(EXTRA_KCONFIG
)))) \
41 $(patsubst CONFIG_
%, -DCONFIG_
%=1, $(patsubst %=y
,%,$(filter %=y
,$(EXTRA_KCONFIG
))))
42 KERNELDIR ?
= /lib
/modules
/$(shell uname
-r
)/build
45 $(MAKE
) -C
$(KERNELDIR
) M
=$(PWD
) $(EXTRA_KCONFIG
) EXTRA_CFLAGS
="$(EXTRA_CFLAGS)" modules
48 $(MAKE
) -C
$(KERNELDIR
) M
=$(PWD
) modules_install
51 $(MAKE
) -C
$(KERNELDIR
) M
=$(PWD
) clean
54 $(MAKE
) -C
$(KERNELDIR
) M
=$(PWD
) help
56 .PHONY
: modules modules_install
clean help