summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 20 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 9b484f1..2559a62 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for Zaptel driver modules and utilities
#
-# Copyright (C) 2001-2005 Digium, Inc.
+# Copyright (C) 2001-2006 Digium, Inc.
#
#
BASEADDR=0xd0000
@@ -138,6 +138,7 @@ TZOBJS:=zonedata.lo tonezone.lo
LIBTONEZONE_SO:=libtonezone.so
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 \
ztd-loc # ztdummy
@@ -146,6 +147,7 @@ MODULES:=zaptel tor2 torisa wcusb wcfxo wctdm wctdm24xxp \
ifeq (${BUILDVER},linux26)
MODULES+=ztdummy
endif
+
MODULESO:=$(MODULES:%=%.o)
MODULESKO:=$(MODULES:%=%.ko)
ifeq ($(BUILDVER),linux26)
@@ -159,6 +161,14 @@ LIB_DIR:=$(INSTALL_PREFIX)/usr/lib
INC_DIR:=$(INSTALL_PREFIX)/usr/include
MOD_DIR:=$(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc
+MOD_DESTDIR:=zaptel
+
+obj-m:=$(MODULESO) ${XPPMOD}
+
+ifneq ($(filter xpp,${MAKECMDGOALS}),)
+XPPMOD=xpp/
+endif
+
ifneq (,$(wildcard /usr/include/newt.h))
ZTTOOL:=zttool
endif
@@ -183,16 +193,14 @@ linux24: $(MODULESO) $(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
+ $(KMAKE) XPPMOD=$(XPPMOD) modules
-obj-m += $(MODULESO)
+xpp: linux26
#ifneq ($(TOPDIR),)
#include $(TOPDIR)/Rules.make
#endif
-MOD_DESTDIR:=zaptel
-
version.h: FORCE
ZAPTELVERSION="${ZAPTELVERSION}" build_tools/make_version_h > $@.tmp
if cmp -s $@.tmp $@ ; then echo; else \
@@ -211,15 +219,15 @@ zaptel.o: digits.h arith.h sec.h mec.h sec-2.h mec2.h mec3.h zconfig.h
torisa.o: torisa.h
wcusb.o: wcusb.h
-
+
wcfxsusb.o: wcfxsusb.h
-
+
wctdm.o: wctdm.h
-
+
wctdm24xxp.o: wctdm.h
-
+
pciradio.o: radfw.h
-
+
ztdummy.o: ztdummy.h
$(MODULESO): %.o: %.c zaptel.h
@@ -489,6 +497,8 @@ clean:
ifeq (${BUILDVER},linux26)
$(KMAKE) clean
endif
+ rm -f xpp/*.ko xpp/*.mod.c xpp/.*o.cmd
+ rm -f xpp/*.o xpp/*.mod.o
rm -rf .tmp_versions
rm -f gendigits tones.h
rm -f libtonezone*