summaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2016-03-04 16:43:14 +0100
committerSuren A. Chilingaryan <csa@suren.me>2016-03-04 16:43:14 +0100
commit4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b (patch)
treedce4520f69b3124da7afa76c2bbe5fc1f08313f7 /driver
parent195c28f3074486165b6e0935362810f8a1fb9531 (diff)
downloadpcitool-4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b.tar.gz
pcitool-4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b.tar.bz2
pcitool-4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b.tar.xz
pcitool-4c17aa5a10ffc232e7e4de45d8ab0b52cfc3010b.zip
RPM generation
Diffstat (limited to 'driver')
-rw-r--r--driver/makefile (renamed from driver/Makefile)17
1 files changed, 13 insertions, 4 deletions
diff --git a/driver/Makefile b/driver/makefile
index a55e7c7..ca44b94 100644
--- a/driver/Makefile
+++ b/driver/makefile
@@ -3,10 +3,11 @@ CONFIG_MODULE_SIG=n
obj-m := pciDriver.o
pciDriver-objs := base.o dev.o int.o umem.o kmem.o sysfs.o ioctl.o pcibus.o rdma.o
-KERNELDIR ?= /lib/modules/$(shell uname -r)/build
-INSTALLDIR ?= /lib/modules/$(shell uname -r)/extra
-MAININSTALLDIR ?= /lib/modules/$(shell uname -r)/kernel/extra
-HEADERDIR ?= /lib/modules/$(shell uname -r)/source/include
+KERNELVER ?= $(shell uname -r)
+KERNELDIR ?= /lib/modules/$(KERNELVER)/build
+INSTALLDIR ?= /lib/modules/$(KERNELVER)/extra
+MAININSTALLDIR ?= /lib/modules/$(KERNELVER)/kernel/extra
+HEADERDIR ?= /lib/modules/$(KERNELVER)/source/include
PWD := $(shell pwd)
EXTRA_CFLAGS += -I$(M)/..
@@ -63,6 +64,14 @@ install:
@mkdir -p /usr/include/linux
@install -m 644 ioctl.h /usr/include/linux/pcidriver.h
+install_symvers:
+ @mkdir -p $(INSTALLDIR)
+ @echo "INSTALL $(INSTALLDIR)/pciDriver.symvers"
+ @install -m 644 Module.symvers $(INSTALLDIR)/pciDriver.symvers
+ @echo "INSTALL $(HEADERDIR)/linux/pcidriver.h"
+ @install -m 644 pcidriver.h $(HEADERDIR)/linux/
+
+
uninstall:
@echo "UNINSTALL $(INSTALLDIR)/pciDriver.ko"
@rm -f $(INSTALLDIR)/pciDriver.ko