############################################################# # # fcusb2 # ############################################################# FCUSB2_VER:=3.11-07 FCUSB2_SOURCE_URL:=ftp://ftp.avm.de/cardware/fritzcrdusb.v20/linux/suse.93/ FCUSB2_SOURCE:=fcusb2-suse93-$(FCUSB2_VER).tar.gz FCUSB2_CARD:=fcusb2 FCUSB2_BUILD_DIR:=$(BUILD_DIR)/$(FCUSB2_CARD)-$(FCUSB2_VER) # # download source # $(DL_DIR)/$(FCUSB2_SOURCE): $(WGET) -P $(DL_DIR) $(FCUSB2_SOURCE_URL)/$(FCUSB2_SOURCE) # # unpack source and potentially patch package; use zcat for gz files # $(FCUSB2_BUILD_DIR)/noask: $(DL_DIR)/$(FCUSB2_SOURCE) mkdir -p $(FCUSB2_BUILD_DIR) zcat $(DL_DIR)/$(FCUSB2_SOURCE) | tar -C $(FCUSB2_BUILD_DIR) $(TAR_OPTIONS) - $(PATCH) $(FCUSB2_BUILD_DIR)/fritz package/$(FCUSB2_CARD) $(FCUSB2_CARD).patch $(SED) -i -e 's/@CFLAGS@/$(TARGET_CONFIGURE_CFLAGS)/g' $(FCUSB2_BUILD_DIR)/fritz/src/Makefile touch $@ # # build package # $(FCUSB2_BUILD_DIR)/fritz/src/$(FCUSB2_CARD).ko: $(FCUSB2_BUILD_DIR)/noask $(MAKE) -C $(FCUSB2_BUILD_DIR)/fritz/src \ KDIR=$(LINUX_DIR) \ CC=$(TARGET_CC) \ LIBDIR=$(FCUSB2_BUILD_DIR) # # install package # $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/misc/$(FCUSB2_CARD).ko: $(FCUSB2_BUILD_DIR)/fritz/src/$(FCUSB2_CARD).ko mkdir -p $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/misc cp $(FCUSB2_BUILD_DIR)/fritz/src/$(FCUSB2_CARD).ko $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/misc $(FCUSB2_CARD): $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/misc/$(FCUSB2_CARD).ko $(FCUSB2_CARD)-source: $(DL_DIR)/$(FCUSB2_SOURCE) $(FCUSB2_CARD)-clean: -$(MAKE) -C $(FCUSB2_BUILD_DIR)/fritz/src KERNELPATH=$(LINUX_DIR) clean $(FCUSB2_CARD)-dirclean: rm -rf $(FCUSB2_BUILD_DIR)