############################################################# # # madwifi-ng # ############################################################# MADWIFI_TRUNK:=r4180-20120502 MADWIFI_SOURCE_URL:=http://snapshots.madwifi-project.org/madwifi-0.9.4 MADWIFI_SOURCE:=madwifi-0.9.4-$(MADWIFI_TRUNK).tar.gz MADWIFI_BUILD_DIR:=$(BUILD_DIR)/madwifi-0.9.4-$(MADWIFI_TRUNK) # # download source # $(DL_DIR)/$(MADWIFI_SOURCE): $(WGET) -P $(DL_DIR) $(MADWIFI_SOURCE_URL)/$(MADWIFI_SOURCE) # # unpack source and potentially patch package; use zcat for gz files # $(MADWIFI_BUILD_DIR)/.unpacked: $(DL_DIR)/$(MADWIFI_SOURCE) zcat $(DL_DIR)/$(MADWIFI_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - # mv $(BUILD_DIR)/madwifi-* $(MADWIFI_BUILD_DIR) # $(SED) -i -e 's#/sbin/depmod -ae -b.*#true ;\\#' $(MADWIFI_BUILD_DIR)/Makefile # $(SED) -i -e 's/sh scripts\/find-mad/echo "r"|sh scripts\/find-mad/g' $(MADWIFI_BUILD_DIR)/Makefile # $(SED) -i -e 's/ "ath%d"/ "eth%d"/g' $(MADWIFI_BUILD_DIR)/ath/if_ath.c touch $@ # # build package # $(MADWIFI_BUILD_DIR)/ath/ath_pci.ko: $(MADWIFI_BUILD_DIR)/.unpacked $(MAKE) -C $(MADWIFI_BUILD_DIR) \ KERNELPATH=$(LINUX_DIR) \ COPTS="$(TARGET_CONFIGURE_CFLAGS) -DATH_PCI -DATH_SUPERG_FF=1 -DATH_SUPERG_DYNTURBO=1 -DATH_TURBO_SCAN=1" \ CC=$(TARGET_CC) \ modules # # install package # $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/drivers/net/ath_pci.ko: $(MADWIFI_BUILD_DIR)/ath/ath_pci.ko $(MAKE) -C $(MADWIFI_BUILD_DIR) \ KERNELPATH=$(LINUX_DIR) \ CC=$(TARGET_CC) \ DESTDIR=$(TARGET_DIR) \ KMODPATH=/lib/modules/$(LINUX_VERSION)/kernel/drivers/net \ install-modules madwifi: $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/drivers/net/ath_pci.ko madwifi-source: $(DL_DIR)/$(MADWIFI_SOURCE) madwifi-clean: -$(MAKE) -C $(MADWIFI_BUILD_DIR) KERNELPATH=$(LINUX_DIR) clean madwifi-dirclean: rm -rf $(MADWIFI_BUILD_DIR)