summaryrefslogtreecommitdiffstats
path: root/driver/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'driver/Makefile')
-rw-r--r--driver/Makefile26
1 files changed, 19 insertions, 7 deletions
diff --git a/driver/Makefile b/driver/Makefile
index 0a860bf..a55e7c7 100644
--- a/driver/Makefile
+++ b/driver/Makefile
@@ -1,10 +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)/kernel/extra
+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)/..
@@ -53,15 +55,25 @@ install:
@mkdir -p $(INSTALLDIR)
@echo "INSTALL $(INSTALLDIR)/pciDriver.ko"
@install -m 755 pciDriver.ko $(INSTALLDIR)
- @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 $(INSTALLDIR)/pciDriver.symvers"
+ @install -m 644 Module.symvers $(INSTALLDIR)/pciDriver.symvers
+ @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"
@rm -f $(INSTALLDIR)/pciDriver.ko
- @echo "UNINSTALL /usr/include/pciDriver/driver/pciDriver.h"
- @rm -rf /usr/include/pciDriver/driver
+ @rm -f $(MAININSTALLDIR)/pciDriver.ko
+ @rm -f $(INSTALLDIR)/pciDriver.symvers
+ @rm -f $(MAININSTALLDIR)/pciDriver.symvers
+ @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