2 # Makefile for DWC_common library
5 ifneq ($(KERNELRELEASE),)
7 ccflags-y += -DDWC_LINUX
9 #ccflags-y += -DDWC_DEBUG_REGS
10 #ccflags-y += -DDWC_DEBUG_MEMORY
12 ccflags-y += -DDWC_LIBMODULE
13 ccflags-y += -DDWC_CCLIB
14 #ccflags-y += -DDWC_CRYPTOLIB
15 ccflags-y += -DDWC_NOTIFYLIB
16 ccflags-y += -DDWC_UTFLIB
18 obj-$(CONFIG_USB_DWCOTG) += dwc_common_port_lib.o
19 dwc_common_port_lib-objs := dwc_cc.o dwc_modpow.o dwc_dh.o \
20 dwc_crypto.o dwc_notifier.o \
21 dwc_common_linux.o dwc_mem.o
23 kernrelwd := $(subst ., ,$(KERNELRELEASE))
24 kernrel3 := $(word 1,$(kernrelwd)).$(word 2,$(kernrelwd)).$(word 3,$(kernrelwd))
26 ifneq ($(kernrel3),2.6.20)
27 # grayg - I only know that we use ccflags-y in 2.6.31 actually
28 ccflags-y += $(CPPFLAGS)
34 #$(error Must give "KDIR=/path/to/kernel/source" on command line or in environment)
38 $(error Must give "ARCH=<arch>" on command line or in environment. Also, if \
39 cross-compiling, must give "CROSS_COMPILE=/path/to/compiler/plus/tool-prefix-")
47 $(MAKE) -C$(KDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules
49 docs: $(wildcard *.[hc]) doc/doxygen.cfg
50 $(DOXYGEN) doc/doxygen.cfg
52 tags: $(wildcard *.[hc])
53 $(CTAGS) -e $(wildcard *.[hc]) $(wildcard linux/*.[hc]) $(wildcard $(KDIR)/include/linux/usb*.h)
58 rm -rf *.o *.ko .*.cmd *.mod.c .*.o.d .*.o.tmp modules.order Module.markers Module.symvers .tmp_versions/