summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp/Kbuild
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-05-21 15:11:48 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-05-21 15:11:48 +0000
commit802b567e6c7ba7803a950324cbed13f7d57944cb (patch)
tree6b90ca3119aaa2e4073d3b651ac965dea5d3430e /drivers/dahdi/xpp/Kbuild
parentec5ce88e015b41c2f46f6c9b783339b945f9502a (diff)
start copying kernel bits
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4315 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/Kbuild')
-rw-r--r--drivers/dahdi/xpp/Kbuild58
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/dahdi/xpp/Kbuild b/drivers/dahdi/xpp/Kbuild
new file mode 100644
index 0000000..f7f180b
--- /dev/null
+++ b/drivers/dahdi/xpp/Kbuild
@@ -0,0 +1,58 @@
+ifdef SUBDIRS
+ ZAP_KERNEL = $(SUBDIRS)
+else
+ ZAP_KERNEL = $(M)
+endif
+
+EXTRA_CFLAGS = $(XPP_LOCAL_CFLAGS) \
+ -I$(ZAP_KERNEL) \
+ -DDEBUG \
+ -DPOLL_DIGITAL_INPUTS \
+ -DWITH_ECHO_SUPPRESSION \
+ -DDEBUG_PCMTX \
+ -DPROTOCOL_DEBUG \
+ -g
+ #
+
+ifneq (,$(shell grep -w echo_can_state_t $(ZAP_KERNEL)/zaptel.h))
+EXTRA_CFLAGS += -DZAPTEL_EC_TYPEDEF
+endif
+
+obj-m += xpp.o xpd_fxs.o xpd_fxo.o xpd_pri.o
+
+HAS_BRISTUFF := $(shell grep '^[[:space:]]*\#[[:space:]]*define[[:space:]]\+CONFIG_ZAPATA_BRI_DCHANS\>' $(ZAP_KERNEL)/zconfig.h)
+
+# 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 xbus-sysfs.o xbus-pcm.o xframe_queue.o xpp_zap.o xproto.o card_global.o zap_debug.o
+xpd_fxs-y += card_fxs.o
+xpd_fxo-y += card_fxo.o
+xpd_bri-y += card_bri.o
+xpd_pri-y += card_pri.o
+
+ifeq (y,$(PARPORT_DEBUG))
+EXTRA_CFLAGS += -DDEBUG_SYNC_PARPORT
+obj-m += parport_debug.o
+endif
+
+# Handle versioning
+XPP_VERSION_STR ?= $(shell if [ -r $(obj)/.version ]; then echo "\"`cat $(obj)/.version`\""; else echo '"Unknown"'; fi)
+clean-files := xpp_version.h
+
+$(obj)/card_fxs.o $(obj)/card_fxo.o $(obj)/card_bri.o $(obj)/card_pri.o $(obj)/xpp_usb.o $(obj)/xpp.o: $(obj)/xpp_version.h
+
+$(obj)/xpp_version.h: FORCE
+ $(Q)echo '#define XPP_VERSION $(XPP_VERSION_STR)' > $@.tmp
+ $(Q)if cmp -s $@.tmp $@ ; then echo; else \
+ mv $@.tmp $@ ; \
+ fi
+ $(Q)rm -f $@.tmp
+
+.PHONY: FORCE
+FORCE: