aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2003-05-26 16:45:24 (GMT)
committerJouni Malinen <j@w1.fi>2003-05-26 16:45:24 (GMT)
commit61bae35b64f2508aa0d9f1bd27392d706e0578b8 (patch)
tree8a9979c5926e86ffd28a7d241ecd77aac7f901b7
parentb01e0cc6086eabf4e9f4aac377865abe24cfd421 (diff)
downloadhostap-history-61bae35b64f2508aa0d9f1bd27392d706e0578b8.zip
hostap-history-61bae35b64f2508aa0d9f1bd27392d706e0578b8.tar.gz
hostap-history-61bae35b64f2508aa0d9f1bd27392d706e0578b8.tar.bz2
Revert changes in rev 1.41 since top-level Host AP Makefile is still used
when compiling for Linux 2.2.x. In addition, it can be used as an alternative method for compiling Linux 2.4.x versions.
-rw-r--r--Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index aeec67e..adedb2f 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,8 @@ VERFILE := $(KERNEL_PATH)/include/linux/version.h
KERNELRELEASE := $(shell if [ -r $(VERFILE) ]; \
then (cat $(VERFILE); echo UTS_RELEASE) | $(CC) $(INCLUDES) $(CFLAGS) -E - | tail -1 | xargs echo; \
else uname -r; fi)
+KERNELVER := $(shell echo "$(KERNELRELEASE)" | \
+ sed "s/\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/")
MODPATH := $(DESTDIR)/lib/modules/$(KERNELRELEASE)
MODULE_CS := hostap_cs.o
MODULE_PLX := hostap_plx.o
@@ -76,6 +78,35 @@ ifndef CONFIG_FRAME_POINTER
CFLAGS += -fomit-frame-pointer
endif
+
+ifdef CONFIG_MODVERSIONS
+
+VERFILES=$(MSRC)/hostap.ver $(MSRC)/hostap_crypt.ver
+$(MSRC)/hostap_crypt_wep.o: $(VERFILES)
+$(MSRC)/hostap.o: $(VERFILES)
+$(MSRC)/hostap_cs.o: $(VERFILES)
+$(MSRC)/hostap_plx.o: $(VERFILES)
+$(MSRC)/hostap_pci.o: $(VERFILES)
+INCLUDES_MODVER=-include $(MSRC)/hostap_crypt.ver -include $(MSRC)/hostap.ver
+
+GENKSYMS=/sbin/genksyms
+ifdef CONFIG_SMP
+ GENKSYMS += -p smp_
+endif
+
+$(MSRC)/hostap_crypt.ver: $(MSRC)/hostap_crypt.c
+ $(CC) $(INCLUDES) $(CFLAGS) -E -D__GENKSYMS__ $^ | \
+ $(GENKSYMS) -k $(KERNELVER) > $@
+$(MSRC)/hostap.ver: $(MSRC)/hostap.c
+ $(CC) $(INCLUDES) $(CFLAGS) -E -D__GENKSYMS__ $^ | \
+ $(GENKSYMS) -k $(KERNELVER) > $@
+
+endif
+
+
+.c.o:
+ $(CC) $(INCLUDES) $(INCLUDES_MODVER) $(CFLAGS) -o $@ $<
+
2.4:
@if ! echo "$(KERNELRELEASE)" | grep -q "^2\.4"; then \
echo "*** Can't build for 2.4 with a non-2.4 source!"; \