ar7: remove unneeded packed and array initialization
[openwrt.git] / package / rt2x00 / src / Makefile
index dd32cf6..3aeb405 100644 (file)
@@ -41,16 +41,16 @@ endif
 #
 # Determine if and with what options the rt2x00 drivers should be build
 #
-rt2x00lib-objs := rt2x00dev.o rt2x00mac.o
+rt2x00lib-objs := rt2x00dev.o rt2x00mac.o rt2x00config.o rt2x00firmware.o
 
 ifeq ($(CONFIG_RT2X00),y)
        obj-m += rt2x00lib.o
 
-ifneq ($(CONFIG_PCI),)
+ifeq ($(CONFIG_RT2X00PCI),y)
        obj-m += rt2x00pci.o
 endif
 
-ifneq ($(CONFIG_USB),)
+ifeq ($(CONFIG_RT2X00USB),y)
        obj-m += rt2x00usb.o
 endif
 
@@ -62,7 +62,7 @@ ifeq ($(CONFIG_RT2400PCI),y)
        obj-m += rt2400pci.o
 ifeq ($(CONFIG_RT2400PCI_RFKILL),y)
        rt2x00lib-objs += rt2x00rfkill.o
-       CFLAGS += -DCONFIG_RT2X00_LIB_RFKILL
+       EXTRA_CFLAGS += -DCONFIG_RT2X00_LIB_RFKILL
 endif
 endif
 
@@ -70,7 +70,7 @@ ifeq ($(CONFIG_RT2500PCI),y)
        obj-m += rt2500pci.o
 ifeq ($(CONFIG_RT2500PCI_RFKILL),y)
        rt2x00lib-objs += rt2x00rfkill.o
-       CFLAGS += -DCONFIG_RT2X00_LIB_RFKILL
+       EXTRA_CFLAGS += -DCONFIG_RT2X00_LIB_RFKILL
 endif
 endif
 
@@ -79,17 +79,17 @@ ifeq ($(CONFIG_RT2500USB),y)
 endif
 
 ifeq ($(CONFIG_RT61PCI),y)
-       CFLAGS += -DCONFIG_RT2X00_LIB_FIRMWARE
+       EXTRA_CFLAGS += -DCONFIG_RT2X00_LIB_FIRMWARE
        rt2x00lib-objs += rt2x00firmware.o
        obj-m += rt61pci.o
 ifeq ($(CONFIG_RT61PCI_RFKILL),y)
        rt2x00lib-objs += rt2x00rfkill.o
-       CFLAGS += -DCONFIG_RT2X00_LIB_RFKILL
+       EXTRA_CFLAGS += -DCONFIG_RT2X00_LIB_RFKILL
 endif
 endif
 
 ifeq ($(CONFIG_RT73USB),y)
-       CFLAGS += -DCONFIG_RT2X00_LIB_FIRMWARE
+       EXTRA_CFLAGS += -DCONFIG_RT2X00_LIB_FIRMWARE
        rt2x00lib-objs += rt2x00firmware.o
        obj-m += rt73usb.o
 endif
@@ -97,6 +97,7 @@ endif
 endif
 
 MAKEFLAGS += --no-print-directory
+EXTRA_CFLAGS := -include $(SUBDIRS)/rt2x00_compat.h $(CFLAGS)
 
 all: default