summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorqwell <qwell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-07-27 21:55:56 +0000
committerqwell <qwell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-07-27 21:55:56 +0000
commit059c88ee8b6a857b0e9a033d188a50fe305fda46 (patch)
tree96c2851ea483f5441c893ccb8ffb9358beeadc66 /Makefile
parentb712f06fa3cb4454234ff62e1db02f75ff837a0b (diff)
Rearrange and add some Makefile targets to be in line with the original intentions
of the addition of targets such as install-programs. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2789 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile60
1 files changed, 33 insertions, 27 deletions
diff --git a/Makefile b/Makefile
index 20f8337..4c3746b 100644
--- a/Makefile
+++ b/Makefile
@@ -188,9 +188,9 @@ MAN_PAGES_BASE += zttool
endif
MAN_PAGES = $(MAN_PAGES_BASE:%=doc/%.8)
-all: programs modules
+all: programs modules $(LIBTONEZONE_SO)
-programs: $(BINS) $(LIBTONEZONE_SO)
+programs: $(BINS)
ifeq ($(BUILDVER),linux24)
modules: prereq $(MODULESO) wct4xxp/wct4xxp.o
@@ -395,7 +395,30 @@ b410p:
tar -zxf mISDNuser.tar.gz
$(MAKE) -C mISDNuser install
-install: install-modules install-programs
+install: all devices install-modules install-libs install-include firmware
+ install -D -m 755 ztcfg $(DESTDIR)$(SBINDIR)/ztcfg
+ifneq (,$(wildcard sethdlc-new))
+ install -D -m 755 sethdlc-new $(DESTDIR)$(SBINDIR)/sethdlc
+else
+ ifneq (,$(wildcard sethdlc))
+ install -D -m 755 sethdlc $(DESTDIR)$(SBINDIR)/sethdlc
+ endif
+endif
+ifneq (,$(wildcard zttool))
+ install -D -m 755 zttool $(DESTDIR)$(SBINDIR)/zttool
+endif
+ install -d $(DESTDIR)$(MANDIR)
+ install -m 644 $(MAN_PAGES) $(DESTDIR)$(MANDIR)
+ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
+ install -D -m 644 zaptel.conf.sample $(DESTDIR)$(CONFIG_FILE)
+endif
+ build_tools/genmodconf $(BUILDVER) "$(DESTDIR)" "$(filter-out zaptel ztdummy zttranscode wctc4xxp ztdynamic xpp_usb,$(MODULES)) $(MODULE_ALIASES)"
+ifeq (,$(DESTDIR))
+ @if [ -d /etc/modutils ]; then \
+ /sbin/update-modules ; \
+ fi
+endif
+
@echo "###################################################"
@echo "###"
@echo "### Zaptel installed successfully."
@@ -422,21 +445,11 @@ endif
rm -f $(DESTDIR)$(MODS_DIR)/wcfxs.o
[ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
-# All the userspace components. Common to all the system:
-install-programs: programs devices firmware
- install -D -m 755 ztcfg $(DESTDIR)$(SBINDIR)/ztcfg
-ifneq (,$(wildcard sethdlc-new))
- install -D -m 755 sethdlc-new $(DESTDIR)$(SBINDIR)/sethdlc
-else
- ifneq (,$(wildcard sethdlc))
- install -D -m 755 sethdlc $(DESTDIR)$(SBINDIR)/sethdlc
- endif
-endif
-ifneq (,$(wildcard zttool))
- install -D -m 755 zttool $(DESTDIR)$(SBINDIR)/zttool
-endif
- install -d $(DESTDIR)$(MANDIR)
- install -m 644 $(MAN_PAGES) $(DESTDIR)$(MANDIR)
+install-programs: $(BINS)
+ install -d $(DESTDIR)$(SBINDIR)
+ install -m 755 $(BINS) $(DESTDIR)$(SBINDIR)
+
+install-libs: $(LIBTONEZONE_SO)
install -D -m 755 $(LIBTONEZONE_SO) $(DESTDIR)$(LIBDIR)/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER)
[ `id -u` = 0 ] && /sbin/ldconfig || :
rm -f $(DESTDIR)$(LIBDIR)/$(LIBTONEZONE_SO)
@@ -447,18 +460,11 @@ endif
ifneq (,$(SELINUX_ENABLED))
/sbin/restorecon -v $(DESTDIR)$(LIBDIR)/$(LIBTONEZONE_SO)
endif
+
+install-include:
install -d $(DESTDIR)$(INCLUDE_DIR)/linux
install -m 644 zaptel.h torisa.h $(DESTDIR)$(INCLUDE_DIR)/linux/
install -m 644 tonezone.h $(DESTDIR)$(INCLUDE_DIR)
-ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
- install -D -m 644 zaptel.conf.sample $(DESTDIR)$(CONFIG_FILE)
-endif
- build_tools/genmodconf $(BUILDVER) "$(DESTDIR)" "$(filter-out zaptel ztdummy zttranscode wctc4xxp ztdynamic xpp_usb,$(MODULES)) $(MODULE_ALIASES)"
-ifeq (,$(DESTDIR))
- @if [ -d /etc/modutils ]; then \
- /sbin/update-modules ; \
- fi
-endif
install-udev: devices