Greg Kroah-Hartman | de536e3 | 2014-08-31 16:17:04 -0700 | [diff] [blame] | 1 | greybus-y := core.o \ |
Greg Kroah-Hartman | de536e3 | 2014-08-31 16:17:04 -0700 | [diff] [blame] | 2 | debugfs.o \ |
| 3 | ap.o \ |
Alex Elder | b09c94a | 2014-10-01 21:54:16 -0500 | [diff] [blame] | 4 | manifest.o \ |
Greg Kroah-Hartman | df67155 | 2014-12-21 14:10:26 -0800 | [diff] [blame] | 5 | module.o \ |
Greg Kroah-Hartman | a93938a | 2014-12-19 14:56:30 -0800 | [diff] [blame] | 6 | interface.o \ |
Greg Kroah-Hartman | 3bdec69 | 2014-12-12 17:10:16 -0500 | [diff] [blame] | 7 | bundle.o \ |
Alex Elder | c68adb2 | 2014-10-01 21:54:14 -0500 | [diff] [blame] | 8 | connection.o \ |
Alex Elder | 4ccb6b7 | 2014-10-28 19:36:00 -0500 | [diff] [blame] | 9 | protocol.o \ |
Greg Kroah-Hartman | e1308c1 | 2014-12-24 13:01:43 -0800 | [diff] [blame] | 10 | operation.o |
| 11 | |
Greg Kroah-Hartman | 71479f6 | 2015-01-14 17:07:59 -0800 | [diff] [blame] | 12 | gb-phy-y := gpb.o \ |
Viresh Kumar | 5357cf3 | 2015-01-21 16:10:40 +0530 | [diff] [blame] | 13 | sdio.o \ |
| 14 | uart.o \ |
| 15 | pwm.o \ |
| 16 | gpio.o \ |
Viresh Kumar | 96eab77 | 2015-03-16 16:49:37 +0530 | [diff] [blame] | 17 | hid.o \ |
Viresh Kumar | 5357cf3 | 2015-01-21 16:10:40 +0530 | [diff] [blame] | 18 | i2c.o \ |
Viresh Kumar | 15d651b | 2015-01-23 13:07:45 +0530 | [diff] [blame] | 19 | spi.o \ |
Viresh Kumar | 5357cf3 | 2015-01-21 16:10:40 +0530 | [diff] [blame] | 20 | usb.o |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 21 | |
Viresh Kumar | 98abb41 | 2015-01-21 16:10:41 +0530 | [diff] [blame] | 22 | # Prefix all modules with gb- |
| 23 | gb-vibrator-y := vibrator.o |
| 24 | gb-battery-y := battery.o |
Alexandre Bailon | 355a705 | 2015-03-31 09:51:59 +0200 | [diff] [blame^] | 25 | gb-loopback-y := loopback.o |
Viresh Kumar | 98abb41 | 2015-01-21 16:10:41 +0530 | [diff] [blame] | 26 | gb-es1-y := es1.o |
| 27 | gb-es2-y := es2.o |
| 28 | |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 29 | obj-m += greybus.o |
Greg Kroah-Hartman | 71479f6 | 2015-01-14 17:07:59 -0800 | [diff] [blame] | 30 | obj-m += gb-phy.o |
Greg Kroah-Hartman | 419a8cf | 2015-01-14 17:08:00 -0800 | [diff] [blame] | 31 | obj-m += gb-vibrator.o |
Greg Kroah-Hartman | 347fedb | 2015-01-14 17:08:01 -0800 | [diff] [blame] | 32 | obj-m += gb-battery.o |
Alexandre Bailon | 355a705 | 2015-03-31 09:51:59 +0200 | [diff] [blame^] | 33 | obj-m += gb-loopback.o |
Greg Kroah-Hartman | 60a7ad7 | 2015-01-14 17:08:02 -0800 | [diff] [blame] | 34 | obj-m += gb-es1.o |
Greg Kroah-Hartman | f587027 | 2015-01-21 10:24:15 +0800 | [diff] [blame] | 35 | obj-m += gb-es2.o |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 36 | |
| 37 | KERNELVER ?= $(shell uname -r) |
| 38 | KERNELDIR ?= /lib/modules/$(KERNELVER)/build |
| 39 | PWD := $(shell pwd) |
| 40 | |
Greg Kroah-Hartman | 7486dfd | 2014-11-19 19:09:53 -0800 | [diff] [blame] | 41 | # add -Wall to try to catch everything we can. |
| 42 | ccFlags-y := -Wall |
| 43 | |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 44 | all: module |
| 45 | |
| 46 | module: |
| 47 | $(MAKE) -C $(KERNELDIR) M=$(PWD) |
| 48 | |
Greg Kroah-Hartman | ac7171e | 2014-09-13 12:39:23 -0700 | [diff] [blame] | 49 | check: |
| 50 | $(MAKE) -C $(KERNELDIR) M=$(PWD) C=2 CF="-D__CHECK_ENDIAN__" |
| 51 | |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 52 | clean: |
| 53 | rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c |
| 54 | rm -f Module.markers Module.symvers modules.order |
| 55 | rm -rf .tmp_versions Modules.symvers |
| 56 | |
| 57 | coccicheck: |
| 58 | $(MAKE) -C $(KERNELDIR) M=$(PWD) coccicheck |
| 59 | |
Greg Kroah-Hartman | 025677d | 2015-01-14 14:55:24 -0800 | [diff] [blame] | 60 | install: module |
| 61 | mkdir -p /lib/modules/$(KERNELVER)/kernel/drivers/greybus/ |
| 62 | cp -f *.ko /lib/modules/$(KERNELVER)/kernel/drivers/greybus/ |
| 63 | depmod -a $(KERNELVER) |