############################################################# # # rt2400 # ############################################################# rt2400_VER:=cvs-daily rt2400_SOURCE_URL:=http://$(SF_DL_HOST)/project/rt2400/Final%20software%20release/rt2400-legacy-final-cvs rt2400_SOURCE:=rt2400-$(rt2400_VER).tar.gz rt2400_BUILD_DIR:=$(BUILD_DIR)/rt2400-$(rt2400_VER) # # download source # $(DL_DIR)/$(rt2400_SOURCE)/.fetched: $(WGET) -P $(DL_DIR) $(rt2400_SOURCE_URL)/$(rt2400_SOURCE) # # unpack source and potentially patch package; use bzcat for bz2 files # $(rt2400_BUILD_DIR)/.unpacked: $(DL_DIR)/$(rt2400_SOURCE)/.fetched mkdir $(rt2400_BUILD_DIR) zcat $(DL_DIR)/$(rt2400_SOURCE) | tar -C $(rt2400_BUILD_DIR) $(TAR_OPTIONS) - touch $@ # # configure source, add additional options to configure as required # call ./configure --help to find out about additional options # $(rt2400_BUILD_DIR)/.configured: $(rt2400_BUILD_DIR)/.unpacked cd $(rt2400_BUILD_DIR) mv $(rt2400_BUILD_DIR)/$(shell ls $(rt2400_BUILD_DIR))/Module $(rt2400_BUILD_DIR)/Module touch $@ # # build package # $(rt2400_BUILD_DIR)/Module/rt2400.ko: $(rt2400_BUILD_DIR)/.configured cd $(rt2400_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/rt2400.ko: $(rt2400_BUILD_DIR)/Module/rt2400.ko mkdir -p $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/drivers/net cp $(rt2400_BUILD_DIR)/Module/rt2400.ko $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/drivers/net/rt2400.ko # # to get rt2400, we need $(TARGET_DIR)/usr/sbin/rt2400 # - to get $(TARGET_DIR)/usr/sbin/rt2400, we need $(rt2400_BUILD_DIR)/rt2400 # - before trying to build rt2400, we need # $(rt2400_BUILD_DIR)/.configured # ... rt2400: $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/drivers/net/rt2400.ko rt2400-source: $(DL_DIR)/$(rt2400_SOURCE) rt2400-clean: -$(MAKE) -C $(rt2400_BUILD_DIR) KERNDIR=$(LINUX_DIR) clean rt2400-dirclean: rm -rf $(rt2400_BUILD_DIR)