summaryrefslogtreecommitdiff
path: root/xpp/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'xpp/Makefile')
-rw-r--r--xpp/Makefile20
1 files changed, 19 insertions, 1 deletions
diff --git a/xpp/Makefile b/xpp/Makefile
index e0a9152..deaadcf 100644
--- a/xpp/Makefile
+++ b/xpp/Makefile
@@ -1,15 +1,33 @@
-EXTRA_CFLAGS = -g3 -I$(SUBDIRS) -DDEBUG -DPOLL_DIGITAL_INPUTS -DWITH_ECHO_SUPPRESSION
+EXTRA_CFLAGS = $(XPP_LOCAL_CFLAGS) \
+ -g3 -I$(SUBDIRS) \
+ -DDEBUG \
+ -DPOLL_DIGITAL_INPUTS \
+ -DWITH_ECHO_SUPPRESSION \
+ -DPROTOCOL_DEBUG \
+ -DZAPTEL_EC_TYPEDEF \
+
+# Useful for Astribank-BRI debugging, and maybe more later on.
+# Requires debugfs support in the kernel.
+# -DXPP_DEBUGFS
+
+DRIVER_DIR = $(SUBDIRS)
obj-m += xpp.o xpd_fxs.o xpd_fxo.o
+HAS_BRISTUFF := $(shell cpp $(CPPFLAGS) -dM $(DRIVER_DIR)/zconfig.h | sed -n 's/^.*CONFIG_ZAPATA_BRI_DCHANS/y/p')
+
# Build only supported modules
ifneq (,$(filter y m,$(CONFIG_USB)))
obj-m += xpp_usb.o
endif
+ifneq (,$(HAS_BRISTUFF))
+obj-m += xpd_bri.o
+endif
xpp-y += xbus-core.o xpp_zap.o xproto.o card_global.o
xpd_fxs-y += card_fxs.o
xpd_fxo-y += card_fxo.o
+xpd_bri-y += card_bri.o
ctags:
ctags *.[ch]