2010-08-28 05:59:27 +08:00
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI) += dahdi.o
|
|
|
|
#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DUMMY) += dahdi_dummy.o
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC) += dahdi_dynamic.o
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_LOC) += dahdi_dynamic_loc.o
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_ETH) += dahdi_dynamic_eth.o
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_ETHMF) += dahdi_dynamic_ethmf.o
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_TRANSCODE) += dahdi_transcode.o
|
|
|
|
|
2012-01-04 06:44:43 +08:00
|
|
|
ifdef CONFIG_PCI
|
2013-06-25 04:22:18 +08:00
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_OCT612X) += oct612x/
|
2010-08-28 05:59:27 +08:00
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT4XXP) += wct4xxp/
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTC4XXP) += wctc4xxp/
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM24XXP) += wctdm24xxp/
|
2013-05-21 05:46:21 +08:00
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE13XP) += wcte13xp.o
|
|
|
|
|
2013-10-19 05:21:42 +08:00
|
|
|
wcte13xp-objs := wcte13xp-base.o wcxb_spi.o wcxb.o wcxb_flash.o
|
2013-06-25 04:22:18 +08:00
|
|
|
CFLAGS_wcte13xp-base.o += -I$(src)/oct612x -I$(src)/oct612x/include -I$(src)/oct612x/octdeviceapi -I$(src)/oct612x/octdeviceapi/oct6100api
|
2013-05-21 05:46:21 +08:00
|
|
|
ifeq ($(HOTPLUG_FIRMWARE),yes)
|
|
|
|
CFLAGS_wcte13xp-base.o += -DHOTPLUG_FIRMWARE
|
2013-09-11 04:54:33 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE43X) += wcte43x.o
|
|
|
|
|
|
|
|
wcte43x-objs := wcte43x-base.o wcxb_spi.o wcxb.o wcxb_flash.o
|
|
|
|
CFLAGS_wcte43x-base.o += -I$(src)/oct612x -I$(src)/oct612x/include -I$(src)/oct612x/octdeviceapi -I$(src)/oct612x/octdeviceapi/oct6100api
|
|
|
|
ifeq ($(HOTPLUG_FIRMWARE),yes)
|
|
|
|
CFLAGS_wcte43x-base.o += -DHOTPLUG_FIRMWARE
|
|
|
|
endif
|
2013-07-02 00:09:10 +08:00
|
|
|
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCAXX) += wcaxx.o
|
|
|
|
|
|
|
|
wcaxx-objs := wcaxx-base.o wcxb_spi.o wcxb.o wcxb_flash.o
|
|
|
|
CFLAGS_wcaxx-base.o += -I$(src)/oct612x/ -I$(src)/oct612x/include -I$(src)/oct612x/octdeviceapi -I$(src)/oct612x/octdeviceapi/oct6100api
|
|
|
|
ifeq ($(HOTPLUG_FIRMWARE),yes)
|
|
|
|
CFLAGS_wcaxx-base.o += -DHOTPLUG_FIRMWARE
|
|
|
|
endif
|
2013-05-21 05:46:21 +08:00
|
|
|
|
2010-08-28 05:59:27 +08:00
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_VOICEBUS) += voicebus/
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCB4XXP) += wcb4xxp/
|
|
|
|
|
|
|
|
|
2012-01-04 06:44:43 +08:00
|
|
|
endif
|
2010-08-28 05:59:27 +08:00
|
|
|
|
2018-10-05 01:51:54 +08:00
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPP) += xpp/
|
2010-08-28 05:59:27 +08:00
|
|
|
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_JPAH) += dahdi_echocan_jpah.o
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_STEVE) += dahdi_echocan_sec.o
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_STEVE2) += dahdi_echocan_sec2.o
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_KB1) += dahdi_echocan_kb1.o
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_MG2) += dahdi_echocan_mg2.o
|
|
|
|
|
|
|
|
obj-m += $(DAHDI_MODULES_EXTRA)
|
|
|
|
|
2012-01-17 22:26:25 +08:00
|
|
|
# If you want to build OSLEC, include the code in the standard location:
|
|
|
|
# drivers/staging/echo . The DAHDI OSLEC echo canceller will be built as
|
|
|
|
# well:
|
|
|
|
ifneq (,$(wildcard $(src)/../staging/echo/echo.c))
|
|
|
|
obj-m += dahdi_echocan_oslec.o
|
2013-03-14 05:26:42 +08:00
|
|
|
obj-m += ../staging/echo/echo.o
|
2012-01-17 22:26:25 +08:00
|
|
|
endif
|
2010-08-28 05:59:27 +08:00
|
|
|
|
2018-08-10 11:27:40 +08:00
|
|
|
CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src) -Wno-format-truncation
|
2010-08-28 05:59:27 +08:00
|
|
|
|
|
|
|
ifndef HOTPLUG_FIRMWARE
|
|
|
|
ifneq (,$(filter y m,$(CONFIG_FW_LOADER)))
|
|
|
|
HOTPLUG_FIRMWARE := yes
|
|
|
|
else
|
|
|
|
HOTPLUG_FIRMWARE := no
|
|
|
|
endif
|
|
|
|
export HOTPLUG_FIRMWARE
|
|
|
|
endif
|
|
|
|
|
|
|
|
# fix typo present in CentOS and RHEL 2.6.9 kernels
|
|
|
|
BAD_KERNELS_VERS := 22 34 34.0.1 34.0.2
|
|
|
|
BAD_KERNELS := $(foreach ver,$(BAD_KERNELS_VERS),2.6.9-$(ver).EL 2.6.9-$(ver).ELsmp)
|
|
|
|
ifneq (,$(filter $(KVERS),$(BAD_KERNELS)))
|
|
|
|
EXTRA_CFLAGS+=-Drw_lock_t=rwlock_t
|
|
|
|
endif
|
|
|
|
|
|
|
|
# A number of Fedora 10 (9 also?) kernels backported hrtimer to 2.6.27
|
|
|
|
# as part of an ALSA backport. TODO: Any better way to detect that?
|
|
|
|
ifeq (1,$(shell fgrep -q ' hrtimer_set_expires' include/linux/hrtimer.h 2>/dev/null && echo 1))
|
|
|
|
EXTRA_CFLAGS+=-DHAVE_HRTIMER_ACCESSORS=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq (1,$(shell fgrep -q 'wait_for_completion_timeout' include/linux/completion.h 2>/dev/null && echo 1))
|
|
|
|
CFLAGS_MODULE+=-DHAVE_WAIT_FOR_COMPLETION_TIMEOUT=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
# In 2.6.18 skb_linearize changed; however, some distros backported the change
|
|
|
|
ifneq (,$(wildcard $(srctree)/include/linux/skbuff.h))
|
|
|
|
ifeq ($(shell grep "skb_linearize.*(.*, .* gfp)" $(srctree)/include/linux/skbuff.h),)
|
|
|
|
CFLAGS_dahdi_dynamic_eth.o := -DNEW_SKB_LINEARIZE
|
|
|
|
CFLAGS_dahdi_dynamic_ethmf.o := -DNEW_SKB_LINEARIZE
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2012-02-22 20:11:48 +08:00
|
|
|
dahdi-objs := dahdi-base.o dahdi-sysfs.o dahdi-sysfs-chan.o dahdi-version.o
|
2010-08-28 05:59:27 +08:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Find appropriate ARCH value for VPMADT032 and HPEC binary modules
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
ifeq ($(ARCH),i386)
|
|
|
|
DAHDI_ARCH=x86_32
|
|
|
|
else
|
|
|
|
ifeq ($(ARCH),x86_64)
|
|
|
|
DAHDI_ARCH=x86_64
|
|
|
|
else
|
|
|
|
ifeq ($(ARCH),x86)
|
|
|
|
ifeq ($(CONFIG_X86_32),y)
|
|
|
|
DAHDI_ARCH=x86_32
|
|
|
|
else
|
|
|
|
DAHDI_ARCH=x86_64
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
$(warning CPU Architecture '$(ARCH)' does not support VPMADT032 or HPEC. Skipping.)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# VPMADT032 Loader
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
dahdi_vpmadt032_loader-objs := vpmadt032_loader/dahdi_vpmadt032_loader.o
|
|
|
|
|
|
|
|
ifneq ($(DAHDI_ARCH),)
|
|
|
|
ifneq ($(wildcard $(src)/vpmadt032_loader/vpmadt032_$(DAHDI_ARCH).o_shipped),)
|
2020-11-17 12:01:23 +08:00
|
|
|
$(shell touch $(KBUILD_EXTMOD)/vpmadt032_loader/.vpmadt032_$(DAHDI_ARCH).o.cmd)
|
2010-08-28 05:59:27 +08:00
|
|
|
VPMADT032_LOADER_PRESENT=yes
|
|
|
|
dahdi_vpmadt032_loader-objs += vpmadt032_loader/vpmadt032_$(DAHDI_ARCH).o
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_VPMADT032_LOADER) += dahdi_vpmadt032_loader.o
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# HPEC Support
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
dahdi_echocan_hpec-objs := hpec/dahdi_echocan_hpec.o
|
|
|
|
CFLAGS_dahdi_echocan_hpec.o := -I$(src)/hpec
|
|
|
|
|
|
|
|
ifneq ($(DAHDI_ARCH),)
|
|
|
|
ifneq ($(wildcard $(src)/hpec/hpec_$(DAHDI_ARCH).o_shipped),)
|
|
|
|
HPEC_PRESENT=yes
|
|
|
|
dahdi_echocan_hpec-objs += hpec/hpec_$(DAHDI_ARCH).o
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HPEC_PRESENT),yes)
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_HPEC) += dahdi_echocan_hpec.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2020-11-17 12:01:24 +08:00
|
|
|
hostprogs := makefw
|
2010-08-28 05:59:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-03 21:58:11 +08:00
|
|
|
clean-files := radfw.h
|