############################################################# # # pcmcia card services # ############################################################# # Copyright (C) 2001-2003 by Erik Andersen # Copyright (C) 2002 by Tim Riker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Library General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA PCMCIA_SITE:=http://pcmcia-cs.sourceforge.net/ftp/ PCMCIA_SOURCE:=pcmcia-cs-3.2.8.tar.gz PCMCIA_DIR:=$(BUILD_DIR)/pcmcia-cs-3.2.8 PCMCIA_PATCH:=$(SOURCE_DIR)/pcmcia.patch PCMCIA_CAT:=zcat PCMCIA_PKG_DIR=$(PACKAGES_DIR)/pcmcia-cs $(DL_DIR)/$(PCMCIA_SOURCE): $(WGET) -P $(DL_DIR) $(PCMCIA_SITE)/$(PCMCIA_SOURCE) pcmcia-source: $(DL_DIR)/$(PCMCIA_SOURCE) $(PCMCIA_DIR)/.unpacked: $(DL_DIR)/$(PCMCIA_SOURCE) $(PCMCIA_CAT) $(DL_DIR)/$(PCMCIA_SOURCE) | \ tar $(TAR_VERBOSE) -C $(BUILD_DIR) -xf - -[ ! -d $(PCMCIA_PKG_DIR) ] && mkdir $(PCMCIA_PKG_DIR) touch $(PCMCIA_DIR)/.unpacked $(PCMCIA_DIR)/.patched: $(PCMCIA_DIR)/.unpacked cat $(PCMCIA_PATCH) | patch -d $(PCMCIA_DIR) -p1 touch $(PCMCIA_DIR)/.patched # --moddir=$(MODULES_DIR)/lib/modules/$(LINUX_VERSION)/ $(PCMCIA_DIR)/.configured: $(PCMCIA_DIR)/.patched ( cd $(PCMCIA_DIR) ; ./Configure \ --kernel=$(LINUX_SOURCE_DIR) --noprompt \ --target=$(PACKAGES_DIR)/pcmcia-cs \ --pnp \ --ucc=$(TARGET_CC) \ --kcc=$(TARGET_CC) \ --pnp \ --srctree \ --moddir=$(PCMCIA_PKG_DIR)/lib/modules/$(LINUX_VERSION)/ \ --uflags="$(TARGET_CFLAGS)" \ ); $(SED) "s/pump/udhcpc/" $(PCMCIA_DIR)/etc/network touch $(PCMCIA_DIR)/.configured $(PCMCIA_DIR)/cardmgr/cardmgr: $(PCMCIA_DIR)/.configured $(MAKE) -C $(PCMCIA_DIR) -i all touch -c $(PCMCIA_DIR)/cardmgr/cardmgr $(PCMCIA_PKG_DIR)/sbin/cardmgr: $(PCMCIA_DIR)/cardmgr/cardmgr -$(RM) -r $(PCMCIA_PKG_DIR)/* $(MAKE) -i -C $(PCMCIA_DIR) install -$(SSTRIP) $(PCMCIA_PKG_DIR)/sbin/* -$(SSTRIP) $(PCMCIA_PKG_DIR)/lib/* -$(RM) -r $(PCMCIA_PKG_DIR)/usr/share -$(RM) -r $(PCMCIA_PKG_DIR)/usr/man -$(RM) -r $(PCMCIA_PKG_DIR)/include -$(RM) -r $(PCMCIA_PKG_DIR)/man $(PACKAGES_DIR)/pcmcia-cs.ffw: $(PCMCIA_PKG_DIR)/sbin/cardmgr (cd $(PACKAGES_DIR); sh mkpack pcmcia-cs) pcmcia: $(PACKAGES_DIR)/pcmcia-cs.ffw pcmcia-clean: $(RM) -r $(PCMCIA_PKG_DIR) -$(MAKE) -C $(PCMCIA_DIR) clean $(RM) $(PCMCIA_DIR)/.configured $(PCMCIA_DIR)/config.out pcmcia-dirclean: $(RM) -r $(PCMCIA_PKG_DIR) $(RM) -r $(PCMCIA_DIR) # Probably not nessesary at all: # pcmcia: $(PCMCIA_PKG_DIR)/sbin/cardmgr $(PCMCIA_DIR)/.modules.dep # use busybox depmod.pl so we need the sources unpacked $(PCMCIA_DIR)/.modules.dep: $(BUSYBOX_DIR)/.configured $(PCMCIA_PKG_DIR)/lib/modules [ -d $(PCMCIA_PKG_DIR)/lib/modules/$(LINUX_VERSION) ] && \ $(BUSYBOX_DIR)/examples/depmod.pl -n \ -b $(PCMCIA_PKG_DIR)/lib/modules/$(LINUX_VERSION)/ \ -k $(LINUX_DIR)/vmlinux \ -F $(LINUX_DIR)/System.map \ > $(PCMCIA_PKG_DIR)/lib/modules/$(LINUX_VERSION)/modules.dep touch $(PCMCIA_DIR)/.modules.dep