1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
ifdef ECHO_CAN_NAME
ECHO_CAN_CFLAGS := -DECHO_CAN_FROMENV -DECHO_CAN_$(ECHO_CAN_NAME)
endif
obj-m := pciradio.o tor2.o wcfxo.o wct1xxp.o wctdm.o wcte11xp.o dahdi.o dahdi_dummy.o dahdi_dynamic.o dahdi_dynamic_eth.o dahdi_dynamic_loc.o dahdi_transcode.o
obj-m += wct4xxp/ wctc4xxp/ wctdm24xxp/ wcte12xp/ xpp/
CFLAGS_MODULE += -I$(DAHDI_INCLUDE)
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
dahdi-objs := dahdi-base.o
ifeq ($(ARCH),i386)
ifneq ($(wildcard $(src)/hpec/hpec_x86_32.o_shipped),)
HPEC_PRESENT=yes
dahdi-objs += hpec/hpec_x86_32.o
endif
endif
ifeq ($(ARCH),x86_64)
ifneq ($(wildcard $(src)/hpec/hpec_x86_64.o_shipped),)
HPEC_PRESENT=yes
dahdi-objs += hpec/hpec_x86_64.o
endif
endif
ifeq ($(HPEC_PRESENT),yes)
EXTRA_CFLAGS += -DECHO_CAN_HPEC -I$(src)/hpec
$(obj)/dahdi-base.o: $(src)/hpec/hpec_dahdi.h $(src)/hpec/hpec_user.h
endif
$(obj)/pciradio.o: $(obj)/radfw.h
$(obj)/tor2.o: $(obj)/tor2fw.h
hostprogs-y := $(obj)/makefw
$(obj)/tor2fw.h: $(src)/tormenta2.rbt $(obj)/makefw
$(obj)/makefw $< tor2fw > $@
$(obj)/radfw.h: $(src)/pciradio.rbt $(obj)/makefw
$(obj)/makefw $< radfw > $@
$(obj)/makefw: $(src)/makefw.c
$(HOSTCC) -o $@ $^
# set CONFIG_DAHDI_MMX for a number of CPU types.
# Right now this part is not enabled, unless you build with
# DAHDI_MMX_AUTO=something .
DAHDIMMX_WHITELIST_i386 = M586MMX M686 MPENTIUMII MPENTIUMIII MPENTIUMM \
MPENTIUM4 MVIAC3_2
DAHDIMMX_WHITELIST_x86_64 =
# A list of configuration variables to test: CONFIG_M686 , etc.
DAHDIMMX_CONFIG_VARS := $(DAHDIMMX_WHITELIST_$(ARCH):%=CONFIG_%)
# expand them:
DAHDIMMX_CONFIG_VALS := $(strip $(foreach var,$(DAHDIMMX_CONFIG_VARS),$(var)) )
ifneq (,$(DAHDI_MMX_AUTO))
ifneq (,$(DAHDIMMX_CONFIG_VALS))
# TODO: make that
CFLAGS_dahdi-base.o += -DCONFIG_DAHDI_MMX
endif
endif
|