From d7463a6d7d840dd4dcf90c412f509edd3f258590 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Wed, 15 Aug 2007 15:27:13 +0000 Subject: Fixing installation targets: - programs/install-programs - userspace utilities. - libs/install-libs - libtonezone - modules/install-modules - kernel stuff Those can be used independently. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2840 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- Makefile | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fe818d3..773f564 100644 --- a/Makefile +++ b/Makefile @@ -195,10 +195,12 @@ MAN_PAGES_BASE += zttool endif MAN_PAGES = $(MAN_PAGES_BASE:%=doc/%.8) -all: programs modules $(LIBTONEZONE_SO) +all: programs modules libs programs: $(BINS) +libs: $(LIBTONEZONE_SO) + ifeq ($(BUILDVER),linux24) modules: prereq $(MODULESO) wct4xxp/wct4xxp.o else @@ -402,23 +404,36 @@ b410p: tar -zxf mISDNuser.tar.gz $(MAKE) -C mISDNuser install -install: all devices install-modules install-libs install-include firmware - install -D -m 755 ztcfg $(DESTDIR)$(SBINDIR)/ztcfg +install: all devices install-modules install-libs firmware + @echo "###################################################" + @echo "###" + @echo "### Zaptel installed successfully." + @echo "### If you have not done so before, install init scripts with:" + @echo "###" + @echo "### make config" + @echo "###" + @echo "###################################################" + +install-programs: programs + install -d $(DESTDIR)$(SBINDIR) + install -m 755 $(BINS) $(DESTDIR)$(SBINDIR) 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 -d $(DESTDIR)$(INCLUDE_DIR)/linux + install -m 644 zaptel.h torisa.h $(DESTDIR)$(INCLUDE_DIR)/linux/ 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) "$(DESTDIR)" "$(filter-out zaptel ztdummy zttranscode wctc4xxp ztdynamic xpp_usb,$(MODULES)) $(MODULE_ALIASES)" ifeq (,$(DESTDIR)) @if [ -d /etc/modutils ]; then \ @@ -426,14 +441,6 @@ ifeq (,$(DESTDIR)) fi endif - @echo "###################################################" - @echo "###" - @echo "### Zaptel installed successfully." - @echo "### If you have not done so before, install init scripts with:" - @echo "###" - @echo "### make config" - @echo "###" - @echo "###################################################" # Specific to a kernel version: install-modules: modules @@ -452,11 +459,7 @@ endif rm -f $(DESTDIR)$(MODS_DIR)/wcfxs.o [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || : -install-programs: $(BINS) - install -d $(DESTDIR)$(SBINDIR) - install -m 755 $(BINS) $(DESTDIR)$(SBINDIR) - -install-libs: $(LIBTONEZONE_SO) +install-libs: libs 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) @@ -464,15 +467,12 @@ install-libs: $(LIBTONEZONE_SO) $(DESTDIR)$(LIBDIR)/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER) ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \ $(DESTDIR)$(LIBDIR)/$(LIBTONEZONE_SO) + install -d $(DESTDIR)$(INCLUDE_DIR) + install -m 644 tonezone.h $(DESTDIR)$(INCLUDE_DIR) 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) - install-udev: devices # FIRMWARE_DIR also implies HOTPLUG_FIRMWARE, unless set manually. -- cgit v1.2.3