1#
2# Makefile for USB peripheral controller and gadget drivers
3# for kbuild 2.4
4#
5
6# for static linking
7O_TARGET	:= built-in.o
8
9list-multi			:= g_zero.o g_ether.o g_file_storage.o
10
11obj-$(CONFIG_USB_NET2280)	+= net2280.o
12obj-$(CONFIG_USB_GOKU)		+= goku_udc.o
13
14# only one of these may be statically linked ...
15controller-$(CONFIG_USB_NET2280)	+= net2280.o
16controller-$(CONFIG_USB_GOKU)		+= goku_udc.o
17
18# ... and only one of these, too; kbuild/kconfig don't help though.
19g_zero-objs			:= zero.o usbstring.o config.o epautoconf.o
20obj-$(CONFIG_USB_ZERO)		+= g_zero.o
21
22g_ether-objs			:= ether.o usbstring.o config.o epautoconf.o
23ifeq ($(CONFIG_USB_ETH_RNDIS),y)
24	g_ether-objs            += rndis.o
25endif
26obj-$(CONFIG_USB_ETH)		+= g_ether.o
27
28g_file_storage-objs		:= file_storage.o usbstring.o config.o \
29						epautoconf.o
30obj-$(CONFIG_USB_FILE_STORAGE)	+= g_file_storage.o
31
32export-objs :=			$(controller-y) $(controller-m)
33
34include $(TOPDIR)/Rules.make
35
36g_zero.o: $(g_zero-objs)
37	$(LD) -r -o $@ $(g_zero-objs)
38g_ether.o: $(g_ether-objs)
39	$(LD) -r -o $@ $(g_ether-objs)
40g_file_storage.o: $(g_file_storage-objs)
41	$(LD) -r -o $@ $(g_file_storage-objs)
42