From 614a39ced8799b3ec63cc738ee7dda095a6ea74c Mon Sep 17 00:00:00 2001 From: file Date: Wed, 7 Feb 2007 20:09:29 +0000 Subject: Merged revisions 2107 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 ........ r2107 | file | 2007-02-07 15:01:41 -0500 (Wed, 07 Feb 2007) | 2 lines Merge in zaptel-firmware branch. This basically downloads the firmware from the FTP site and builds the appropriate headers based on the current version. Drivers just know they need a certain firmware and get fed the current version. If this prevents your zaptel from building do a make distclean and start fresh or make sure the firmware is checked in make menuselect. ........ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2108 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- Makefile | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fb46314..535419d 100644 --- a/Makefile +++ b/Makefile @@ -200,6 +200,9 @@ linux24: prereq $(MODULESO) wct4xxp/wct4xxp.o linux26: prereq @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 ($(HOTPLUG_FIRMWARE),yes) + $(MAKE) -C firmware header-build +endif $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE) modules xpp: linux26 @@ -321,11 +324,22 @@ stackcheck: checkstack $(BUILDVER) ./checkstack *.o b410p: - @wget -V >/dev/null || (echo "You need wget in order to install the drivers" ; false) - [ -f misdn-b410p.tar.gz ] || wget ftp://ftp.digium.com/pub/zaptel/b410p/misdn-b410p.tar.gz + @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-b410p.tar.gz ] || $(DOWNLOAD) ftp://ftp.digium.com/pub/zaptel/b410p/misdn-b410p.tar.gz tar -zxf misdn-b410p.tar.gz $(MAKE) -C misdn install - [ -f mISDNuser.tar.gz ] || wget ftp://ftp.digium.com/pub/zaptel/b410p/mISDNuser.tar.gz + [ -f mISDNuser.tar.gz ] || $(DOWNLOAD) ftp://ftp.digium.com/pub/zaptel/b410p/mISDNuser.tar.gz tar -zxf mISDNuser.tar.gz $(MAKE) -C mISDNuser install @@ -372,6 +386,9 @@ ifneq (,$(findstring xpp,$(obj-m))) endif install: all devices firmware install-libs install-include xpp-install +ifeq ($(HOTPLUG_FIRMWARE),yes) + $(MAKE) -C firmware hotplug-install +endif if [ -f ztcfg ]; then \ $(INSTALL) -D -m 755 ztcfg $(INSTALL_PREFIX)/sbin/ztcfg; \ fi @@ -435,21 +452,6 @@ install-include: install-udev: devices -firmware: -ifeq ($(HOTPLUG_FIRMWARE),yes) - if [ -d $(INSTALL_PREFIX)/usr/lib/hotplug/firmware ]; then \ - $(INSTALL) -m 644 wct4xxp/*.ima $(INSTALL_PREFIX)/usr/lib/hotplug/firmware; \ - $(INSTALL) -m 644 ztcodec_dte/*.bin $(INSTALL_PREFIX)/usr/lib/hotplug/firmware; \ - fi - if [ -d $(INSTALL_PREFIX)/lib/firmware ]; then \ - $(INSTALL) -m 644 wct4xxp/*.ima $(INSTALL_PREFIX)/lib/firmware; \ - $(INSTALL) -m 644 ztcodec_dte/*.bin $(INSTALL_PREFIX)/lib/firmware; \ - fi - @echo "Installed firmware" -else - @echo "Not installing firmware because we are not using hotplug firmware" -endif - config: if [ -d $(INSTALL_PREFIX)/etc/rc.d/init.d ]; then \ $(INSTALL) -D -m 755 zaptel.init $(INSTALL_PREFIX)/etc/rc.d/init.d/zaptel; \ @@ -512,6 +514,7 @@ else $(MAKE) -C ztcodec_dte clean $(MAKE) -C datamods clean endif + $(MAKE) -C firmware clean rm -f xpp/*.ko xpp/*.mod.c xpp/.*o.cmd rm -f xpp/*.o xpp/*.mod.o rm -rf .tmp_versions @@ -528,7 +531,8 @@ distclean: dist-clean dist-clean: clean @$(MAKE) -C menuselect dist-clean - rm -f makeopts menuselect.makeopts + @$(MAKE) -C firmware dist-clean + rm -f makeopts menuselect.makeopts menuselect-tree rm -f config.log config.status config.status: configure @@ -549,3 +553,7 @@ menuselect: menuselect/menuselect menuselect-tree 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 + +menuselect-tree: zaptel.xml firmware/firmware.xml + @echo "Generating input for menuselect ..." + @build_tools/make_tree > $@ -- cgit v1.2.3