]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/usb/host/dwc_otg/Makefile
Add dwc_otg driver
[mirror_ubuntu-artful-kernel.git] / drivers / usb / host / dwc_otg / Makefile
1 #
2 # Makefile for DWC_otg Highspeed USB controller driver
3 #
4
5 ifneq ($(KERNELRELEASE),)
6
7 # Use the BUS_INTERFACE variable to compile the software for either
8 # PCI(PCI_INTERFACE) or LM(LM_INTERFACE) bus.
9 ifeq ($(BUS_INTERFACE),)
10 # BUS_INTERFACE = -DPCI_INTERFACE
11 # BUS_INTERFACE = -DLM_INTERFACE
12 BUS_INTERFACE = -DPLATFORM_INTERFACE
13 endif
14
15 #ccflags-y += -DDEBUG
16 #ccflags-y += -DDWC_OTG_DEBUGLEV=1 # reduce common debug msgs
17
18 # Use one of the following flags to compile the software in host-only or
19 # device-only mode.
20 #ccflags-y += -DDWC_HOST_ONLY
21 #ccflags-y += -DDWC_DEVICE_ONLY
22
23 ccflags-y += -Dlinux -DDWC_HS_ELECT_TST
24 #ccflags-y += -DDWC_EN_ISOC
25 ccflags-y += -I$(obj)/../dwc_common_port
26 #ccflags-y += -I$(PORTLIB)
27 ccflags-y += -DDWC_LINUX
28 ccflags-y += $(CFI)
29 ccflags-y += $(BUS_INTERFACE)
30 #ccflags-y += -DDWC_DEV_SRPCAP
31
32 obj-$(CONFIG_USB_DWCOTG) += dwc_otg.o
33
34 dwc_otg-objs := dwc_otg_driver.o dwc_otg_attr.o
35 dwc_otg-objs += dwc_otg_cil.o dwc_otg_cil_intr.o
36 dwc_otg-objs += dwc_otg_pcd_linux.o dwc_otg_pcd.o dwc_otg_pcd_intr.o
37 dwc_otg-objs += dwc_otg_hcd.o dwc_otg_hcd_linux.o dwc_otg_hcd_intr.o dwc_otg_hcd_queue.o dwc_otg_hcd_ddma.o
38 dwc_otg-objs += dwc_otg_adp.o
39 dwc_otg-objs += dwc_otg_fiq_fsm.o
40 dwc_otg-objs += dwc_otg_fiq_stub.o
41 ifneq ($(CFI),)
42 dwc_otg-objs += dwc_otg_cfi.o
43 endif
44
45 kernrelwd := $(subst ., ,$(KERNELRELEASE))
46 kernrel3 := $(word 1,$(kernrelwd)).$(word 2,$(kernrelwd)).$(word 3,$(kernrelwd))
47
48 ifneq ($(kernrel3),2.6.20)
49 ccflags-y += $(CPPFLAGS)
50 endif
51
52 else
53
54 PWD := $(shell pwd)
55 PORTLIB := $(PWD)/../dwc_common_port
56
57 # Command paths
58 CTAGS := $(CTAGS)
59 DOXYGEN := $(DOXYGEN)
60
61 default: portlib
62 $(MAKE) -C$(KDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules
63
64 install: default
65 $(MAKE) -C$(KDIR) M=$(PORTLIB) modules_install
66 $(MAKE) -C$(KDIR) M=$(PWD) modules_install
67
68 portlib:
69 $(MAKE) -C$(KDIR) M=$(PORTLIB) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules
70 cp $(PORTLIB)/Module.symvers $(PWD)/
71
72 docs: $(wildcard *.[hc]) doc/doxygen.cfg
73 $(DOXYGEN) doc/doxygen.cfg
74
75 tags: $(wildcard *.[hc])
76 $(CTAGS) -e $(wildcard *.[hc]) $(wildcard linux/*.[hc]) $(wildcard $(KDIR)/include/linux/usb*.h)
77
78
79 clean:
80 rm -rf *.o *.ko .*cmd *.mod.c .tmp_versions Module.symvers
81
82 endif