diff options
author | Michal Marek <mmarek@suse.cz> | 2015-01-21 08:07:10 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-01-21 16:23:20 -0500 |
commit | 86312e4b78647d9fa62cf2293c50161cc0421d30 (patch) | |
tree | 4d1fe7438bddff9479a2382ccf46794a09d276a1 | |
parent | 5e7e9e90b5867a3754159a8ce524299d930fbac8 (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/Makefile | 49 | ||||
-rw-r--r-- | drivers/hid/usbhid/Makefile | 12 |
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 | # |
4 | hid-y := hid-core.o hid-input.o | 4 | hid-y := hid-core.o hid-input.o |
5 | 5 | hid-$(CONFIG_DEBUG_FS) += hid-debug.o | |
6 | ifdef CONFIG_DEBUG_FS | ||
7 | hid-objs += hid-debug.o | ||
8 | endif | ||
9 | 6 | ||
10 | obj-$(CONFIG_HID) += hid.o | 7 | obj-$(CONFIG_HID) += hid.o |
11 | obj-$(CONFIG_UHID) += uhid.o | 8 | obj-$(CONFIG_UHID) += uhid.o |
@@ -15,23 +12,13 @@ obj-$(CONFIG_HID_GENERIC) += hid-generic.o | |||
15 | hid-$(CONFIG_HIDRAW) += hidraw.o | 12 | hid-$(CONFIG_HIDRAW) += hidraw.o |
16 | 13 | ||
17 | hid-logitech-y := hid-lg.o | 14 | hid-logitech-y := hid-lg.o |
18 | ifdef CONFIG_LOGITECH_FF | 15 | hid-logitech-$(CONFIG_LOGITECH_FF) += hid-lgff.o |
19 | hid-logitech-y += hid-lgff.o | 16 | hid-logitech-$(CONFIG_LOGIRUMBLEPAD2_FF) += hid-lg2ff.o |
20 | endif | 17 | hid-logitech-$(CONFIG_LOGIG940_FF) += hid-lg3ff.o |
21 | ifdef CONFIG_LOGIRUMBLEPAD2_FF | 18 | hid-logitech-$(CONFIG_LOGIWHEELS_FF) += hid-lg4ff.o |
22 | hid-logitech-y += hid-lg2ff.o | ||
23 | endif | ||
24 | ifdef CONFIG_LOGIG940_FF | ||
25 | hid-logitech-y += hid-lg3ff.o | ||
26 | endif | ||
27 | ifdef CONFIG_LOGIWHEELS_FF | ||
28 | hid-logitech-y += hid-lg4ff.o | ||
29 | endif | ||
30 | 19 | ||
31 | hid-wiimote-y := hid-wiimote-core.o hid-wiimote-modules.o | 20 | hid-wiimote-y := hid-wiimote-core.o hid-wiimote-modules.o |
32 | ifdef CONFIG_DEBUG_FS | 21 | hid-wiimote-$(CONFIG_DEBUG_FS) += hid-wiimote-debug.o |
33 | hid-wiimote-y += hid-wiimote-debug.o | ||
34 | endif | ||
35 | 22 | ||
36 | obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o | 23 | obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o |
37 | obj-$(CONFIG_HID_ACRUX) += hid-axff.o | 24 | obj-$(CONFIG_HID_ACRUX) += hid-axff.o |
@@ -76,24 +63,12 @@ obj-$(CONFIG_HID_PENMOUNT) += hid-penmount.o | |||
76 | obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o | 63 | obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o |
77 | obj-$(CONFIG_HID_PICOLCD) += hid-picolcd.o | 64 | obj-$(CONFIG_HID_PICOLCD) += hid-picolcd.o |
78 | hid-picolcd-y += hid-picolcd_core.o | 65 | hid-picolcd-y += hid-picolcd_core.o |
79 | ifdef CONFIG_HID_PICOLCD_FB | 66 | hid-picolcd-$(CONFIG_HID_PICOLCD_FB) += hid-picolcd_fb.o |
80 | hid-picolcd-y += hid-picolcd_fb.o | 67 | hid-picolcd-$(CONFIG_HID_PICOLCD_BACKLIGHT) += hid-picolcd_backlight.o |
81 | endif | 68 | hid-picolcd-$(CONFIG_HID_PICOLCD_LCD) += hid-picolcd_lcd.o |
82 | ifdef CONFIG_HID_PICOLCD_BACKLIGHT | 69 | hid-picolcd-$(CONFIG_HID_PICOLCD_LEDS) += hid-picolcd_leds.o |
83 | hid-picolcd-y += hid-picolcd_backlight.o | 70 | hid-picolcd-$(CONFIG_HID_PICOLCD_CIR) += hid-picolcd_cir.o |
84 | endif | 71 | hid-picolcd-$(CONFIG_DEBUG_FS) += hid-picolcd_debugfs.o |
85 | ifdef CONFIG_HID_PICOLCD_LCD | ||
86 | hid-picolcd-y += hid-picolcd_lcd.o | ||
87 | endif | ||
88 | ifdef CONFIG_HID_PICOLCD_LEDS | ||
89 | hid-picolcd-y += hid-picolcd_leds.o | ||
90 | endif | ||
91 | ifdef CONFIG_HID_PICOLCD_CIR | ||
92 | hid-picolcd-y += hid-picolcd_cir.o | ||
93 | endif | ||
94 | ifdef CONFIG_DEBUG_FS | ||
95 | hid-picolcd-y += hid-picolcd_debugfs.o | ||
96 | endif | ||
97 | 72 | ||
98 | obj-$(CONFIG_HID_PLANTRONICS) += hid-plantronics.o | 73 | obj-$(CONFIG_HID_PLANTRONICS) += hid-plantronics.o |
99 | obj-$(CONFIG_HID_PRIMAX) += hid-primax.o | 74 | obj-$(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. | ||
6 | usbhid-y := hid-core.o hid-quirks.o | 5 | usbhid-y := hid-core.o hid-quirks.o |
7 | 6 | usbhid-$(CONFIG_USB_HIDDEV) += hiddev.o | |
8 | # Optional parts of multipart objects. | 7 | usbhid-$(CONFIG_HID_PID) += hid-pidff.o |
9 | |||
10 | ifeq ($(CONFIG_USB_HIDDEV),y) | ||
11 | usbhid-y += hiddev.o | ||
12 | endif | ||
13 | ifeq ($(CONFIG_HID_PID),y) | ||
14 | usbhid-y += hid-pidff.o | ||
15 | endif | ||
16 | 8 | ||
17 | obj-$(CONFIG_USB_HID) += usbhid.o | 9 | obj-$(CONFIG_USB_HID) += usbhid.o |
18 | obj-$(CONFIG_USB_KBD) += usbkbd.o | 10 | obj-$(CONFIG_USB_KBD) += usbkbd.o |