[zaptel-commits] tzafrir: branch tzafrir/move r3769 - in /team/tzafrir/move: ./ kernel/ kernel...

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Wed Jan 30 19:55:16 CST 2008


Author: tzafrir
Date: Wed Jan 30 19:55:15 2008
New Revision: 3769

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3769
Log:
Make 2.4 build: cut part of the main makefile into kernel/GNUmakefile .
GNUmakefile has precedense over 'Makefile' (that we must still keep use 
if we are to maintain compatibility iwth kernel 2.6.9).

This still won't build 2.4 - see #11884 for a quick patch to make it
build.

Added:
    team/tzafrir/move/kernel/GNUmakefile
      - copied, changed from r3763, team/tzafrir/move/Makefile
    team/tzafrir/move/kernel/sec-2.h
      - copied unchanged from r3758, team/tzafrir/move/sec-2.h
Removed:
    team/tzafrir/move/sec-2.h
Modified:
    team/tzafrir/move/Makefile
    team/tzafrir/move/kernel/wct4xxp/Makefile

Modified: team/tzafrir/move/Makefile
URL: http://svn.digium.com/view/zaptel/team/tzafrir/move/Makefile?view=diff&rev=3769&r1=3768&r2=3769
==============================================================================
--- team/tzafrir/move/Makefile (original)
+++ team/tzafrir/move/Makefile Wed Jan 30 19:55:15 2008
@@ -188,8 +188,13 @@
 
 KFLAGS+=-DSTANDALONE_ZAPATA
 CFLAGS+=-DSTANDALONE_ZAPATA
+ifeq ($(BUILDVER),linux24)
+KMAKE	= $(MAKE) -C kernel HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE) \
+  BUILD_TOPDIR_MODULES="$(BUILD_TOPDIR_MODULES)" BUILD_SUBDIR_MODULES="$(BUILD_SUBDIR_MODULES)"
+else
 KMAKE  = $(MAKE) -C $(KSRC) SUBDIRS=$(PWD)/kernel \
   HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE) KBUILD_OBJ_M="$(KBUILD_OBJ_M)"
+endif
 KMAKE_INST = $(KMAKE) \
   INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=misc modules_install
 
@@ -295,11 +300,11 @@
 
 modules: 
 	@if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
-ifeq ($(BUILDVER),linux26)
+#ifeq ($(BUILDVER),linux26)
 	$(KMAKE) modules
-else
-modules: $(INSTALL_MODULES)
-endif
+#else
+#modules: $(INSTALL_MODULES)
+#endif
 
 ifeq ($(HPEC_PRESENT),yes)
 ifeq ($(ARCH),i386)
@@ -615,17 +620,11 @@
 
 clean:
 	-@$(MAKE) -C menuselect clean
-	rm -f torisatool makefw tor2fw.h radfw.h
+	rm -f torisatool
 	rm -f $(BINS)
 	rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
 	rm -f $(LTZ_SO) $(LTZ_A) *.lo
-ifeq ($(BUILDVER),linux26)
-  ifneq (,$(KSRC))
 	$(KMAKE) clean
-  endif
-else
-	$(MAKE) -C wct4xxp clean
-endif
 	@for dir in $(SUBDIRS_UTILS_ALL); do \
 		$(MAKE) -C $$dir clean; \
 	done

Copied: team/tzafrir/move/kernel/GNUmakefile (from r3763, team/tzafrir/move/Makefile)
URL: http://svn.digium.com/view/zaptel/team/tzafrir/move/kernel/GNUmakefile?view=diff&rev=3769&p1=team/tzafrir/move/Makefile&r1=3763&p2=team/tzafrir/move/kernel/GNUmakefile&r2=3769
==============================================================================
--- team/tzafrir/move/Makefile (original)
+++ team/tzafrir/move/kernel/GNUmakefile Wed Jan 30 19:55:15 2008
@@ -1,64 +1,20 @@
 #
-# Makefile for Zaptel driver modules and utilities
+# Zaptel kernel 2.4 makefile
 #
-# Copyright (C) 2001-2007 Digium, Inc.
-#
+# Copyright (C) 2008 Digium, Inc.
 #
 
-ifneq ($(KBUILD_EXTMOD),)
-# We only get in here if we're from kernel 2.6 <= 2.6.9 and going through 
-# Kbuild. Later versions will include Kbuild instead of Makefile.
-include $(src)/Kbuild
-
-else
-
-CFLAGS+=-DSTANDALONE_ZAPATA -DBUILDING_TONEZONE
+CFLAGS+=-DSTANDALONE_ZAPATA
 
 ifeq ($(MAKELEVEL),0)
 PWD:=$(shell pwd)
 endif
 
-ARCH:=$(shell uname -m | sed -e s/i.86/i386/)
-
-ifeq ($(DEB_HOST_GNU_TYPE),)
-UNAME_M:=$(shell uname -m)
-else
-UNAME_M:=$(DEB_HOST_GNU_TYPE)
-endif
-
-# If you want to build for a kernel other than the current kernel, set KVERS
-ifndef KVERS
-KVERS:=$(shell uname -r)
-endif
-ifndef KSRC
-  ifneq (,$(wildcard /lib/modules/$(KVERS)/build))
-    KSRC:=/lib/modules/$(KVERS)/build
-  else
-    KSRC_SEARCH_PATH:=/usr/src/linux-2.4 /usr/src/linux
-    KSRC:=$(shell for dir in $(KSRC_SEARCH_PATH); do if [ -d $$dir ]; then echo $$dir; break; fi; done)
-  endif
-endif
-KVERS_MAJ:=$(shell echo $(KVERS) | cut -d. -f1-2)
 KINCLUDES:=$(KSRC)/include
 
-ifeq ($(KVERS_MAJ),2.4)
-  BUILDVER:=linux24
-else
-  BUILDVER:=linux26
-endif
+BUILDVER:=linux24
 
-# Set HOTPLUG_FIRMWARE=no to override automatic building with hotplug support
-# if it is enabled in the kernel.
-ifeq ($(BUILDVER),linux26)
-  ifneq (,$(wildcard $(DESTDIR)/etc/udev/rules.d))
-    DYNFS=yes
-    UDEVRULES=yes
-  endif
-  HOTPLUG_FIRMWARE:=$(shell if grep CONFIG_FW_LOADER $(KINCLUDES)/linux/autoconf.h | grep -q undef; then echo "no"; else echo "yes"; fi)
-else
-  # Hotplug firmware loading is not supported on any other version then 2.6
-  HOTPLUG_FIRMWARE:=no
-endif
+HOTPLUG_FIRMWARE:=no
 
 ifeq ($(HOTPLUG_FIRMWARE),yes)
   CFLAGS+=-DHOTPLUG_FIRMWARE
@@ -76,84 +32,9 @@
 endif
 endif
 
-# If the file .zaptel.makeopts is present in your home directory, you can
-# include all of your favorite menuselect options so that every time you download
-# a new version of Asterisk, you don't have to run menuselect to set them.
-# The file /etc/zaptel.makeopts will also be included but can be overridden
-# by the file in your home directory.
-
-GLOBAL_MAKEOPTS=$(wildcard /etc/zaptel.makeopts)
-USER_MAKEOPTS=$(wildcard ~/.zaptel.makeopts)
-
-ifeq ($(strip $(foreach var,clean distclean dist-clean update,$(findstring $(var),$(MAKECMDGOALS)))),)
- ifneq ($(wildcard menuselect.makeopts),)
-  include menuselect.makeopts
- endif
-endif
-
-ifeq ($(strip $(foreach var,clean distclean dist-clean update,$(findstring $(var),$(MAKECMDGOALS)))),)
- ifneq ($(wildcard makeopts),)
-  include makeopts
- endif
-endif
-
-ifeq ($(BUILDVER),linux24)
-MENUSELECT_MODULES+=xpp wctc4xxp wctdm24xxp zttranscode
-endif
-
-ifeq ($(findstring xpp,$(MENUSELECT_MODULES)),)
-  BUILD_XPP:=yes
-endif
-
-SUBDIRS_UTILS_ALL:= kernel/xpp/utils ppp
-SUBDIRS_UTILS	:=
-ifeq ($(BUILD_XPP),yes)
-  SUBDIRS_UTILS	+= kernel/xpp/utils
-endif
-#SUBDIRS_UTILS	+= ppp
-
-TOPDIR_MODULES:=pciradio tor2 torisa wcfxo wct1xxp wctdm wcte11xp wcusb zaptel ztd-eth ztd-loc ztdummy ztdynamic zttranscode
-SUBDIR_MODULES:=wct4xxp wctc4xxp xpp wctdm24xxp wcte12xp
-TOPDIR_MODULES+=$(MODULES_EXTRA)
-SUBDIR_MODULES+=$(SUBDIRS_EXTRA)
-BUILD_TOPDIR_MODULES:=$(filter-out $(MENUSELECT_MODULES),$(TOPDIR_MODULES))
-BUILD_SUBDIR_MODULES:=$(filter-out $(MENUSELECT_MODULES),$(SUBDIR_MODULES))
 BUILD_MODULES:=$(BUILD_TOPDIR_MODULES) $(BUILD_SUBDIR_MODULES)
-
-MOD_DESTDIR:=zaptel
-
-KERN_DIR:=kernel
-
-#NOTE NOTE NOTE
-#
-# all variables set before the include of Makefile.kernel26 are needed by the 2.6 kernel module build process
-
-ifneq ($(KBUILD_EXTMOD),)
-
-obj-m:=$(BUILD_TOPDIR_MODULES:%=%.o)
-obj-m+=$(BUILD_SUBDIR_MODULES:%=%/)
-
-include $(src)/Makefile.kernel26
-
-else
-KBUILD_OBJ_M=$(BUILD_TOPDIR_MODULES:%=%.o) $(BUILD_SUBDIR_MODULES:%=%/)
-
-ifeq ($(BUILDVER),linux24)
-  INSTALL_MODULES:=$(BUILD_TOPDIR_MODULES:%=$(KERN_DIR)/%.o)
-  INSTALL_MODULES+=$(foreach mod,$(BUILD_SUBDIR_MODULES),$(mod)/$(mod).o)
-  ALL_MODULES:=$(TOPDIR_MODULES:%=$(KERN_DIR)/%.o)
-  ALL_MODULES+=$(SUBDIR_MODULES:%=$(KERN_DIR)/%/%.o)
-else
-  INSTALL_MODULES:=$(BUILD_TOPDIR_MODULES:%=$(KERN_DIR)/%.ko)
-  INSTALL_MODULES+=$(foreach mod,$(filter-out xpp,$(BUILD_SUBDIR_MODULES)),$(KERN_DIR)/$(mod)/$(mod).ko)
-  ifneq ($(filter xpp,$(BUILD_SUBDIR_MODULES)),)
-  INSTALL_MODULES+=$(patsubst %,$(KERN_DIR)/xpp/%.ko,xpp_usb xpd_fxo xpd_fxs xpp)
-  endif
-
-  ALL_MODULES:=$(TOPDIR_MODULES:%=%.ko)
-  ALL_MODULES+=$(foreach mod,$(filter-out xpp,$(SUBDIR_MODULES)),$(mod)/$(mod).ko)
-  ALL_MODULES+=$(patsubst %,xpp/%.ko,xpp_usb xpd_fxo xpd_fxs xpp)
-endif
+ALL_MODULES	:= $(BUILD_TOPDIR_MODULES:%=%.o) \
+	$(join $(BUILD_SUBDIR_MODULES:%=%/), $(BUILD_SUBDIR_MODULES:%=%.o))
 
 OPTFLAG=-O2
 CFLAGS+=-I. $(OPTFLAGS) -g -fPIC -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER
@@ -174,11 +55,9 @@
 KFLAGS_PPC:=-msoft-float -fsigned-char
 endif
 KFLAGS+=$(KFLAGS_PPC)
-ifeq ($(KVERS_MAJ),2.4)
   ifneq (,$(findstring x86_64,$(UNAME_M)))
     KFLAGS+=-mcmodel=kernel
   endif
-endif
 
 #
 # Features are now configured in zconfig.h
@@ -187,119 +66,10 @@
 MODULE_ALIASES=wcfxs wctdm8xxp wct2xxp
 
 KFLAGS+=-DSTANDALONE_ZAPATA
-CFLAGS+=-DSTANDALONE_ZAPATA
-KMAKE  = $(MAKE) -C $(KSRC) SUBDIRS=$(PWD)/kernel \
-  HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE) KBUILD_OBJ_M="$(KBUILD_OBJ_M)"
-KMAKE_INST = $(KMAKE) \
-  INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=misc modules_install
 
-ROOT_PREFIX=
-
-CONFIG_FILE=/etc/zaptel.conf
-CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\"
-
-# sample makefile "trace print"
-#tracedummy=$(shell echo ====== GOT HERE ===== >&2; echo >&2)
-
-CHKCONFIG	:= $(wildcard /sbin/chkconfig)
-UPDATE_RCD	:= $(wildcard /usr/sbin/update-rc.d)
-ifeq (,$(DESTDIR))
-  ifneq (,$(CHKCONFIG))
-    ADD_INITD	:= $(CHKCONFIG) --add zaptel
-  else
-    ifndef (,$(UPDATE_RCD))
-      ADD_INITD	:= $(UPDATE_RCD) zaptel defaults 15 30
-    endif
-  endif
-endif
-
-INITRD_DIR	:= $(firstword $(wildcard /etc/rc.d/init.d /etc/init.d))
-ifneq (,$(INITRD_DIR))
-  INIT_TARGET	:= $(DESTDIR)$(INITRD_DIR)/zaptel
-  COPY_INITD	:= install -D zaptel.init $(INIT_TARGET)
-endif
-RCCONF_DIR	:= $(firstword $(wildcard /etc/sysconfig /etc/default))
-
-NETSCR_DIR	:= $(firstword $(wildcard /etc/sysconfig/network-scripts ))
-ifneq (,$(NETSCR_DIR))
-  NETSCR_TARGET	:= $(DESTDIR)$(NETSCR_DIR)/ifup-hdlc
-  COPY_NETSCR	:= install -D ifup-hdlc $(NETSCR_TARGET)
-endif
-
-ifneq ($(wildcard .version),)
-  ZAPTELVERSION:=$(shell cat .version)
-else
-ifneq ($(wildcard .svn),)
-  ZAPTELVERSION=SVN-$(shell build_tools/make_svn_branch_name)
-endif
-endif
-
-LTZ_A:=libtonezone.a
-LTZ_A_OBJS:=zonedata.o tonezone.o
-LTZ_SO:=libtonezone.so
-LTZ_SO_OBJS:=zonedata.lo tonezone.lo
-LTZ_SO_MAJOR_VER:=1
-LTZ_SO_MINOR_VER:=0
-
-# libdir, includedir and mandir are defined in makeopts (from
-# configure).
-# we use /sbin, rather than configure's $(sbindir) because we use /sbin
-# for historical reasons.
-BIN_DIR:=/sbin
-LIB_DIR:=$(libdir)
-INC_DIR:=$(includedir)/zaptel
-MAN_DIR:=$(mandir)/man8
 MOD_DIR:=$(DESTDIR)/lib/modules/$(KVERS)/misc
 
-# Utilities we build with a standard build procedure:
-UTILS		= zttool zttest ztmonitor ztspeed sethdlc-new ztcfg \
-		  ztcfg-dude usbfxstest fxstest fxotune ztdiag torisatool \
-		  ztscan
-
-
-# Makefile mentions them. Source is not included (anynore?)
-UTILS		+= fxsdump ztprovision
-
-# some tests:
-UTILS		+= patgen pattest patlooptest hdlcstress hdlctest hdlcgen \
-		   hdlcverify timertest
-
-UTILSO		= $(UTILS:%=%.o)
-
-BINS:=fxotune fxstest sethdlc-new ztcfg ztdiag ztmonitor ztspeed zttest ztscan
-ifeq (1,$(PBX_LIBNEWT))
-  BINS+=zttool
-endif
-BINS:=$(filter-out $(MENUSELECT_UTILS),$(BINS))
-MAN_PAGES:=$(wildcard $(BINS:%=doc/%.8))
-
-# All the man pages. Not just installed ones:
-GROFF_PAGES	:= $(wildcard doc/*.8)
-GROFF_HTML	:= $(GROFF_PAGES:%=%.html)
-
-all: menuselect.makeopts 
-	@$(MAKE) _all
-
-_all: $(if $(BUILD_MODULES),modules) programs
-
-libs: $(LTZ_SO) $(LTZ_A)
-
-utils-subdirs:
-	@for dir in $(SUBDIRS_UTILS); do \
-		$(MAKE) -C $$dir; \
-	done
-
-programs: libs utils
-
-utils: $(BINS) utils-subdirs
-
-modules: 
-	@if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
-ifeq ($(BUILDVER),linux26)
-	$(KMAKE) modules
-else
-modules: $(INSTALL_MODULES)
-endif
+all: modules
 
 ifeq ($(HPEC_PRESENT),yes)
 ifeq ($(ARCH),i386)
@@ -314,68 +84,20 @@
 zaptel-base.o: hpec/hpec_zaptel.h hpec/hpec_user.h
 endif
 
-version.h:
-	@ZAPTELVERSION="${ZAPTELVERSION}" build_tools/make_version_h > $@.tmp
-	@if cmp -s $@.tmp $@ ; then :; else \
-		mv $@.tmp $@ ; \
-	fi
-	@rm -f $@.tmp
+prereq: tor2fw.h radfw.h version.h
 
-tests: patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
+tor2fw.h: tormenta2.rbt makefw 
+	./makefw $< tor2fw > $@
 
-zonedata.lo: zonedata.c
-	$(CC) -c $(CFLAGS) -o $@ $^
+radfw.h: pciradio.rbt makefw
+	./makefw $< radfw > $@
 
-tonezone.lo: tonezone.c
-	$(CC) -c $(CFLAGS) -o $@ $^
+makefw: makefw.c
+	$(HOSTCC) -o $@ $^
+			
 
-prereq: config.status tor2fw.h radfw.h version.h
+modules: $(ALL_MODULES)
 
-zttool.o: kernel/zaptel.h
-zttool.o: CFLAGS+=$(NEWT_INCLUDE)
-zttool: LDLIBS+=$(NEWT_LIB)
-
-ztscan.o: kernel/zaptel.h
-
-ztprovision.o: kernel/zaptel.h
-
-ztmonitor.o: kernel/zaptel.h
-
-ztspeed: CFLAGS=
-
-sethdlc-new: CFLAGS+=-I$(KINCLUDES)
-
-$(LTZ_A): $(LTZ_A_OBJS)
-	ar rcs $@ $^
-	ranlib $@
-
-$(LTZ_SO): $(LTZ_SO_OBJS)
-	$(CC) $(CFLAGS) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) -o $@ $^ $(LDFLAGS) $(LDLIBS) -lm
-
-ztcfg.o: ztcfg.h kernel/zaptel.h
-ztcfg: ztcfg.o $(LTZ_A)
-ztcfg: LDLIBS+=-lm
-
-ztcfg-shared: ztcfg.o $(LTZ_SO)
-	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS) -lm
-
-ztcfg-dude: ztcfg-dude.o mknotch.o complex.o $(LTZ_SO)
-ztcfg-dude: LDLIBS+=-lm -lstdc++
-
-data:
-	$(MAKE) -C datamods datamods
-
-# FIXME: we assume CC can build the C++ modules:
-complex.o mknotch.o: %.o: %.cc
-	$(CC) $(CFLAGS) -o $@ -c $<
-
-usbfxstest: LDLIBS+=-lzap
-fxstest: $(LTZ_SO)
-fxstest: LDLIBS+=-lm
-fxotune: LDLIBS+=-lm
-fxsdump: LDLIBS+=-lm
-
-ifeq ($(BUILDVER),linux24)
 wct4xxp/wct4xxp.o:
 	$(MAKE) -C wct4xxp KFLAGS="$(KFLAGS) -I.." CFLAGS="$(CFLAGS) -I.."
 
@@ -402,51 +124,6 @@
 
 $(filter-out zaptel.o,$(BUILD_TOPDIR_MODULES:%=%.o)) zaptel-base.o: %.o: %.c zaptel.h
 	$(CC) $(KFLAGS) -o $@ -c $<
-endif
-
-stackcheck: checkstack modules
-	./checkstack *.ko */*.ko
-
-README.html: README
-	$(ASCIIDOC) -n -a toc -a toclevels=3 $<
-
-xpp/README.Astribank.html: xpp/README.Astribank
-	cd $(@D); $(ASCIIDOC) -o $(@F) -n -a toc -a toclevels=4 $(<F)
-
-# on Debian: this requires the full groof, not just groff-base.
-%.8.html: %.8
-	man -Thtml $^ >$@
-
-htmlman: $(GROFF_HTML)
-
-
-MISDNVERSION=1_1_3
-MISDNUSERVERSION=1_1_3
-b410p:
-	@if test "$(DOWNLOAD)" = ":" ; then \
-		echo "**************************************************"; \
-		echo "***                                            ***"; \
-		echo "*** You must have either wget or fetch to be   ***"; \
-		echo "*** able to automatically download and install ***"; \
-		echo "*** b410p support.                             ***"; \
-		echo "***                                            ***"; \
-		echo "*** Please install one of these.               ***"; \
-		echo "***                                            ***"; \
-		echo "**************************************************"; \
-		exit 1; \
-	fi
-	[ -f mISDN-$(MISDNVERSION).tar.gz ] || $(DOWNLOAD) http://downloads.digium.com/pub/zaptel/b410p/mISDN-$(MISDNVERSION).tar.gz
-	tar -zxf mISDN-$(MISDNVERSION).tar.gz
-	$(MAKE) -C mISDN-$(MISDNVERSION) install
-	[ -f mISDNuser-$(MISDNUSERVERSION).tar.gz ] || $(DOWNLOAD) http://downloads.digium.com/pub/zaptel/b410p/mISDNuser-$(MISDNUSERVERSION).tar.gz
-	tar -zxf mISDNuser-$(MISDNUSERVERSION).tar.gz
-	$(MAKE) -C mISDNuser-$(MISDNUSERVERSION) install
-
-$(UTILS): %: %.o
-	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
-
-$(UTILSO): %.o: %.c
-	$(CC) $(CFLAGS) -o $@ -c $<
 
 install: all devices install-modules install-programs install-firmware
 	@echo "###################################################"
@@ -458,224 +135,26 @@
 	@echo "###"
 	@echo "###################################################"
 
-install-programs: install-utils install-libs install-include
-
-install-utils: utils install-utils-subdirs
-ifneq (,$(BINS))
-	install -d $(DESTDIR)$(BIN_DIR)
-	install  $(BINS) $(DESTDIR)$(BIN_DIR)/
-	install -d $(DESTDIR)$(MAN_DIR)
-	install -m 644 $(MAN_PAGES) $(DESTDIR)$(MAN_DIR)/
-endif
-ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
-	$(INSTALL) -D -m 644 zaptel.conf.sample $(DESTDIR)$(CONFIG_FILE)
-endif
-
-# Pushing those two to a separate target that is not used by default:
-install-modconf:
-	build_tools/genmodconf $(BUILDVER) "$(ROOT_PREFIX)" "$(filter-out zaptel ztdummy xpp zttranscode ztdynamic,$(BUILD_MODULES)) $(MODULE_ALIASES)"
-	@if [ -d /etc/modutils ]; then \
-		/sbin/update-modules ; \
-	fi
-
-install-firmware:
-ifeq ($(HOTPLUG_FIRMWARE),yes)
-	$(MAKE) -C firmware hotplug-install DESTDIR=$(DESTDIR)
-endif
-
-install-libs: libs
-	$(INSTALL) -D -m 755 $(LTZ_A) $(DESTDIR)$(LIB_DIR)/$(LTZ_A)
-	$(INSTALL) -D -m 755 $(LTZ_SO) $(DESTDIR)$(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER)
-ifeq (,$(DESTDIR))
-	if [ `id -u` = 0 ]; then \
-		/sbin/ldconfig || : ;\
-	fi
-endif
-	rm -f $(DESTDIR)$(LIB_DIR)$(LTZ_SO)
-	$(LN) -sf $(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) \
-		$(DESTDIR)$(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER)
-	$(LN) -sf $(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) \
-		$(DESTDIR)$(LIB_DIR)/$(LTZ_SO)
-ifneq (no,$(USE_SELINUX))
-  ifeq (,$(DESTDIR))
-	/sbin/restorecon -v $(DESTDIR)$(LIB_DIR)/$(LTZ_SO)
-  endif
-endif
-	$(INSTALL) -D -m 644 tonezone.h $(DESTDIR)$(INC_DIR)/tonezone.h
-
-install-utils-subdirs:
-	@for dir in $(SUBDIRS_UTILS); do \
-		$(MAKE) -C $$dir install; \
-	done
-
-install-include:
-	$(INSTALL) -D -m 644 kernel/zaptel.h $(DESTDIR)$(INC_DIR)/zaptel.h
-
-devices:
-ifndef DYNFS
-	mkdir -p $(DESTDIR)/dev/zap
-	rm -f $(DESTDIR)/dev/zap/ctl
-	rm -f $(DESTDIR)/dev/zap/channel
-	rm -f $(DESTDIR)/dev/zap/pseudo
-	rm -f $(DESTDIR)/dev/zap/timer
-	rm -f $(DESTDIR)/dev/zap/transcode
-	rm -f $(DESTDIR)/dev/zap/253
-	rm -f $(DESTDIR)/dev/zap/252
-	rm -f $(DESTDIR)/dev/zap/251
-	rm -f $(DESTDIR)/dev/zap/250
-	mknod $(DESTDIR)/dev/zap/ctl c 196 0
-	mknod $(DESTDIR)/dev/zap/transcode c 196 250
-	mknod $(DESTDIR)/dev/zap/timer c 196 253
-	mknod $(DESTDIR)/dev/zap/channel c 196 254
-	mknod $(DESTDIR)/dev/zap/pseudo c 196 255
-	N=1; \
-	while [ $$N -lt 250 ]; do \
-		rm -f $(DESTDIR)/dev/zap/$$N; \
-		mknod $(DESTDIR)/dev/zap/$$N c 196 $$N; \
-		N=$$[$$N+1]; \
-	done
-else # DYNFS
-  ifdef UDEVRULES
-	install -d $(DESTDIR)/etc/udev/rules.d
-	build_tools/genudevrules > $(DESTDIR)/etc/udev/rules.d/zaptel.rules
-  else # !UDEVRULES
-	@echo "**** Dynamic filesystem detected -- not creating device nodes"
-  endif
-endif
-
-install-udev: devices
-
-uninstall-hotplug:
-	$(MAKE) -C firmware hotplug-uninstall DESTDIR=$(DESTDIR)
-
 BASENAMES=$(sort $(shell for x in $(ALL_MODULES); do basename $x; done))
 uninstall-modules:
-ifeq ($(BUILDVER),linux24)
-else
-	@./build_tools/uninstall-modules $(DESTDIR)/lib/modules/$(KVERS) $(BASENAMES)
-	@for x in $(ALL_MODULES); do \
-		rm -f $(DESTDIR)/lib/modules/$(KVERS)/extra/$$x ; \
-		rm -f $(DESTDIR)/lib/modules/$(KVERS)/misc/$$x ; \
-		rm -f $(DESTDIR)/lib/modules/$(KVERS)/zaptel/$$x ; \
-	done;
-endif
 
 BASENAMES=$(sort $(shell for mod in $(ALL_MODULES); do basename $$mod; done))
 
 install-modules: $(INSTALL_MODULES) uninstall-modules
-ifeq ($(BUILDVER),linux24)
 	$(INSTALL) -d $(DESTDIR)$(MOD_DIR)
 	$(INSTALL) -m 644 $(INSTALL_MODULES) $(DESTDIR)$(MOD_DIR)
-else
-	$(KMAKE_INST)
-  ifneq (,$(wildcard datamods/syncppp.ko))
-	$(MAKE) -C datamods install
-  endif
-endif
 	[ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
 
-config:
-ifneq (,$(COPY_INITD))
-	$(COPY_INITD)
-endif
-ifneq (,$(RCCONF_DIR))
-  ifeq (,$(wildcard $(DESTDIR)$(RCCONF_DIR)/zaptel))
-	$(INSTALL) -D -m 644 zaptel.sysconfig $(DESTDIR)$(RCCONF_DIR)/zaptel
-  endif
-endif
-ifneq (,$(COPY_NETSCR))
-	$(COPY_NETSCR)
-endif
-ifneq (,$(ADD_INITD))
-	$(ADD_INITD)
-endif
-	@echo "Zaptel has been configured."
-	@echo ""
-	@echo "If you have any zaptel hardware it is now recommended to "
-	@echo "edit /etc/default/zaptel or /etc/sysconfig/zaptel and set there an "
-	@echo "optimal value for the variable MODULES ."
-	@echo ""
-	@echo "I think that the zaptel hardware you have on your system is:"
-	@kernel/xpp/utils/zaptel_hardware || true
-
-
-update:
-	@if [ -d .svn ]; then \
-		echo "Updating from Subversion..." ; \
-		svn update | tee update.out; \
-		rm -f .version; \
-		if [ `grep -c ^C update.out` -gt 0 ]; then \
-			echo ; echo "The following files have conflicts:" ; \
-			grep ^C update.out | cut -b4- ; \
-		fi ; \
-		rm -f update.out; \
-	else \
-		echo "Not under version control";  \
-	fi
-
 clean:
-	-@$(MAKE) -C menuselect clean
-	rm -f torisatool makefw tor2fw.h radfw.h
-	rm -f $(BINS)
-	rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
-	rm -f $(LTZ_SO) $(LTZ_A) *.lo
-ifeq ($(BUILDVER),linux26)
-  ifneq (,$(KSRC))
-	$(KMAKE) clean
-  endif
-else
+	rm -f makefw tor2fw.h radfw.h
+	rm -f *.o 
 	$(MAKE) -C wct4xxp clean
-endif
-	@for dir in $(SUBDIRS_UTILS_ALL); do \
-		$(MAKE) -C $$dir clean; \
-	done
-	$(MAKE) -C firmware clean
 	rm -rf .tmp_versions
-	rm -f gendigits tones.h
-	rm -f libtonezone*
-	rm -f fxotune
 	rm -f core
-	rm -f ztcfg-shared fxstest
-	rm -rf misdn*
-	rm -rf mISDNuser*
-	rm -rf README.html xpp/README.Astribank.html
 
 distclean: dist-clean
 
 dist-clean: clean
-	@$(MAKE) -C menuselect dist-clean
-	@$(MAKE) -C firmware dist-clean
-	rm -f makeopts menuselect.makeopts menuselect-tree
-	rm -f config.log config.status
 
-config.status: configure
-	@CFLAGS="" ./configure
-	@echo "****"
-	@echo "**** The configure script was just executed, so 'make' needs to be"
-	@echo "**** restarted."
-	@echo "****"
-	@exit 1
+.PHONY: menuselect distclean dist-clean clean all _all install modules config install-modules uninstall-modules
 
-menuselect.makeopts: menuselect/menuselect menuselect-tree
-	@menuselect/menuselect --check-deps ${GLOBAL_MAKEOPTS} ${USER_MAKEOPTS} $@
-
-menuconfig: menuselect
-
-menuselect: menuselect/menuselect menuselect-tree
-	- at menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
-
-menuselect/menuselect: menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h config.status
-	@CFLAGS="" $(MAKE) -C menuselect CC=$(HOSTCC)
-
-menuselect-tree: zaptel.xml firmware/firmware.xml
-	@echo "Generating input for menuselect ..."
-	@build_tools/make_tree > $@
-
-.EXPORT_ALL_VARIABLES:
-
-.PHONY: menuselect distclean dist-clean clean version.h all _all install b410p devices programs modules tests devel data stackcheck install-udev config update install-programs install-modules install-include install-libs install-utils-subdirs utils-subdirs uninstall-modules
-
-endif
-
-#end of: ifneq ($(KBUILD_EXTMOD),)
-endif

Modified: team/tzafrir/move/kernel/wct4xxp/Makefile
URL: http://svn.digium.com/view/zaptel/team/tzafrir/move/kernel/wct4xxp/Makefile?view=diff&rev=3769&r1=3768&r2=3769
==============================================================================
--- team/tzafrir/move/kernel/wct4xxp/Makefile (original)
+++ team/tzafrir/move/kernel/wct4xxp/Makefile Wed Jan 30 19:55:15 2008
@@ -5,6 +5,8 @@
 include $(src)/Kbuild
 
 else
+
+FIRM_DIR	:= ../../firmware
 
 OCTASIC_OBJS:=$(shell ../oct612x/octasic-helper objects ../oct612x)
 OCTASIC_CFLAGS:=$(shell ../oct612x/octasic-helper cflags ../oct612x) -Wno-undef
@@ -18,13 +20,13 @@
 
 vpm450m.o: vpm450m.h ../oct612x/include/oct6100api/oct6100_api.h
 
-../firmware/zaptel-fw-oct6114-064.o: base.o
-	$(MAKE) -C ../firmware zaptel-fw-oct6114-064.o
+$(FIRM_DIR)/zaptel-fw-oct6114-064.o: base.o
+	$(MAKE) -C $(FIRM_DIR) zaptel-fw-oct6114-064.o
 
-../firmware/zaptel-fw-oct6114-128.o: base.o
-	$(MAKE) -C ../firmware zaptel-fw-oct6114-128.o
+$(FIRM_DIR)/zaptel-fw-oct6114-128.o: base.o
+	$(MAKE) -C $(FIRM_DIR) zaptel-fw-oct6114-128.o
 
-wct4xxp.o: base.o vpm450m.o $(OCTASIC_OBJS) ../firmware/zaptel-fw-oct6114-064.o ../firmware/zaptel-fw-oct6114-128.o
+wct4xxp.o: base.o vpm450m.o $(OCTASIC_OBJS) $(FIRM_DIR)/zaptel-fw-oct6114-064.o $(FIRM_DIR)/zaptel-fw-oct6114-128.o
 	$(LD) -r -o $@ $^
 
 clean:




More information about the zaptel-commits mailing list