summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile46
1 files changed, 27 insertions, 19 deletions
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 > $@