From 1120e8745ccd3e512fe2016c9e5092fcd378490a Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 2 Mar 2016 19:37:30 +0100 Subject: Restructure driver headers --- driver/Makefile | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'driver/Makefile') 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 -- cgit v1.2.3