aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile26
1 files changed, 25 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index adedb2f..1d954db 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,19 @@ ifdef PCMCIA_PATH
ifndef CONFIG_PCMCIA
INCLUDES=-I$(PCMCIA_PATH)/include -I$(KERNEL_PATH)/include
endif
+ifeq (,$(wildcard $(PCMCIA_PATH)/include/pcmcia/version.h))
+$(error PCMCIA_PATH doesn't contain valid pcmcia-cs source)
+endif
+ifdef CONFIG_PCMCIA
+$(error Kernel supports PCMCIA - PCMCIA_PATH shouldn't be defined)
+endif
+export PCMCIA_PATH
+endif
+
+ifndef PCMCIA_PATH
+ifndef CONFIG_PCMCIA
+$(warning WARNING: No kernel PCMCIA support found and PCMCIA_PATH is not defined)
+endif
endif
VERFILE := $(KERNEL_PATH)/include/linux/version.h
@@ -79,6 +92,11 @@ CFLAGS += -fomit-frame-pointer
endif
+# Old compilation using this Makefile and not the build system in the kernel
+# tree. This is used when compiling for Linux 2.2.x (or Linux 2.4.x with
+# 'make pccard'). Both Linux 2.5.x and 2.4.x can use kernel tree build system
+# with 'make'.
+
ifdef CONFIG_MODVERSIONS
VERFILES=$(MSRC)/hostap.ver $(MSRC)/hostap_crypt.ver
@@ -107,6 +125,9 @@ endif
.c.o:
$(CC) $(INCLUDES) $(INCLUDES_MODVER) $(CFLAGS) -o $@ $<
+# end of old compilation
+
+
2.4:
@if ! echo "$(KERNELRELEASE)" | grep -q "^2\.4"; then \
echo "*** Can't build for 2.4 with a non-2.4 source!"; \
@@ -179,7 +200,7 @@ install_check:
exit 1; \
fi
-install_2.4: install_pccard install_pci install_plx
+install_2.4: uninstall install_pccard install_pci install_plx
install_2.5: install_conf
$(MAKE) install_check
@@ -232,6 +253,9 @@ install_pci: install_check install_crypt install_hostap
cp -f $(MSRC)/$(MODULE_PCI) $(MODPATH_PCI)
/sbin/depmod -ae
+uninstall:
+ find $(MODPATH) -name "hostap*" | xargs rm -f
+
clean:
rm -f $(MSRC)/{$(MODULE_CS),$(MODULE_PLX),$(MODULE_PCI)}