2 # Makefile for DWC_common library
4 ifneq ($(KERNELRELEASE),)
6 ccflags-y += -DDWC_LINUX
8 #ccflags-y += -DDWC_DEBUG_REGS
9 #ccflags-y += -DDWC_DEBUG_MEMORY
11 ccflags-y += -DDWC_LIBMODULE
12 ccflags-y += -DDWC_CCLIB
13 ccflags-y += -DDWC_CRYPTOLIB
14 ccflags-y += -DDWC_NOTIFYLIB
15 ccflags-y += -DDWC_UTFLIB
17 obj-m := dwc_common_port_lib.o
18 dwc_common_port_lib-objs := dwc_cc.o dwc_modpow.o dwc_dh.o \
19 dwc_crypto.o dwc_notifier.o \
20 dwc_common_linux.o dwc_mem.o
25 $(error Must give "KDIR=/path/to/kernel/source" on command line or in environment)
29 $(error Must give "ARCH=<arch>" on command line or in environment. Also, if \
30 cross-compiling, must give "CROSS_COMPILE=/path/to/compiler/plus/tool-prefix-")
38 $(MAKE) -C$(KDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules
40 docs: $(wildcard *.[hc]) doc/doxygen.cfg
41 $(DOXYGEN) doc/doxygen.cfg
43 tags: $(wildcard *.[hc])
44 $(CTAGS) -e $(wildcard *.[hc]) $(wildcard linux/*.[hc]) $(wildcard $(KDIR)/include/linux/usb*.h)
49 rm -rf *.o *.ko .*.cmd *.mod.c .*.o.d .*.o.tmp modules.order Module.markers Module.symvers .tmp_versions/