From: Alex Tabachnik <al...@mellanox.com> To allow standalone compilation with latest 3.x kernels
Signed-off-by: Alex Tabachnik <al...@mellanox.com> --- Makefile | 33 +++------------------------------ 1 files changed, 3 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index abfaeb1..47fa0c0 100644 --- a/Makefile +++ b/Makefile @@ -1,42 +1,15 @@ -KSRC=/lib/modules/`uname -r`/source +KSRC=/lib/modules/`uname -r`/build KOBJ=/lib/modules/`uname -r`/build -# -# Use this if you're building on a OFED system. Make sure you -# configure the ofa_kernel-1.3 tree with the options from -# /etc/infiniband/info -# -OFA=/usr/src/ofa_kernel -# -# Use this if you're building against a kernel.org kernel with -# rdma support enabled. -# -#OFA=$(KSRC) -#OFA=$(KOBJ) - -# -# Set ARCH to x86 for both i386 and x86_64 -# -ARCH=x86 -EXTRA_CFLAGS += -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall -EXTRA_CFLAGS += -I$(OFA)/arch/$(ARCH)/include -I$(OFA)/include -I$(KOBJ)/include -I$(KOBJ)/include2 -I$(KSRC)/include -I. -EXTRA_CFLAGS += $(shell [ -f $(KOBJ)/include/linux/modversions.h ] && \ - echo "-DMODVERSIONS -DEXPORT_SYMTAB \ - -include $(KSRC)/include/linux/modversions.h") -EXTRA_CFLAGS += $(shell [ -f $(KOBJ)/include/config/modversions.h ] && \ - echo "-DMODVERSIONS -DEXPORT_SYMTAB \ - -include $(KSRC)/include/config/modversions.h") obj-m += rdma_krping.o rdma_krping-y := getopt.o krping.o default: - -cp -f $(OFA)/Module.markers `pwd` - -cp -f $(OFA)/Module.symvers `pwd` - make -C $(KSRC) O=$(KOBJ) SUBDIRS=$(shell pwd) LINUXINCLUDE='-I$(OFA)/include -Iinclude -include $(KOBJ)/include/linux/autoconf.h -include linux/autoconf.h' modules + make -C $(KSRC) M=`pwd` modules install: - make -C $(KSRC) O=$(KOBJ) SUBDIRS=$(shell pwd) modules_install + make -C $(KSRC) M=`pwd` modules_install depmod -a clean: -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html