~ubuntu-branches/ubuntu/quantal/zaptel/quantal

« back to all changes in this revision

Viewing changes to kernel/qozap/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Tzafrir Cohen
  • Date: 2008-08-28 22:58:23 UTC
  • mfrom: (11.1.11 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080828225823-r8bdunirm8hmc76m
Tags: 1:1.4.11~dfsg-2
* Patch xpp_fxs_power: Fixed an issue with hook detection of the Astribank
  FXS module.
* Don't fail init.d script if fxotune fails. This may happen if running it
  when Asterisk is already running.
* Bump standards version to 3.8.0.0 .
* Ignore false lintian warning ("m-a a-i" has "a a").
* Patch xpp_fxo_cid_always: do always pass PCM if that's what the user
  asked.
* Patch vzaphfc_proc_root_dir: fix vzaphfc on 2.6.26.
* Patch wcte12xp_flags: Proper time for irq save flags.
* Patch headers_2627: Fix location of semaphore.h for 2.6.27 .
* Patch xpp_fxs_dtmf_leak: Don't play DTMFs to the wrong channel.
* Patch wctdm_fix_alarm: Fix sending channel alarms.
* Patch device_class_2626: Fix building 2.6.26 (Closes: #493397).
* Using dh_lintian for lintian overrides, hence requiring debhelper 6.0.7.
* Lintian: we know we have direct changes. Too bad we're half-upstream :-(
* Fix doc-base section names. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
KINCLUDES = /usr/src/linux/include
 
2
BRISTUFFBASE = $(shell dirname `pwd`)
 
3
 
 
4
ZAP = $(shell [ -f $(BRISTUFFBASE)/zaptel/zaptel.h ] && echo "-I$(BRISTUFFBASE)/zaptel")
 
5
 
 
6
CFLAGS+=-I. $(ZAP) -DRELAXED_LOCKING -O2 -g -Wall -DBUILDING_TONEZONE  #-DTONEZONE_DRIVER
 
7
CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
 
8
 
 
9
KFLAGS=-D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DRELAXED_LOCKING -fomit-frame-pointer -O2 -Wall -I$(KINCLUDES) $(ZAP)
 
10
KFLAGS+=$(shell [ -f $(KINCLUDES)/linux/modversions.h ] && echo "-DMODVERSIONS -include $(KINCLUDES)/linux/modversions.h")
 
11
KFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-msoft-float -fsigned-char"; fi)
 
12
 
 
13
OBJS=qozap.o
 
14
 
 
15
BUILDVER=$(shell if uname -r | grep -q ^2.6; then echo "linux26"; else echo "linux24"; fi)
 
16
 
 
17
MODCONF=$(shell if [ -d $(INSTALL_PREFIX)/etc/modprobe.d ]; then echo "$(INSTALL_PREFIX)/etc/modprobe.d/zaptel"; elif [ -d $(INSTALL_PREFIX)/etc/modutils ]; then echo "$(INSTALL_PREFIX)/etc/modutils/zaptel"; elif [ -f $(INSTALL_PREFIX)/etc/modprobe.conf ]; then echo "$(INSTALL_PREFIX)/modprobe.conf"; elif [ -f $(INSTALL_PREFIX)/etc/modules.conf ]; then echo "$(INSTALL_PREFIX)/etc/modules.conf"; else echo $(INSTALL_PREFIX)/etc/conf.modules ; fi)
 
18
 
 
19
MODULES=qozap
 
20
 
 
21
MODULESO=$(shell for x in $(MODULES); do echo "$$x.o "; done )
 
22
MODULESKO=$(shell for x in $(MODULES); do echo "$$x.ko "; done )
 
23
 
 
24
PWD=$(shell pwd)
 
25
 
 
26
obj-m := $(MODULESO)
 
27
 
 
28
all: $(BUILDVER)
 
29
 
 
30
linux24: $(OBJS)
 
31
        sync
 
32
 
 
33
linux26:
 
34
        @if ! [ -d /usr/src/linux-2.6 ]; then echo "Link /usr/src/linux-2.6 to your kernel sources first!"; exit 1 ; fi
 
35
        make -C /usr/src/linux-2.6 SUBDIRS=$(PWD) ZAP=$(ZAP) modules
 
36
obj-m := $(OBJS)
 
37
 
 
38
qozap.o: qozap.c qozap.h 
 
39
        $(CC) -c qozap.c $(KFLAGS)
 
40
 
 
41
clean:  
 
42
        rm -f $(OBJS) *.ko *.mod.c *.mod.o .*o.cmd *~
 
43
        rm -rf .tmp_versions
 
44
 
 
45
testlinux24: all
 
46
        modprobe zaptel
 
47
        insmod ./qozap.o
 
48
        ztcfg -v
 
49
        cat /proc/interrupts
 
50
        sleep 1
 
51
        cat /proc/interrupts
 
52
        rmmod qozap zaptel
 
53
 
 
54
testlinux26: all
 
55
        modprobe zaptel
 
56
        insmod ./qozap.ko
 
57
        ztcfg -v
 
58
        cat /proc/interrupts
 
59
        sleep 1
 
60
        cat /proc/interrupts
 
61
        rmmod qozap zaptel
 
62
 
 
63
reload: unload load
 
64
load:   load$(BUILDVER)
 
65
 
 
66
test:   test$(BUILDVER)
 
67
 
 
68
 
 
69
loadlinux24: linux24
 
70
        modprobe zaptel
 
71
        insmod ./qozap.o
 
72
        ztcfg -v
 
73
 
 
74
loadlinux26: linux26
 
75
        sync
 
76
        modprobe zaptel
 
77
        insmod ./qozap.ko
 
78
        ztcfg -v
 
79
 
 
80
unload: 
 
81
        rmmod qozap zaptel
 
82
 
 
83
install:        install$(BUILDVER)
 
84
 
 
85
installlinux26:
 
86
        install -D -m 644 qozap.ko $(INSTALL_PREFIX)/lib/modules/`uname -r`/misc/qozap.ko
 
87
 
 
88
installlinux24:
 
89
        install -D -m 644 qozap.o $(INSTALL_PREFIX)/lib/modules/`uname -r`/misc/qozap.o