############################################################# # # rt2500 # ############################################################# rt2500_VER:=cvs-daily rt2500_SOURCE_URL:=http://$(SF_DL_HOST)/project/rt2400/Final%20software%20release/rt2500-legacy-final-cvs rt2500_SOURCE:=rt2500-$(rt2500_VER).tar.gz rt2500_BUILD_DIR:=$(BUILD_DIR)/rt2500-$(rt2500_VER) # # download source # $(DL_DIR)/$(rt2500_SOURCE)/.fetched: $(WGET) -P $(DL_DIR) $(rt2500_SOURCE_URL)/$(rt2500_SOURCE) # # unpack source and potentially patch package; use bzcat for bz2 files # $(rt2500_BUILD_DIR)/.unpacked: $(DL_DIR)/$(rt2500_SOURCE)/.fetched mkdir $(rt2500_BUILD_DIR) zcat $(DL_DIR)/$(rt2500_SOURCE) | tar -C $(rt2500_BUILD_DIR) $(TAR_OPTIONS) - touch $@ # # configure source, add additional options to configure as required # call ./configure --help to find out about additional options # $(rt2500_BUILD_DIR)/.configured: $(rt2500_BUILD_DIR)/.unpacked cd $(rt2500_BUILD_DIR) # TEMP_RT2500_DIR:=$(shell ls $(rt2500_BUILD_DIR)) mv $(rt2500_BUILD_DIR)/$(shell ls $(rt2500_BUILD_DIR))/Module $(rt2500_BUILD_DIR)/Module touch $@ # # build package # $(rt2500_BUILD_DIR)/Module/rt2500.ko: $(rt2500_BUILD_DIR)/.configured cd $(rt2500_BUILD_DIR)/Module ; \ $(MAKE) KERNDIR=$(LINUX_DIR) \ COPTS="$(TARGET_CONFIGURE_CFLAGS)" \ CC=$(TARGET_CC) PATCHLEVEL=6 module # # install package # $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/drivers/net/rt2500.ko: $(rt2500_BUILD_DIR)/Module/rt2500.ko mkdir -p $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/drivers/net cp $(rt2500_BUILD_DIR)/Module/rt2500.ko $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/drivers/net/rt2500.ko # # to get rt2500, we need $(TARGET_DIR)/usr/sbin/rt2500 # - to get $(TARGET_DIR)/usr/sbin/rt2500, we need $(rt2500_BUILD_DIR)/rt2500 # - before trying to build rt2500, we need # $(rt2500_BUILD_DIR)/.configured # ... rt2500: $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/drivers/net/rt2500.ko rt2500-source: $(DL_DIR)/$(rt2500_SOURCE) rt2500-clean: -$(MAKE) -C $(rt2500_BUILD_DIR) KERNDIR=$(LINUX_DIR) clean rt2500-dirclean: rm -rf $(rt2500_BUILD_DIR)