2010-08-28 05:59:27 +08:00
|
|
|
EXTRA_CFLAGS = $(XPP_LOCAL_CFLAGS) \
|
|
|
|
-DDEBUG \
|
|
|
|
-DPOLL_DIGITAL_INPUTS \
|
|
|
|
-DDEBUG_PCMTX \
|
|
|
|
-DPROTOCOL_DEBUG \
|
2011-05-23 21:37:40 +08:00
|
|
|
-g
|
2010-08-28 05:59:27 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
WITH_BRISTUFF := $(shell grep -c '^[[:space:]]*\#[[:space:]]*define[[:space:]]\+CONFIG_DAHDI_BRI_DCHANS\>' $(src)/../../../include/dahdi/dahdi_config.h)
|
|
|
|
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPP) += xpp.o
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPD_FXS) += xpd_fxs.o
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPD_FXO) += xpd_fxo.o
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPD_PRI) += xpd_pri.o
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPD_BRI) += xpd_bri.o
|
2011-06-29 02:23:00 +08:00
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPD_ECHO) += xpd_echo.o
|
2010-08-28 05:59:27 +08:00
|
|
|
|
|
|
|
# Build only supported modules
|
|
|
|
ifneq (,$(filter y m,$(CONFIG_USB)))
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_XPP_USB) += xpp_usb.o
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter y m,$(CONFIG_BF537)))
|
|
|
|
obj-$(DAHDI_BUILD_ALL)$(CONFIG_XPP_MMAP) += xpp_mmap.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
xpp-objs += xbus-core.o xbus-sysfs.o xbus-pcm.o xframe_queue.o xpp_dahdi.o xproto.o card_global.o dahdi_debug.o
|
|
|
|
xpd_fxs-objs += card_fxs.o
|
|
|
|
xpd_fxo-objs += card_fxo.o
|
|
|
|
xpd_bri-objs += card_bri.o
|
|
|
|
xpd_pri-objs += card_pri.o
|
2011-06-29 02:23:00 +08:00
|
|
|
xpd_echo-objs += card_echo.o
|
2010-08-28 05:59:27 +08:00
|
|
|
xpp_mmap-objs += mmapbus.o mmapdrv.o
|
|
|
|
|
|
|
|
ifeq (y,$(PARPORT_DEBUG))
|
|
|
|
EXTRA_CFLAGS += -DDEBUG_SYNC_PARPORT
|
|
|
|
obj-m += parport_debug.o
|
|
|
|
endif
|
|
|
|
|
2017-03-27 17:42:56 +08:00
|
|
|
# Just in case it was left from an older version:
|
2010-08-28 05:59:27 +08:00
|
|
|
clean-files += xpp_version.h
|
|
|
|
|
|
|
|
# Validations:
|
|
|
|
# - Syntactic verification of perl scripts
|
|
|
|
# - Handle country table validation for init_card_2_*
|
|
|
|
|
|
|
|
XPP_PROTOCOL_VERSION := $(shell grep XPP_PROTOCOL_VERSION $(src)/xproto.h | sed -e 's/^.*XPP_PROTOCOL_VERSION[ \t]*//')
|
|
|
|
|
|
|
|
xpp_verifications = \
|
|
|
|
init_card_1_$(XPP_PROTOCOL_VERSION) \
|
|
|
|
init_card_2_$(XPP_PROTOCOL_VERSION) \
|
|
|
|
init_card_3_$(XPP_PROTOCOL_VERSION) \
|
|
|
|
init_card_4_$(XPP_PROTOCOL_VERSION) \
|
|
|
|
init_fxo_modes
|
|
|
|
|
|
|
|
xpp_verified = $(foreach file, $(xpp_verifications), $(file).verified)
|
|
|
|
|
|
|
|
FXO_MODES = $(src)/../fxo_modes.h
|
|
|
|
FXO_VERIFY = $(obj)/init_card_2_$(XPP_PROTOCOL_VERSION) -v $(obj)/init_fxo_modes
|
|
|
|
|
|
|
|
hostprogs-y := print_fxo_modes
|
2017-03-27 17:42:56 +08:00
|
|
|
always := $(xpp_verified)
|
2010-08-28 05:59:27 +08:00
|
|
|
print_fxo_modes-objs := print_fxo_modes.o
|
|
|
|
HOSTCFLAGS_print_fxo_modes.o += -include $(FXO_MODES)
|
|
|
|
|
|
|
|
clean-files += print_fxo_modes init_fxo_modes $(xpp_verified)
|
|
|
|
|
|
|
|
$(obj)/init_fxo_modes: $(obj)/print_fxo_modes
|
|
|
|
@echo ' GEN $@'
|
|
|
|
$(Q)$(obj)/print_fxo_modes >$@ || (rm -f $@; exit 1)
|
|
|
|
|
|
|
|
$(obj)/init_fxo_modes.verified: $(obj)/init_card_2_$(XPP_PROTOCOL_VERSION) $(obj)/init_fxo_modes
|
|
|
|
@echo ' CHECK $(obj)/init_card_2_$(XPP_PROTOCOL_VERSION)'
|
|
|
|
$(Q)$(FXO_VERIFY) || (rm -f $@; exit 1)
|
2011-01-31 02:06:16 +08:00
|
|
|
$(Q)touch $@
|
2010-08-28 05:59:27 +08:00
|
|
|
|
|
|
|
$(obj)/init_card_%_$(XPP_PROTOCOL_VERSION).verified: $(src)/init_card_%_$(XPP_PROTOCOL_VERSION)
|
|
|
|
@echo ' VERIFY $<'
|
|
|
|
$(Q)perl -c $< 2> $@ || (cat $@; rm -f $@; exit 1)
|
|
|
|
|
|
|
|
.PHONY: FORCE
|
|
|
|
FORCE:
|