summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 13 insertions, 27 deletions
diff --git a/Makefile b/Makefile
index 5b90939..5785f07 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ ifndef KSRC
endif
KINCLUDES:=$(KSRC)/include
-CFLAGS+=-I. -Iinclude -O4 -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER
+CFLAGS+=-I. -O4 -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER
CFLAGS_PPC:=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
CFLAGS_X86-64:=$(shell if uname -m | grep -q x86_64; then echo "-m64"; fi)
CFLAGS+=$(CFLAGS_PPC) $(CFLAGS_X86-64)
@@ -105,7 +105,7 @@ LIBTONEZONE_SO_MAJOR_VER:=1
LIBTONEZONE_SO_MINOR_VER:=0
MODULES:=zaptel tor2 torisa wcusb wcfxo wctdm wctdm24xxp \
- ztdynamic ztd-eth wct1xxp wct4xxp wcte11xp pciradio \
+ ztdynamic ztd-eth wct1xxp wcte11xp pciradio \
ztd-loc # ztdummy
#MODULES+=wcfxsusb
# build ztdummy by default for 2.6 kernels
@@ -118,9 +118,8 @@ MODULESKO:=$(MODULES:%=%.ko)
MOD_DESTDIR:=zaptel
-EXTRA_CFLAGS:=-I$(SUBDIRS)/include -I$(SUBDIRS)/include/oct6100api
obj-m:=$(MODULESO)
-wct4xxp-objs:=wct4xxp_base.o vpm450m.o
+obj-m+=wct4xxp/
# Also build xpp in the subdirectory xpp/ . But only for >=2.6.10 and only
# for i386. On other archs the module will probably build but panic.
@@ -138,18 +137,12 @@ BINS=ztcfg torisatool makefw ztmonitor ztspeed $(ZTTOOL) zttest fxotune
all: $(BUILDVER) $(LIBTONEZONE_SO)
-linux24: prereq vpm450m_fw.h $(MODULESO) $(BINS)
+linux24: prereq $(MODULESO) wct4xxp/wct4xxp.o $(BINS)
-linux26: prereq vpm450m_fw.h $(BINS)
+linux26: prereq $(BINS)
@echo $(KSRC)
@if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
- $(KMAKE) modules
-
-obj-m += $(MODULESO)
-
-#ifneq ($(TOPDIR),)
-#include $(TOPDIR)/Rules.make
-#endif
+ $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules
version.h: FORCE
ZAPTELVERSION="${ZAPTELVERSION}" build_tools/make_version_h > $@.tmp
@@ -158,6 +151,9 @@ version.h: FORCE
fi
rm -f $@.tmp
+wct4xxp/wct4xxp.o:
+ $(MAKE) -C wct4xxp KFLAGS="$(KFLAGS) -I.." CFLAGS="$(CFLAGS) -I.."
+
devel: tor2ee
tests: patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
@@ -180,15 +176,9 @@ pciradio.o: radfw.h
ztdummy.o: ztdummy.h
-$(filter-out wct4xxp.o,$(MODULESO)) wct4xxp_base.o: %.o: %.c zaptel.h
+$(MODULESO): %.o: %.c zaptel.h
$(CC) $(KFLAGS) -o $@ -c $<
-vpm450m.o: vpm450m.c zaptel.h
- $(CC) $(KFLAGS) -I$(PWD)/include -I$(PWD)/include/oct6100api -I$(SUBDIRS)/include -I$(SUBDIRS)/include/oct6100api -o $@ -c $<
-
-wct4xxp.o: wct4xxp_base.o vpm450m.o
- $(LD) -r -o $@ wct4xxp_base.o vpm450m.o
-
tor2ee.o: tor2-hw.h
tor2ee: tor2ee.o
@@ -215,11 +205,6 @@ radfw.h: makefw pciradio.rbt
gendigits: gendigits.o
$(CC) -o $@ $^ -lm
-fw2h: CFLAGS=
-
-vpm450m_fw.h: OCT6114-128D.ima fw2h
- ./fw2h $< $@
-
zaptel.c: tones.h
prereq: tones.h tor2fw.h radfw.h version.h
@@ -424,7 +409,9 @@ clean:
rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
rm -f $(TZOBJS) $(LIBTONEZONE_SO) *.lo
ifeq ($(BUILDVER),linux26)
- $(KMAKE) clean
+ $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) clean
+else
+ $(MAKE) -C wct4xxp clean
endif
rm -rf .tmp_versions
rm -f gendigits tones.h
@@ -433,6 +420,5 @@ endif
rm -f fxotune
rm -f core
rm -f ztcfg-shared fxstest
- rm -f fw2h vpm450m_fw.h
FORCE: