summaryrefslogtreecommitdiffstats
path: root/driver/Makefile
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2016-03-02 19:37:30 +0100
committerSuren A. Chilingaryan <csa@suren.me>2016-03-02 19:37:30 +0100
commit1120e8745ccd3e512fe2016c9e5092fcd378490a (patch)
tree0e89ac6cd82c213a78d79d10d3fecff06f21127d /driver/Makefile
parent01e857cca352e73243d00b62a0c248a35cea6b71 (diff)
downloadpcitool-1120e8745ccd3e512fe2016c9e5092fcd378490a.tar.gz
pcitool-1120e8745ccd3e512fe2016c9e5092fcd378490a.tar.bz2
pcitool-1120e8745ccd3e512fe2016c9e5092fcd378490a.tar.xz
pcitool-1120e8745ccd3e512fe2016c9e5092fcd378490a.zip
Restructure driver headers
Diffstat (limited to 'driver/Makefile')
-rw-r--r--driver/Makefile18
1 files changed, 12 insertions, 6 deletions
diff --git a/driver/Makefile b/driver/Makefile
index 8d8ada8..a55e7c7 100644
--- a/driver/Makefile
+++ b/driver/Makefile
@@ -1,11 +1,12 @@
CONFIG_MODULE_SIG=n
obj-m := pciDriver.o
-pciDriver-objs := base.o int.o umem.o kmem.o sysfs.o ioctl.o compat.o rdma.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
PWD := $(shell pwd)
EXTRA_CFLAGS += -I$(M)/..
@@ -56,9 +57,11 @@ install:
@install -m 755 pciDriver.ko $(INSTALLDIR)
@echo "INSTALL $(INSTALLDIR)/pciDriver.symvers"
@install -m 644 Module.symvers $(INSTALLDIR)/pciDriver.symvers
-# @echo "INSTALL /usr/include/pciDriver/driver/pciDriver.h"
-# @mkdir -p /usr/include/pciDriver/driver
-# @install -m 644 pciDriver.h /usr/include/pciDriver/driver
+ @echo "INSTALL $(HEADERDIR)/linux/pcidriver.h"
+ @install -m 644 pcidriver.h $(HEADERDIR)/linux/
+ @echo "INSTALL /usr/include/linux/pcidriver.h"
+ @mkdir -p /usr/include/linux
+ @install -m 644 ioctl.h /usr/include/linux/pcidriver.h
uninstall:
@echo "UNINSTALL $(INSTALLDIR)/pciDriver.ko"
@@ -66,8 +69,11 @@ uninstall:
@rm -f $(MAININSTALLDIR)/pciDriver.ko
@rm -f $(INSTALLDIR)/pciDriver.symvers
@rm -f $(MAININSTALLDIR)/pciDriver.symvers
- @echo "UNINSTALL /usr/include/pciDriver/driver/pciDriver.h"
- @rm -rf /usr/include/pciDriver/driver
+ @echo "UNINSTALL /usr/include/linux/pcidriver.h"
+ @rm -rf /usr/include/pciDriver/
+ @rm -rf /usr/include/linux/pcidriver.h
+ @echo "UNINSTALL $(HEADERDIR)/linux/pcidriver.h"
+ @rm -rf $(HEADERDIR)/linux/pcidriver.h
clean:
rm -rf *.o *.ko *.mod.c .*.o.cmd .*.o.tmp .*.ko.cmd .*.o *.symvers modules.order .tmp_versions