Add lots of .PHONY to Makefiles and remove a duplicate rule definition
[madwifi/.git] / net80211 / Makefile
index 5147019d15bb359995fbd0303977c7a1b570f9d9..efdd84a3fba503beee04884d7e2810a6eab79fa1 100644 (file)
 #
 # Makefile for the 802.11 WLAN modules.
 #
-ifeq ($(obj),)
-obj=   .
-endif
-
+obj := $(firstword $(obj) $(SUBDIRS) .)
 TOP = $(obj)/..
 #
-# There are two authenticator mechanisms: an in-kernel implementation
-# (wlan_auth+wlan_radius) and an external implementation (wlan_xauth) that
-# requires a user process to manage the authentication process.  By default
-# the external authenticator is used.  ieee80211_proto.c has a table of module
-# names that defines the default module to auto-load for each authentication
-# scheme; to get the in-kernel authenticator by default modify it to load
-# wlan_auth instead of wlan_xauth or manually load wlan_auth prior to use.
-# 
+# There is one authenticator mechanism: an in-kernel implementation
+# (wlan_xauth). 
+#
 MOD_AUTH       := wlan_xauth.o
 #
 # Scanning policy is split into modules.  The default policy modules
@@ -68,6 +60,7 @@ MOD_INSTALL   := wlan.o wlan_wep.o wlan_tkip.o wlan_ccmp.o wlan_acl.o \
 obj-m          += $(MOD_INSTALL)
 
 wlan-objs      := if_media.o \
+                  ieee80211_skb.o \
                   ieee80211.o ieee80211_beacon.o ieee80211_crypto.o \
                   ieee80211_crypto_none.o ieee80211_input.o ieee80211_node.o \
                   ieee80211_output.o ieee80211_power.o ieee80211_proto.o \
@@ -89,6 +82,7 @@ EXTRA_CFLAGS+=$(INCS) $(COPTS) -DOPT_AH_H=\"public/$(TARGET).opt_ah.h\"
 
 -include $(TOPDIR)/Rules.make
 
+.PHONY: all
 all:
        $(MAKE) -C $(KERNELPATH) SUBDIRS=$(shell pwd) modules
 
@@ -109,13 +103,15 @@ wlan_xauth.o:     $(wlan_xauth-objs)
 wlan_acl.o:    $(wlan_acl-objs)
        $(LD) $(LDOPTS) -o wlan_acl.$(KMODSUF) -r $(wlan_acl-objs)
 
+.PHONY: install
 install:
        test -d $(DESTDIR)/$(KMODPATH) || mkdir -p $(DESTDIR)/$(KMODPATH)
        for i in $(MOD_INSTALL); do \
                f=`basename $$i .o`; \
-               install $$f.$(KMODSUF) $(DESTDIR)/$(KMODPATH); \
+               install -m 0644  $$f.$(KMODSUF) $(DESTDIR)/$(KMODPATH); \
        done
 
+.PHONY: clean
 clean:
        -rm -f *~ *.o *.ko *.mod.c
        -rm -f .depend .version .*.o.flags .*.o.d .*.o.cmd .*.ko.cmd