/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to driver/Makefile

  • Committer: Suren A. Chilingaryan
  • Date: 2016-03-02 18:37:30 UTC
  • Revision ID: csa@suren.me-20160302183730-nlrgi7h3yuizcizc
Restructure driver headers

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
CONFIG_MODULE_SIG=n
2
2
 
3
3
obj-m := pciDriver.o
4
 
pciDriver-objs := base.o int.o umem.o kmem.o sysfs.o ioctl.o compat.o rdma.o
 
4
pciDriver-objs := base.o dev.o int.o umem.o kmem.o sysfs.o ioctl.o pcibus.o rdma.o
5
5
 
6
6
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
7
7
INSTALLDIR ?= /lib/modules/$(shell uname -r)/extra
8
8
MAININSTALLDIR ?= /lib/modules/$(shell uname -r)/kernel/extra
 
9
HEADERDIR ?= /lib/modules/$(shell uname -r)/source/include
9
10
PWD := $(shell pwd)
10
11
 
11
12
EXTRA_CFLAGS += -I$(M)/..
56
57
        @install -m 755 pciDriver.ko $(INSTALLDIR)
57
58
        @echo "INSTALL $(INSTALLDIR)/pciDriver.symvers"
58
59
        @install -m 644 Module.symvers $(INSTALLDIR)/pciDriver.symvers
59
 
#       @echo "INSTALL /usr/include/pciDriver/driver/pciDriver.h"
60
 
#       @mkdir -p /usr/include/pciDriver/driver
61
 
#       @install -m 644 pciDriver.h /usr/include/pciDriver/driver
 
60
        @echo "INSTALL $(HEADERDIR)/linux/pcidriver.h"
 
61
        @install -m 644 pcidriver.h $(HEADERDIR)/linux/
 
62
        @echo "INSTALL /usr/include/linux/pcidriver.h"
 
63
        @mkdir -p /usr/include/linux
 
64
        @install -m 644 ioctl.h /usr/include/linux/pcidriver.h
62
65
 
63
66
uninstall:
64
67
        @echo "UNINSTALL $(INSTALLDIR)/pciDriver.ko"
66
69
        @rm -f $(MAININSTALLDIR)/pciDriver.ko
67
70
        @rm -f $(INSTALLDIR)/pciDriver.symvers
68
71
        @rm -f $(MAININSTALLDIR)/pciDriver.symvers
69
 
        @echo "UNINSTALL /usr/include/pciDriver/driver/pciDriver.h"
70
 
        @rm -rf /usr/include/pciDriver/driver
 
72
        @echo "UNINSTALL /usr/include/linux/pcidriver.h"
 
73
        @rm -rf /usr/include/pciDriver/
 
74
        @rm -rf /usr/include/linux/pcidriver.h
 
75
        @echo "UNINSTALL $(HEADERDIR)/linux/pcidriver.h"
 
76
        @rm -rf $(HEADERDIR)/linux/pcidriver.h
71
77
 
72
78
clean:
73
79
        rm -rf *.o *.ko *.mod.c .*.o.cmd .*.o.tmp .*.ko.cmd  .*.o *.symvers modules.order .tmp_versions