root/floppyfw-3.0/makefiles/hostap-driver.mk

Revision 267, 2.9 KB (checked in by root, 2 years ago)

Some fixes and 3.0.12

Line 
1#############################################################
2#
3# hostap-driver card services
4#
5#############################################################
6# Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
7# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
8#
9# This program is free software; you can redistribute it and/or modify
10# it under the terms of the GNU Library General Public License as
11# published by the Free Software Foundation; either version 2 of the
12# License, or (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful, but
15# WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17# Library General Public License for more details.
18#
19# You should have received a copy of the GNU Library General Public
20# License along with this program; if not, write to the Free Software
21# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22# USA
23HOSTAP_DRIVER_VERSION=0.4.9
24HOSTAP_DRIVER_SOURCE:=hostap-driver-$(HOSTAP_DRIVER_VERSION).tar.gz
25HOSTAP_DRIVER_DIR:=$(BUILD_DIR)/hostap-driver-$(HOSTAP_DRIVER_VERSION)
26HOSTAP_DRIVER_PATCH:=$(SOURCE_DIR)/hostap-driver.patch
27HOSTAP_DRIVER_CAT:=zcat
28HOSTAP_DRIVER_KERNEL_PATCH:=$(HOSTAP_DRIVER_DIR)/kernel-patches/hostap-linux-2.4.24.patch
29
30HOSTAP_DRIVER_PKG_DIR=$(PACKAGES_DIR)/hostap-driver-cs
31
32$(DL_DIR)/$(HOSTAP_DRIVER_SOURCE):
33        $(WGET) -P $(DL_DIR) \
34                $(HOSTAP_SITE)/$(HOSTAP_DRIVER_SOURCE)
35
36$(HOSTAP_DRIVER_DIR)/.unpacked: $(DL_DIR)/$(HOSTAP_DRIVER_SOURCE)
37        $(HOSTAP_DRIVER_CAT) $(DL_DIR)/$(HOSTAP_DRIVER_SOURCE) | \
38                tar $(TAR_VERBOSE) -C $(BUILD_DIR) -xf -
39        touch $(HOSTAP_DRIVER_DIR)/.unpacked
40
41hostap-driver-source: $(HOSTAP_DRIVER_DIR)/.unpacked
42
43$(HOSTAP_DRIVER_DIR)/.patched: $(HOSTAP_DRIVER_DIR)/.unpacked
44        # cat $(HOSTAP_DRIVER_PATCH) | patch -d $(HOSTAP_DRIVER_DIR) -p1
45        # $(SED) 's|/sbin/depmod -ae|$(BUSYBOX_DIR)/examples/depmod.pl -b $(MODULES_DIR)/lib/modules/$(LINUX_VERSION)/ -k $(LINUX_DIR)/vmlinux -F $(LINUX_DIR)/System.map|' $(HOSTAP_DRIVER_DIR)/Makefile
46        $(SED) 's|/sbin/depmod -ae|true|' $(HOSTAP_DRIVER_DIR)/Makefile
47        touch $(HOSTAP_DRIVER_DIR)/.patched
48
49        # $(MAKE) CFLAGS="$(TARGET_CFLAGS) -I$(LINUX_SOURCE_DIR)/include" \
50
51$(HOSTAP_DRIVER_DIR)/driver/modules/hostap.o: $(HOSTAP_DRIVER_DIR)/.patched
52        (cd $(HOSTAP_DRIVER_DIR) ; \
53        $(MAKE) KERNEL_PATH=$(LINUX_SOURCE_DIR) \
54        );
55
56$(HOSTAP_PKG_DIR)/lib/modules: $(HOSTAP_DRIVER_DIR)/driver/modules/hostap.o
57        $(RM) -r $(HOSTAP_PKG_DIR)/lib/modules/$(LINUX_VERSION)
58        mkdir -p $(HOSTAP_PKG_DIR)/lib/modules/$(LINUX_VERSION)
59        ( cd $(HOSTAP_DRIVER_DIR) ; \
60        $(MAKE) DESTDIR=$(HOSTAP_PKG_DIR) \
61                KERNEL_PATH=$(LINUX_SOURCE_DIR) \
62                -C $(HOSTAP_DRIVER_DIR)  install; \
63        );
64
65hostap-driver: linux-source-configured $(HOSTAP_PKG_DIR)/lib/modules
66
67hostap-driver-clean:
68        -$(MAKE) -C $(HOSTAP_DRIVER_DIR) clean
69
70hostap-driver-dirclean:
71        $(RM) -r $(HOSTAP_DRIVER_DIR)
Note: See TracBrowser for help on using the browser.