summaryrefslogtreecommitdiffstats
path: root/Usb-Driver/Makefile
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2016-07-28 14:15:55 +0200
committerChristian Gromm <christian.gromm@microchip.com>2016-07-28 14:15:55 +0200
commit5f0d290de700ddffa6750e95344fdc9fb49301db (patch)
tree4ec75b4a20074e8aaa11d2c923f822244c4d0eac /Usb-Driver/Makefile
parent13b0ae6f160b0551edaee913d791607fd0cc3e4e (diff)
src: can-lin: Usb-Driver: prepare directory for yocto build
This patch cleans the Usb-Driver directory. It removes files not needed for the build process and fixes the Makefile. The patch is needed for bitbake to fetch the source and compile the kernel module. Change-Id: I7748629d5c5b9a2cfcc3c6db63e64a10270fd77d Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Diffstat (limited to 'Usb-Driver/Makefile')
-rw-r--r--Usb-Driver/Makefile41
1 files changed, 8 insertions, 33 deletions
diff --git a/Usb-Driver/Makefile b/Usb-Driver/Makefile
index 406b187..fd82dbc 100644
--- a/Usb-Driver/Makefile
+++ b/Usb-Driver/Makefile
@@ -1,42 +1,17 @@
-# set your module name here
-# provide the following files
+# Makefile
#
-# MODULENAME.c the driver
-# MODULENAME.h the include file
-# MODULENAME_test.c the driver test program
-# MODULENAME_test.sh the driver test script
-#
-MODULENAME := mocca-usb
-### should not need to change stuff below ######################
+SRC := $(shell pwd)
-# KDIR := /lib/modules/$(shell uname -r)/build
-#KDIR := /home/me/arm/linux-2.6.35.9/
-PWD := $(shell pwd)
-CC := ${CROSS_COMPILE}gcc -Wall
+obj-m += mocca_usb.o
+CFLAGS_hdm_usb.o := -I$(src)/../../aim-network/files/ -I$(src)/../../mostcore/files
-ifeq ($(KERNELRELEASE),)
all:
- $(MAKE) V=0 -C $(KDIR) SUBDIRS=$(PWD) modules
-else
- obj-m := $(MODULENAME).o
-endif
-
-
-load: all
- ssh root@10.0.0.3 'echo 0x46 > /sys/bus/i2c/devices/i2c-0/delete_device; rmmod /home/matrix/$(MODULENAME).ko'
- scp $(MODULENAME).ko root@10.0.0.3:/home/matrix
- ssh root@10.0.0.3 'insmod /home/matrix/$(MODULENAME).ko; echo k2l-i2c-0 0x46 > /sys/bus/i2c/devices/i2c-0/new_device'
+ $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules
-unload:
- ssh root@10.0.0.3 'echo 0x46 > /sys/bus/i2c/devices/i2c-0/delete_device; rmmod /home/matrix/$(MODULENAME).ko'
-
-test: all
+modules_install:
+ $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
clean:
- -rm -f *.o *.ko modules.order Module.symvers *.mod.c .*.cmd $(MODULENAME)_test
- -rm -rf .tmp_versions
-
-copy:
- scp $(MODULENAME).ko root@10.0.0.3:/home/matrix
+ $(MAKE) -C $(KERNEL_SRC) M=$(SRC) clean