summaryrefslogtreecommitdiffstats
path: root/driver/Makefile
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-04-27 02:28:57 +0200
committerSuren A. Chilingaryan <csa@suren.me>2015-04-27 02:28:57 +0200
commite1265fa32837f457ee2c2fa259d12c9545af4bbf (patch)
tree64b8d5f1c81c14f019047b0cb00cb77c2dcecf55 /driver/Makefile
parenta37beb44d59cca329d0d9345c21505af81030688 (diff)
downloadipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.tar.gz
ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.tar.bz2
ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.tar.xz
ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.zip
First stand-alone ipecamera implementation
Diffstat (limited to 'driver/Makefile')
-rw-r--r--driver/Makefile49
1 files changed, 0 insertions, 49 deletions
diff --git a/driver/Makefile b/driver/Makefile
deleted file mode 100644
index e353228..0000000
--- a/driver/Makefile
+++ /dev/null
@@ -1,49 +0,0 @@
-
-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)
-
-EXTRA_CFLAGS += -I$(M)/..
-
-default:
- @KERNEL_GCC_VERSION=`cat /proc/version | head -n1 | cut -d " " -f 7` ;\
- GCC_VERSION=`$(CC) --version | head -n 1 | tr ' ' '\n' | grep -e "[0-9]\+\.[0-9]" | tail -n 1` ;\
- if [ $$KERNEL_GCC_VERSION != $$GCC_VERSION ]; then \
- echo "Kernel is compiled with gcc $$KERNEL_GCC_VERSION, but you are now using $$GCC_VERSION" ;\
- GCC_MAJOR=`echo $$KERNEL_GCC_VERSION | cut -d "." -f 1-2` ;\
- newCC=gcc-$$GCC_MAJOR ;\
- CC=`which $$newCC 2>/dev/null` ;\
- if [ $$? -ne 0 ]; then \
- echo "No compiler of $$GCC_MAJOR series is installed" ;\
- exit 1 ;\
- fi ;\
- GCC_VERSION=`$$CC --version | head -n 1 | tr ' ' '\n' | grep -e "[0-9]\+\.[0-9]" | head -n 1` ;\
- if [ $$KERNEL_GCC_VERSION != $$GCC_VERSION ]; then \
- echo "The $$GCC_VERSION of $$GCC_MAJOR series is installed" ;\
- exit 1 ;\
- fi ;\
- echo "Setting CC to $$newCC" ;\
- else \
- CC=$(CC) ;\
- fi ;\
- $(MAKE) $(CFLAGS) -C $(KERNELDIR) M=$(PWD) CC=$$CC 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