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