diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2002-06-29 18:08:17 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2002-06-29 18:08:17 +0000 |
commit | f11777d1a323daf29ff336e6a5aed84d8198b360 (patch) | |
tree | 03a59b028fa364727024fcf8d493d843afd4e91b /Makefile | |
parent | b40acbadfeec861fee8c403d9fc019f2ec73ccbd (diff) |
Version 0.2.0 from FTP
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@89 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'Makefile')
-rwxr-xr-x | Makefile | 59 |
1 files changed, 54 insertions, 5 deletions
@@ -15,14 +15,32 @@ DEFAULTZONE=0 KINCLUDES=$(shell if [ -d /usr/src/linux-2.4/include ]; then echo /usr/src/linux-2.4/include ; else echo /usr/src/linux/include ; fi) CFLAGS+=-I. -O4 -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER +CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi) LCFLAGS=-fPIC $(CFLAGS) -DBUILDING_TONEZONE KFLAGS+=-I/usr/src/linux-2.4/include -O6 KFLAGS+=-DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -I/usr/src/linux/drivers/net \ -Wall -I. -Wstrict-prototypes -fomit-frame-pointer -I/usr/src/linux/drivers/net/wan -I /usr/src/linux/include -I/usr/src/linux/include/net KFLAGS+=$(shell [ -f $(KINCLUDES)/linux/modversions.h ] && echo "-DMODVERSIONS -include $(KINCLUDES)/linux/modversions.h") +KFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-msoft-float -fsigned-char"; fi) # # Features # +# +# Define CONFIG_CALC_XLAW if you have a small number of channels and/or +# a small level 2 cache, to optimize for few channels +# +#KFLAGS+=-DCONFIG_CALC_XLAW +# +# Define if you want MMX optimizations in zaptel +# +#KFLAGS+=-DCONFIG_ZAPTEL_MMX +# +# Pick your echo canceller: MARK, STEVE, or STEVE2 :) +# +KFLAGS+=-DECHO_CAN_STEVE +#KFLAGS+=-DECHO_CAN_STEVE2 +#KFLAGS+=-DECHO_CAN_MARK +# # Uncomment -DCONFIG_ZAPATA_NET to enable SyncPPP, CiscoHDLC, and Frame Relay # support. # @@ -30,7 +48,7 @@ KFLAGS+=$(shell [ -f $(KINCLUDES)/linux/modversions.h ] && echo "-DMODVERSIONS - # # Uncomment for Generic PPP support (i.e. ZapRAS) # -#KFLAGS+=-DCONFIG_ZAPATA_PPP +KFLAGS+=-DCONFIG_ZAPATA_PPP # # ISA Defaults can be set here. # @@ -45,7 +63,7 @@ KFLAGS+=-DDEFAULT_TONE_ZONE=$(DEFAULTZONE) KFLAGS+=-DSTANDALONE_ZAPATA CFLAGS+=-DSTANDALONE_ZAPATA -MODCONF=$(shell if [ -f /etc/modules.conf ]; then echo /etc/modules.conf; else echo /etc/conf.modules ; fi) +MODCONF=$(shell if [ -d /etc/modutils ]; then echo "/etc/modutils/zaptel"; elif [ -f /etc/modules.conf ]; then echo /etc/modules.conf; else echo /etc/conf.modules ; fi) TZOBJS=zonedata.lo tonezone.lo LIBTONEZONE=libtonezone.so.1.0 @@ -57,7 +75,7 @@ ZTTOOL=$(shell if [ -f /usr/include/newt.h ]; then echo zttool; fi) PRIMARY=torisa #PRIMARY=wcfxo -all: $(MODULES) ztcfg torisatool fxstest makefw $(ZTTOOL) sethdlc +all: $(MODULES) ztcfg torisatool fxstest makefw ztmonitor ztspeed $(ZTTOOL) devel: tor2ee @@ -66,7 +84,7 @@ tests: patgen pattest tor2.o: tor2.c tor2-hw.h tor.h tor2fw.h zaptel.h gcc $(KFLAGS) -c tor2.c -zaptel.o: zaptel.c zaptel.h digits.h +zaptel.o: zaptel.c zaptel.h digits.h arith.h gcc $(KFLAGS) -c zaptel.c torisa.o: torisa.c zaptel.h torisa.h @@ -120,9 +138,23 @@ zaptel.c: tones.h zttool.o: zttool.c zaptel.h +ztmonitor.o: ztmonitor.c zaptel.h + +ztspeed.o: ztspeed.c + $(CC) -c ztspeed.c + zttool: zttool.o $(CC) -o zttool zttool.o -lnewt +ztmonitor: ztmonitor.o + $(CC) -o ztmonitor ztmonitor.o + +ztcat: ztcat.o + $(CC) -o ztcat ztcat.o -ltonezone + +ztspeed: ztspeed.o + $(CC) -o ztspeed ztspeed.o + $(LIBTONEZONE): $(TZOBJS) $(CC) -shared -Wl,-soname,libtonezone.so.1 -lm -o $@ $(TZOBJS) /sbin/ldconfig -n . @@ -150,7 +182,7 @@ devices: install: all devices install -m 755 ztcfg /sbin - install -m 755 sethdlc /sbin + if [ -f sethdlc ]; then install -m 755 sethdlc /sbin ; fi if [ -f zttool ]; then install -m 755 zttool /sbin; fi mkdir -p /lib/modules/`uname -r`/misc for x in $(MODULES); do \ @@ -193,9 +225,26 @@ install: all devices if ! grep "post-install wct1xxp" $(MODCONF); then \ echo "post-install wct1xxp /sbin/ztcfg" >> $(MODCONF); \ fi + if [ -d /etc/modutils ]; then \ + /sbin/update-modules ; \ + fi /sbin/depmod -a [ -f /etc/zaptel.conf ] || install -m 644 zaptel.conf.sample /etc/zaptel.conf +config: + if [ -d /etc/rc.d/init.d ]; then \ + install -m 755 zaptel.init /etc/rc.d/init.d/zaptel; \ + chkconfig --add zaptel; \ + elif [ -d /etc/init.d ]; then \ + install -m 755 zaptel.init /etc/init.d/zaptel; \ + fi + if [ ! -f /etc/sysconfig/zaptel ]; then \ + install -m 644 zaptel.sysconfig /etc/sysconfig/zaptel; \ + fi + if [ -d /etc/sysconfig/network-scripts ]; then \ + install -m 755 ifup-hdlc /etc/sysconfig/network-scripts/ifup-hdlc; \ + fi + clean: rm -f torisatool makefw tor2fw.h rm -f zttool |