summaryrefslogtreecommitdiffstats
path: root/driver/Makefile
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-02-13 03:07:11 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-02-13 03:07:11 +0100
commitb72e8567723c30f0e5a83675743e9380c48e5d55 (patch)
treef0dc052508543771fca08c358836507770864249 /driver/Makefile
downloadpcitool-b72e8567723c30f0e5a83675743e9380c48e5d55.tar.gz
pcitool-b72e8567723c30f0e5a83675743e9380c48e5d55.tar.bz2
pcitool-b72e8567723c30f0e5a83675743e9380c48e5d55.tar.xz
pcitool-b72e8567723c30f0e5a83675743e9380c48e5d55.zip
Initial import
Diffstat (limited to 'driver/Makefile')
-rw-r--r--driver/Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/driver/Makefile b/driver/Makefile
new file mode 100644
index 0000000..9f8918a
--- /dev/null
+++ b/driver/Makefile
@@ -0,0 +1,27 @@
+
+obj-m := pciDriver.o
+pciDriver-objs := base.o int.o umem.o kmem.o sysfs.o ioctl.o
+
+KERNELDIR ?= /lib/modules/$(shell uname -r)/build
+INSTALLDIR ?= /lib/modules/$(shell uname -r)/extra
+PWD := $(shell pwd)
+
+default:
+ $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
+
+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
+
+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
+
+clean:
+ rm -rf *.o *.ko *.mod.c .*.o.cmd .*.o.tmp .*.ko.cmd .*.o *.symvers modules.order .tmp_versions