aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/bcm43xx/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/bcm43xx/Makefile')
-rw-r--r--drivers/net/wireless/bcm43xx/Makefile87
1 files changed, 87 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcm43xx/Makefile b/drivers/net/wireless/bcm43xx/Makefile
new file mode 100644
index 000000000000..98d4efb1d12a
--- /dev/null
+++ b/drivers/net/wireless/bcm43xx/Makefile
@@ -0,0 +1,87 @@
1# Makefile for bcm43xx driver
2
3VERSION := 0.0.1
4RELEASE_NAME := bcm43xx-$(VERSION)
5
6# Optional path, where the SoftMAC subsystem is located.
7# You may set SOFTMAC_DIR in your bashrc, for example.
8SOFTMAC_DIR ?=
9
10KVER := $(shell uname -r)
11KDIR ?= /lib/modules/$(KVER)/build
12PWD := $(shell pwd)
13MODPATH := $(DESTDIR)/lib/modules/$(KVER)/kernel/drivers/net/bcm43xx
14
15# Comment/uncomment to enable/disable debugging
16DEBUG = y
17
18
19ifeq ($(DEBUG),y)
20DEBUGFS_OBJ = bcm43xx_debugfs.o
21CFLAGS += -O2 -DCONFIG_BCM43XX_DEBUG
22else
23DEBUGFS_OBJ =
24CFLAGS += -O2
25endif
26
27CFLAGS += -DBCM43xx_VERSION=$(VERSION) -I/lib/modules/$(KVER)/include
28ifneq ($(SOFTMAC_DIR),)
29CPPFLAGS := -I$(SOFTMAC_DIR) $(CPPFLAGS)
30endif
31
32ifneq ($(KERNELRELEASE),)
33# call from kernel build system
34
35obj-m := bcm43xx.o
36bcm43xx-objs := bcm43xx_main.o bcm43xx_dma.o $(DEBUGFS_OBJ) \
37 bcm43xx_radio.o bcm43xx_phy.o \
38 bcm43xx_power.o bcm43xx_wx.o \
39 bcm43xx_pio.o bcm43xx_ilt.o \
40 bcm43xx_leds.o
41
42else
43
44default: modules
45
46modules:
47 $(MAKE) -C $(KDIR) M=$(PWD) modules
48
49install: bcm43xx.ko
50 install -d $(MODPATH)
51 install -m 644 -c bcm43xx.ko $(MODPATH)
52 /sbin/depmod -a
53
54uninstall:
55 rm -rf $(MODPATH)
56 /sbin/depmod -a
57
58endif
59
60clean:
61 find . \( -name '*.ko' -o -name '*.o' -o -name '.tmp_versions' -o -name '*~' -o -name '.*.cmd' \
62 -o -name '*.mod.c' -o -name '*.tar.bz2' -o -name '*.rej' -o -name '*.orig' \)\
63 -print | xargs rm -Rf
64
65depend .depend dep:
66 $(CC) $(CFLAGS) -M *.c > .depend
67
68ifeq (.depend,$(wildcard .depend))
69include .depend
70endif
71
72DISTFILES = $(shell find . \( -not -name '.' \) -print | grep -v "\.tar\.bz2" | grep -v "\/\." )
73DISTDIR = $(RELEASE_NAME)
74
75release: clean
76 @rm -rf $(DISTDIR)
77 @mkdir $(DISTDIR)
78 @chmod 777 $(DISTDIR)
79 @for file in $(DISTFILES); do \
80 if test -d $$file; then \
81 mkdir $(DISTDIR)/$$file; \
82 else \
83 cp -p $$file $(DISTDIR)/$$file; \
84 fi; \
85 done
86 @tar -c $(DISTDIR) | bzip2 -9 > $(RELEASE_NAME).tar.bz2
87 @rm -rf $(DISTDIR)