usb: gadget: Clean up Makefile ifdeffery
Take the USB_ETHER ifdef block apart and make use of obj-$(VAR) instead to include the source files in build. The duplicate CI_UDC entry is now removed, the USB_DEVICE ifdef is now reduced to core.o ep.o addition, the ether.o can be conditionally compiled in using USB_ETHER. No functional change. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
This commit is contained in:
		
							parent
							
								
									fcb670b794
								
							
						
					
					
						commit
						7cc1af902d
					
				| 
						 | 
					@ -21,7 +21,6 @@ obj-$(CONFIG_USB_GADGET_DWC2_OTG) += dwc2_udc_otg.o
 | 
				
			||||||
obj-$(CONFIG_USB_GADGET_DWC2_OTG_PHY) += dwc2_udc_otg_phy.o
 | 
					obj-$(CONFIG_USB_GADGET_DWC2_OTG_PHY) += dwc2_udc_otg_phy.o
 | 
				
			||||||
obj-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
 | 
					obj-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
 | 
				
			||||||
obj-$(CONFIG_USB_GADGET_MAX3420) += max3420_udc.o
 | 
					obj-$(CONFIG_USB_GADGET_MAX3420) += max3420_udc.o
 | 
				
			||||||
obj-$(CONFIG_CI_UDC)	+= ci_udc.o
 | 
					 | 
				
			||||||
ifndef CONFIG_SPL_BUILD
 | 
					ifndef CONFIG_SPL_BUILD
 | 
				
			||||||
obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o
 | 
					obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o
 | 
				
			||||||
obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o
 | 
					obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o
 | 
				
			||||||
| 
						 | 
					@ -33,14 +32,12 @@ obj-$(CONFIG_USB_FUNCTION_ROCKUSB) += f_rockusb.o
 | 
				
			||||||
obj-$(CONFIG_USB_FUNCTION_ACM)	+= f_acm.o
 | 
					obj-$(CONFIG_USB_FUNCTION_ACM)	+= f_acm.o
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
ifdef CONFIG_USB_ETHER
 | 
					
 | 
				
			||||||
obj-y += ether.o
 | 
					obj-$(CONFIG_CI_UDC) += ci_udc.o
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					obj-$(CONFIG_USB_ETHER) += ether.o
 | 
				
			||||||
obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
 | 
					obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
 | 
				
			||||||
obj-$(CONFIG_CI_UDC)	+= ci_udc.o
 | 
					
 | 
				
			||||||
else
 | 
					 | 
				
			||||||
# Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
 | 
					# Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
 | 
				
			||||||
ifdef CONFIG_USB_DEVICE
 | 
					# This is really only N900 and USBTTY now.
 | 
				
			||||||
obj-y += core.o
 | 
					obj-$(CONFIG_USB_DEVICE) += core.o ep0.o
 | 
				
			||||||
obj-y += ep0.o
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue