Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / drivers / usb / host / dwc_common_port / Makefile
1 #
2 # Makefile for DWC_common library
3 #
4
5 ifneq ($(KERNELRELEASE),)
6
7 ccflags-y       += -DDWC_LINUX
8 #ccflags-y      += -DDEBUG
9 #ccflags-y      += -DDWC_DEBUG_REGS
10 #ccflags-y      += -DDWC_DEBUG_MEMORY
11
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
17
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
22
23 kernrelwd := $(subst ., ,$(KERNELRELEASE))
24 kernrel3 := $(word 1,$(kernrelwd)).$(word 2,$(kernrelwd)).$(word 3,$(kernrelwd))
25
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)
29 endif
30
31 else
32
33 #ifeq ($(KDIR),)
34 #$(error Must give "KDIR=/path/to/kernel/source" on command line or in environment)
35 #endif
36
37 ifeq ($(ARCH),)
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-")
40 endif
41
42 ifeq ($(DOXYGEN),)
43 DOXYGEN         := doxygen
44 endif
45
46 default:
47         $(MAKE) -C$(KDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules
48
49 docs:   $(wildcard *.[hc]) doc/doxygen.cfg
50         $(DOXYGEN) doc/doxygen.cfg
51
52 tags:   $(wildcard *.[hc])
53         $(CTAGS) -e $(wildcard *.[hc]) $(wildcard linux/*.[hc]) $(wildcard $(KDIR)/include/linux/usb*.h)
54
55 endif
56
57 clean:
58         rm -rf *.o *.ko .*.cmd *.mod.c .*.o.d .*.o.tmp modules.order Module.markers Module.symvers .tmp_versions/