summaryrefslogtreecommitdiff
path: root/xpp/Makefile
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-02-07 20:58:46 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-02-07 20:58:46 +0000
commit8953e09799d8995e3667e5766a362d282700af20 (patch)
tree8ce49c141cdccd5b1398979e809a3bdeeff0e9d8 /xpp/Makefile
parent237daca586a95a8f46c5e3326acf9015a004bf1b (diff)
xpp driver rev. 3332:
* Reverse polarity and power denial detection. * A short led flash at registration time. * Add a real version of the xpp modules to them (independent of the Zaptel version). * Update our line status even when not registered. * Fixed a false SIG_CHANGED when inserting or removing cable to FXO. * Fixed compilation fixes for 2.6.20 (Bug #8982) * A cleaner fix for the bool changes of 2.6.19 . * Automatically detect echo_can_state_t at debug time. * Automaitcally set XPP_DEBUGFS (depending on debugfs) at compile time. * Bug-fixes to zaptel-helper. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2113 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/Makefile')
-rw-r--r--xpp/Makefile33
1 files changed, 26 insertions, 7 deletions
diff --git a/xpp/Makefile b/xpp/Makefile
index deaadcf..1588416 100644
--- a/xpp/Makefile
+++ b/xpp/Makefile
@@ -3,18 +3,20 @@ EXTRA_CFLAGS = $(XPP_LOCAL_CFLAGS) \
-DDEBUG \
-DPOLL_DIGITAL_INPUTS \
-DWITH_ECHO_SUPPRESSION \
- -DPROTOCOL_DEBUG \
- -DZAPTEL_EC_TYPEDEF \
+ -DPROTOCOL_DEBUG
-# Useful for Astribank-BRI debugging, and maybe more later on.
-# Requires debugfs support in the kernel.
-# -DXPP_DEBUGFS
+ifneq (,$(filter y m,$(CONFIG_DEBUG_FS)))
+EXTRA_CFLAGS += -DXPP_DEBUGFS
+endif
+ifneq (,$(shell grep -w echo_can_state_t $(ZAPTEL_DIR)/zaptel.h))
+EXTRA_CFLAGS += -DZAPTEL_EC_TYPEDEF
+endif
-DRIVER_DIR = $(SUBDIRS)
+ZAPTEL_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')
+HAS_BRISTUFF := $(shell cpp $(CPPFLAGS) -dM $(ZAPTEL_DIR)/zconfig.h | sed -n 's/^.*CONFIG_ZAPATA_BRI_DCHANS/y/p')
# Build only supported modules
ifneq (,$(filter y m,$(CONFIG_USB)))
@@ -31,3 +33,20 @@ xpd_bri-y += card_bri.o
ctags:
ctags *.[ch]
+
+# 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)/xpp_usb.o $(obj)/xpp.o: $(obj)/xpp_version.h
+
+$(obj)/xpp_version.h: FORCE
+ $(Q)echo "Compile for $(XPP_VERSION_STR)"
+ $(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: