Use the rdtscl call only on x86 achitectures
[acx-mac80211.git] / Makefile
blob325128d4290d4491645959e8ff138a050993f8d3
1 # -*-Makefile-*-
2 # Copyright (C) 2008
3 # The ACX100 Open Source Project <acx100-devel@lists.sourceforge.net>
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 as published by
7 # the Free Software Foundation, either version 2 of the License, or
8 # (at your option) any later version.
9 #
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)
32 else
33 # Otherwise we were called directly from the command line: the the kernel build
34 # system must be explicitly invoked.
35 EXTRA_KCONFIG?= \
36 CONFIG_ACX_MAC80211=m \
37 CONFIG_ACX_MAC80211_PCI=y
39 EXTRA_CFLAGS:= \
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
43 PWD := $(shell pwd)
44 all:
45 $(MAKE) -C $(KERNELDIR) M=$(PWD) $(EXTRA_KCONFIG) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" modules
47 install:
48 $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
50 clean:
51 $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
53 help:
54 $(MAKE) -C $(KERNELDIR) M=$(PWD) help
56 .PHONY: modules modules_install clean help
58 endif