summaryrefslogtreecommitdiff
path: root/Kbuild
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-01-25 23:59:37 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-01-25 23:59:37 +0000
commit860c46060672ec32918b3ea305c2d3a795bb6ae7 (patch)
tree9aa987489d6775df2b010af0897110be89bd4d44 /Kbuild
parentd8e4f2d9d55628bdc758ffcdcf4321883770a721 (diff)
get this branch to build against 2.6.24 kernel build system (similar to r3706 from tzafrir for branch-1.4)
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3741 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'Kbuild')
-rw-r--r--Kbuild42
1 files changed, 42 insertions, 0 deletions
diff --git a/Kbuild b/Kbuild
new file mode 100644
index 0000000..c00cba7
--- /dev/null
+++ b/Kbuild
@@ -0,0 +1,42 @@
+obj-m := $(MODULESO)
+obj-m += wct4xxp/ wctc4xxp/ wcte12xp/ wctdm24xxp/
+
+# Also build xpp in the subdirectory xpp/ . But only for >=2.6.8 and only
+# for i386 or x86_64. On other platforms it has still not been tested well
+# enough.
+ifneq (,$(shell [ 0$(SUBLEVEL) -ge 8 ] && echo 1))
+ifeq ($(ARCH),i386)
+obj-m+=xpp/
+endif
+ifeq ($(ARCH),x86_64)
+obj-m+=xpp/
+endif
+endif
+
+ifdef ECHO_CAN_NAME
+ ECHO_CAN_CFLAGS := -DECHO_CAN_FROMENV -DECHO_CAN_$(ECHO_CAN_NAME)
+endif
+
+EXTRA_CFLAGS := -I$(src)
+EXTRA_CFLAGS += $(ECHO_CAN_CFLAGS)
+
+# 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
+
+zaptel-objs := zaptel-base.o
+
+ifeq ($(HPEC_PRESENT),yes)
+ifeq ($(ARCH),i386)
+zaptel-objs += hpec/hpec_x86_32.o
+endif
+
+ifeq ($(ARCH),x86_64)
+zaptel-objs += hpec/hpec_x86_64.o
+endif
+
+EXTRA_CFLAGS += -DECHO_CAN_HPEC -I$(src)/hpec
+endif