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 \ |
Greg Kroah-Hartman | de536e3 | 2014-08-31 16:17:04 -0700 | [diff] [blame] | 13 | sdio-gb.o \ |
Greg Kroah-Hartman | 33ea3a3 | 2014-09-07 15:39:34 -0700 | [diff] [blame] | 14 | uart-gb.o \ |
Greg Kroah-Hartman | e1308c1 | 2014-12-24 13:01:43 -0800 | [diff] [blame] | 15 | pwm-gb.o \ |
| 16 | gpio-gb.o \ |
Greg Kroah-Hartman | 2c07817 | 2014-12-24 13:01:44 -0800 | [diff] [blame] | 17 | i2c-gb.o \ |
Greg Kroah-Hartman | 615772a | 2014-11-25 16:59:21 -0800 | [diff] [blame] | 18 | usb-gb.o |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 19 | |
| 20 | obj-m += greybus.o |
Greg Kroah-Hartman | 71479f6 | 2015-01-14 17:07:59 -0800 | [diff] [blame] | 21 | obj-m += gb-phy.o |
Greg Kroah-Hartman | 419a8cf | 2015-01-14 17:08:00 -0800 | [diff] [blame^] | 22 | obj-m += gb-vibrator.o |
Greg Kroah-Hartman | 7dd2626 | 2014-12-24 13:01:42 -0800 | [diff] [blame] | 23 | obj-m += battery-gb.o |
Greg Kroah-Hartman | ba4468d4 | 2014-08-30 17:06:54 -0700 | [diff] [blame] | 24 | obj-m += es1-ap-usb.o |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 25 | |
| 26 | KERNELVER ?= $(shell uname -r) |
| 27 | KERNELDIR ?= /lib/modules/$(KERNELVER)/build |
| 28 | PWD := $(shell pwd) |
| 29 | |
Greg Kroah-Hartman | 7486dfd | 2014-11-19 19:09:53 -0800 | [diff] [blame] | 30 | # add -Wall to try to catch everything we can. |
| 31 | ccFlags-y := -Wall |
| 32 | |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 33 | all: module |
| 34 | |
| 35 | module: |
| 36 | $(MAKE) -C $(KERNELDIR) M=$(PWD) |
| 37 | |
Greg Kroah-Hartman | ac7171e | 2014-09-13 12:39:23 -0700 | [diff] [blame] | 38 | check: |
| 39 | $(MAKE) -C $(KERNELDIR) M=$(PWD) C=2 CF="-D__CHECK_ENDIAN__" |
| 40 | |
Greg Kroah-Hartman | c8a797a | 2014-08-11 15:30:45 +0800 | [diff] [blame] | 41 | clean: |
| 42 | rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c |
| 43 | rm -f Module.markers Module.symvers modules.order |
| 44 | rm -rf .tmp_versions Modules.symvers |
| 45 | |
| 46 | coccicheck: |
| 47 | $(MAKE) -C $(KERNELDIR) M=$(PWD) coccicheck |
| 48 | |
Greg Kroah-Hartman | 025677d | 2015-01-14 14:55:24 -0800 | [diff] [blame] | 49 | install: module |
| 50 | mkdir -p /lib/modules/$(KERNELVER)/kernel/drivers/greybus/ |
| 51 | cp -f *.ko /lib/modules/$(KERNELVER)/kernel/drivers/greybus/ |
| 52 | depmod -a $(KERNELVER) |