aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2015-01-21 08:07:10 -0500
committerJiri Kosina <jkosina@suse.cz>2015-01-21 16:23:20 -0500
commit86312e4b78647d9fa62cf2293c50161cc0421d30 (patch)
tree4d1fe7438bddff9479a2382ccf46794a09d276a1
parent5e7e9e90b5867a3754159a8ce524299d930fbac8 (diff)
HID: Use Kbuild idiom in Makefiles
Use <driver>-$(CONFIG_FOO) syntax to build multipart objects with optional parts, since all the config options are bool. Also, delete the obvious comments in the usbhid Makefile. Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/Makefile49
-rw-r--r--drivers/hid/usbhid/Makefile12
2 files changed, 14 insertions, 47 deletions
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
index debd15b44b59..11a370878a64 100644
--- a/drivers/hid/Makefile
+++ b/drivers/hid/Makefile
@@ -2,10 +2,7 @@
2# Makefile for the HID driver 2# Makefile for the HID driver
3# 3#
4hid-y := hid-core.o hid-input.o 4hid-y := hid-core.o hid-input.o
5 5hid-$(CONFIG_DEBUG_FS) += hid-debug.o
6ifdef CONFIG_DEBUG_FS
7 hid-objs += hid-debug.o
8endif
9 6
10obj-$(CONFIG_HID) += hid.o 7obj-$(CONFIG_HID) += hid.o
11obj-$(CONFIG_UHID) += uhid.o 8obj-$(CONFIG_UHID) += uhid.o
@@ -15,23 +12,13 @@ obj-$(CONFIG_HID_GENERIC) += hid-generic.o
15hid-$(CONFIG_HIDRAW) += hidraw.o 12hid-$(CONFIG_HIDRAW) += hidraw.o
16 13
17hid-logitech-y := hid-lg.o 14hid-logitech-y := hid-lg.o
18ifdef CONFIG_LOGITECH_FF 15hid-logitech-$(CONFIG_LOGITECH_FF) += hid-lgff.o
19 hid-logitech-y += hid-lgff.o 16hid-logitech-$(CONFIG_LOGIRUMBLEPAD2_FF) += hid-lg2ff.o
20endif 17hid-logitech-$(CONFIG_LOGIG940_FF) += hid-lg3ff.o
21ifdef CONFIG_LOGIRUMBLEPAD2_FF 18hid-logitech-$(CONFIG_LOGIWHEELS_FF) += hid-lg4ff.o
22 hid-logitech-y += hid-lg2ff.o
23endif
24ifdef CONFIG_LOGIG940_FF
25 hid-logitech-y += hid-lg3ff.o
26endif
27ifdef CONFIG_LOGIWHEELS_FF
28 hid-logitech-y += hid-lg4ff.o
29endif
30 19
31hid-wiimote-y := hid-wiimote-core.o hid-wiimote-modules.o 20hid-wiimote-y := hid-wiimote-core.o hid-wiimote-modules.o
32ifdef CONFIG_DEBUG_FS 21hid-wiimote-$(CONFIG_DEBUG_FS) += hid-wiimote-debug.o
33 hid-wiimote-y += hid-wiimote-debug.o
34endif
35 22
36obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o 23obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o
37obj-$(CONFIG_HID_ACRUX) += hid-axff.o 24obj-$(CONFIG_HID_ACRUX) += hid-axff.o
@@ -76,24 +63,12 @@ obj-$(CONFIG_HID_PENMOUNT) += hid-penmount.o
76obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o 63obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o
77obj-$(CONFIG_HID_PICOLCD) += hid-picolcd.o 64obj-$(CONFIG_HID_PICOLCD) += hid-picolcd.o
78hid-picolcd-y += hid-picolcd_core.o 65hid-picolcd-y += hid-picolcd_core.o
79ifdef CONFIG_HID_PICOLCD_FB 66hid-picolcd-$(CONFIG_HID_PICOLCD_FB) += hid-picolcd_fb.o
80hid-picolcd-y += hid-picolcd_fb.o 67hid-picolcd-$(CONFIG_HID_PICOLCD_BACKLIGHT) += hid-picolcd_backlight.o
81endif 68hid-picolcd-$(CONFIG_HID_PICOLCD_LCD) += hid-picolcd_lcd.o
82ifdef CONFIG_HID_PICOLCD_BACKLIGHT 69hid-picolcd-$(CONFIG_HID_PICOLCD_LEDS) += hid-picolcd_leds.o
83hid-picolcd-y += hid-picolcd_backlight.o 70hid-picolcd-$(CONFIG_HID_PICOLCD_CIR) += hid-picolcd_cir.o
84endif 71hid-picolcd-$(CONFIG_DEBUG_FS) += hid-picolcd_debugfs.o
85ifdef CONFIG_HID_PICOLCD_LCD
86hid-picolcd-y += hid-picolcd_lcd.o
87endif
88ifdef CONFIG_HID_PICOLCD_LEDS
89hid-picolcd-y += hid-picolcd_leds.o
90endif
91ifdef CONFIG_HID_PICOLCD_CIR
92hid-picolcd-y += hid-picolcd_cir.o
93endif
94ifdef CONFIG_DEBUG_FS
95hid-picolcd-y += hid-picolcd_debugfs.o
96endif
97 72
98obj-$(CONFIG_HID_PLANTRONICS) += hid-plantronics.o 73obj-$(CONFIG_HID_PLANTRONICS) += hid-plantronics.o
99obj-$(CONFIG_HID_PRIMAX) += hid-primax.o 74obj-$(CONFIG_HID_PRIMAX) += hid-primax.o
diff --git a/drivers/hid/usbhid/Makefile b/drivers/hid/usbhid/Makefile
index db3cf31c6fa1..890f2914a8ff 100644
--- a/drivers/hid/usbhid/Makefile
+++ b/drivers/hid/usbhid/Makefile
@@ -2,17 +2,9 @@
2# Makefile for the USB input drivers 2# Makefile for the USB input drivers
3# 3#
4 4
5# Multipart objects.
6usbhid-y := hid-core.o hid-quirks.o 5usbhid-y := hid-core.o hid-quirks.o
7 6usbhid-$(CONFIG_USB_HIDDEV) += hiddev.o
8# Optional parts of multipart objects. 7usbhid-$(CONFIG_HID_PID) += hid-pidff.o
9
10ifeq ($(CONFIG_USB_HIDDEV),y)
11 usbhid-y += hiddev.o
12endif
13ifeq ($(CONFIG_HID_PID),y)
14 usbhid-y += hid-pidff.o
15endif
16 8
17obj-$(CONFIG_USB_HID) += usbhid.o 9obj-$(CONFIG_USB_HID) += usbhid.o
18obj-$(CONFIG_USB_KBD) += usbkbd.o 10obj-$(CONFIG_USB_KBD) += usbkbd.o