diff -u -r1.1.1.3 Makefile --- Makefile 6 Sep 2002 01:15:17 -0000 +++ Makefile 25 Oct 2002 06:10:43 -0000 @@ -1,12 +1,11 @@ # ipvs: IP Virtual Server Module for the NetFilter framework -# uncomment the following line on an SMP system -#SMPFLAGS = -D__SMP__ - # uncomment the following line for DEBUG DEBUGFLAGS = -DCONFIG_IP_VS_DEBUG -g -KERNELRELEASE = $(shell uname -r) +KERNEL_SRC_PATH = /usr/src/linux +KERNELRELEASE = $(shell grep UTS_RELEASE \ + $(KERNEL_SRC_PATH)/include/linux/version.h | cut -d '"' -f 2) # As per the Linux Kernel's Makefile: # INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory @@ -24,9 +23,9 @@ CC=gcc CFLAGS= -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DMODVERSIONS \ - $(SMPFLAGS) $(DEBUGFLAGS) -O2 -Wall \ - -Wstrict-prototypes -I/usr/src/linux/include \ - -include /usr/src/linux/include/linux/modversions.h + $(DEBUGFLAGS) -O2 -Wall \ + -Wstrict-prototypes -I$(KERNEL_SRC_PATH)/include \ + -include $(KERNEL_SRC_PATH)/include/linux/modversions.h all: $(CORE) $(SCHEDULERS) @@ -41,7 +40,7 @@ modules_install: if [ ! -d "$(MODLIB)" ]; then mkdir -p "$(MODLIB)"; fi install -m 600 -c $(CORE) $(SCHEDULERS) "$(MODLIB)" - depmod -a + -depmod -a -b $(INSTALL_MOD_PATH)/ modules_uninstall: (cd "$(MODLIB)"; rm -f $(CORE) $(SCHEDULERS))