summaryrefslogtreecommitdiffstats
path: root/make/hostap.mk
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-06-20 12:15:27 +0000
committerEric Andersen <andersen@codepoet.org>2003-06-20 12:15:27 +0000
commit12c383b56de2b8ab6c291522fbd40b067babf4aa (patch)
tree3f13d5688f60f46a56519b0e1996dc9567491a3d /make/hostap.mk
parent4cc06f8ea8ad95a5f6d0b21b88cdcd38e83646b2 (diff)
downloadbuildroot-novena-12c383b56de2b8ab6c291522fbd40b067babf4aa.tar.gz
buildroot-novena-12c383b56de2b8ab6c291522fbd40b067babf4aa.zip
run depmod after building pcmcia and after hostap
Diffstat (limited to 'make/hostap.mk')
-rw-r--r--make/hostap.mk66
1 files changed, 38 insertions, 28 deletions
diff --git a/make/hostap.mk b/make/hostap.mk
index 3525e8201..100d0ce10 100644
--- a/make/hostap.mk
+++ b/make/hostap.mk
@@ -5,7 +5,7 @@
#############################################################
HOSTAP_SOURCE_URL=http://hostap.epitest.fi/cgi-bin/viewcvs.cgi/hostap/hostap.tar.gz?tarball=1
HOSTAP_SOURCE=hostap.tar.gz
-HOSTAP_BUILD_DIR=$(BUILD_DIR)/hostap-snapshot
+HOSTAP_DIR=$(BUILD_DIR)/hostap-snapshot
HOSTAP_TARGET_MODULE_DIR=$(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/hostap
$(DL_DIR)/$(HOSTAP_SOURCE):
@@ -13,48 +13,58 @@ $(DL_DIR)/$(HOSTAP_SOURCE):
hostap-source: $(DL_DIR)/$(HOSTAP_SOURCE)
-$(HOSTAP_BUILD_DIR)/.unpacked: $(DL_DIR)/$(HOSTAP_SOURCE)
+$(HOSTAP_DIR)/.unpacked: $(DL_DIR)/$(HOSTAP_SOURCE)
zcat $(DL_DIR)/$(HOSTAP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
- mv -f $(BUILD_DIR)/hostap $(HOSTAP_BUILD_DIR)
- touch $(HOSTAP_BUILD_DIR)/.unpacked
+ mv -f $(BUILD_DIR)/hostap $(HOSTAP_DIR)
+ touch $(HOSTAP_DIR)/.unpacked
-$(HOSTAP_BUILD_DIR)/.configured: $(HOSTAP_BUILD_DIR)/.unpacked
+$(HOSTAP_DIR)/.configured: $(HOSTAP_DIR)/.unpacked
perl -pi -e "s,/.*#define PRISM2_DOWNLOAD_SUPPORT.*/,#define PRISM2_DOWNLOAD_SUPPORT,g" \
- $(HOSTAP_BUILD_DIR)/driver/modules/hostap_config.h
- touch $(HOSTAP_BUILD_DIR)/.configured
-
-$(HOSTAP_BUILD_DIR)/driver/modules/hostap.o: $(HOSTAP_BUILD_DIR)/.configured
- $(MAKE) -C $(HOSTAP_BUILD_DIR) pccard KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC)
- $(MAKE) -C $(HOSTAP_BUILD_DIR) pci KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC)
- $(MAKE) -C $(HOSTAP_BUILD_DIR) plx KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC)
- $(MAKE) -C $(HOSTAP_BUILD_DIR)/utils CC=$(TARGET_CC)
- $(MAKE) -C $(HOSTAP_BUILD_DIR)/hostapd CC=$(TARGET_CC)
- touch -c $(HOSTAP_BUILD_DIR)/driver/modules/hostap.o
-
-$(HOSTAP_TARGET_MODULE_DIR)/hostap.o: $(HOSTAP_BUILD_DIR)/driver/modules/hostap.o
+ $(HOSTAP_DIR)/driver/modules/hostap_config.h
+ touch $(HOSTAP_DIR)/.configured
+
+$(HOSTAP_DIR)/driver/modules/hostap.o: $(HOSTAP_DIR)/.configured
+ $(MAKE) -C $(HOSTAP_DIR) pccard KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC)
+ $(MAKE) -C $(HOSTAP_DIR) pci KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC)
+ $(MAKE) -C $(HOSTAP_DIR) plx KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC)
+ $(MAKE) -C $(HOSTAP_DIR)/utils CC=$(TARGET_CC)
+ $(MAKE) -C $(HOSTAP_DIR)/hostapd CC=$(TARGET_CC)
+ touch -c $(HOSTAP_DIR)/driver/modules/hostap.o
+
+$(HOSTAP_TARGET_MODULE_DIR)/hostap.o: $(HOSTAP_DIR)/driver/modules/hostap.o
# Make the dir
-rm -rf $(HOSTAP_TARGET_MODULE_DIR)
-mkdir -p $(HOSTAP_TARGET_MODULE_DIR)
# Copy The Module Files
- cp -af $(HOSTAP_BUILD_DIR)/driver/modules/*.o $(HOSTAP_TARGET_MODULE_DIR)/
+ cp -af $(HOSTAP_DIR)/driver/modules/*.o $(HOSTAP_TARGET_MODULE_DIR)/
# Copy the pcmcia-cs conf file
-mkdir -p $(TARGET_DIR)/etc/pcmcia
- cp -af $(HOSTAP_BUILD_DIR)/driver/etc/hostap_cs.conf $(TARGET_DIR)/etc/pcmcia/
+ cp -af $(HOSTAP_DIR)/driver/etc/hostap_cs.conf $(TARGET_DIR)/etc/pcmcia/
# Copy The Utils
- cp -af $(HOSTAP_BUILD_DIR)/utils/hostap_crypt_conf $(TARGET_DIR)/usr/bin/
- cp -af $(HOSTAP_BUILD_DIR)/utils/hostap_diag $(TARGET_DIR)/usr/bin/
- cp -af $(HOSTAP_BUILD_DIR)/utils/prism2_param $(TARGET_DIR)/usr/bin/
- cp -af $(HOSTAP_BUILD_DIR)/utils/prism2_srec $(TARGET_DIR)/usr/bin/
+ cp -af $(HOSTAP_DIR)/utils/hostap_crypt_conf $(TARGET_DIR)/usr/bin/
+ cp -af $(HOSTAP_DIR)/utils/hostap_diag $(TARGET_DIR)/usr/bin/
+ cp -af $(HOSTAP_DIR)/utils/prism2_param $(TARGET_DIR)/usr/bin/
+ cp -af $(HOSTAP_DIR)/utils/prism2_srec $(TARGET_DIR)/usr/bin/
# Copy hostapd
- cp -af $(HOSTAP_BUILD_DIR)/hostapd/hostapd $(TARGET_DIR)/usr/sbin/
+ cp -af $(HOSTAP_DIR)/hostapd/hostapd $(TARGET_DIR)/usr/sbin/
touch -c $(HOSTAP_TARGET_MODULE_DIR)/hostap.o
-hostap: pcmcia $(HOSTAP_TARGET_MODULE_DIR)/hostap.o
+# use busybox depmod.pl so we need the sources unpacked
+$(HOSTAP_DIR)/.modules.dep: $(BUSYBOX_DIR)/.configured $(TARGET_DIR)/lib/modules
+ [ -d $(TARGET_DIR)/lib/modules/$(LINUX_VERSION) ] && \
+ $(BUSYBOX_DIR)/examples/depmod.pl \
+ -b $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/ \
+ -k $(LINUX_DIR)/vmlinux \
+ -F $(LINUX_DIR)/System.map \
+ > $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/modules.dep
+ touch $(HOSTAP_DIR)/.modules.dep
+
+hostap: pcmcia $(HOSTAP_TARGET_MODULE_DIR)/hostap.o $(HOSTAP_DIR)/.modules.dep
hostap-clean:
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(HOSTAP_BUILD_DIR) uninstall
- -$(MAKE) -C $(HOSTAP_BUILD_DIR) clean
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(HOSTAP_DIR) uninstall
+ -$(MAKE) -C $(HOSTAP_DIR) clean
hostap-dirclean:
- rm -rf $(HOSTAP_BUILD_DIR)
+ rm -rf $(HOSTAP_DIR)