summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-08-17 12:50:36 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-08-17 12:50:36 +0000
commitce64c43715115f4b68466dc52d0ed39b5695738b (patch)
treeec9ed4cb014e159d5a182546d5ca076752dc0f16 /Makefile
parenta2eb717208aa5f272a85b86bf8e23903318d4a70 (diff)
* programs and install-programs are now for all of userspace.
Added the target 'utils' for what 'programs' used to be. * tonezone.h is installed with install-libs, not install-include . * Document this. * Document some other variations on 'make' and 'make install'. * Improve documentation of /proc/zaptel . * Ignoring some more utilities. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@2874 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 13 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 9bc763b..821a988 100644
--- a/Makefile
+++ b/Makefile
@@ -202,6 +202,7 @@ 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 (,$(NET_SCR_DIR))
@@ -254,7 +255,7 @@ MAN_PAGES:=$(wildcard $(BINS:%=doc/%.8))
all: menuselect.makeopts
@$(MAKE) _all
-_all: $(if $(BUILD_MODULES),modules) programs libs
+_all: $(if $(BUILD_MODULES),modules) programs
libs: $(LTZ_SO) $(LTZ_A)
@@ -263,7 +264,9 @@ ifeq (yes,$(BUILD_XPP))
@$(MAKE) -C xpp/utils
endif
-programs: $(BINS) xpp-utils
+programs: libs utils
+
+utils: $(BINS) xpp-utils
modules: 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
@@ -433,7 +436,7 @@ $(UTILS): %: %.o
$(UTILSO): %.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
-install: all devices install-modules install-libs firmware
+install: all devices install-modules install-programs firmware
@echo "###################################################"
@echo "###"
@echo "### Zaptel installed successfully."
@@ -443,7 +446,9 @@ install: all devices install-modules install-libs firmware
@echo "###"
@echo "###################################################"
-install-programs: programs install-xpp
+install-programs: install-utils install-libs install-inlcude
+
+install-utils: utils install-xpp
install -d $(DESTDIR)$(BIN_DIR)
install $(BINS) $(DESTDIR)$(BIN_DIR)/
install -d $(DESTDIR)$(MAN_DIR)
@@ -480,6 +485,7 @@ endif
ifeq (,$(DESTDIR))
if $(SELINUX_COND); then /sbin/restorecon -v $(DESTDIR)$(LIB_DIR)/$(LTZ_SO); fi
endif
+ $(INSTALL) -D -m 644 tonezone.h $(DESTDIR)$(INC_DIR)/tonezone.h
install-xpp:
ifeq (yes,$(BUILD_XPP))
@@ -488,7 +494,6 @@ endif
install-include:
$(INSTALL) -D -m 644 zaptel.h $(DESTDIR)$(INC_DIR)/zaptel.h
- $(INSTALL) -D -m 644 tonezone.h $(DESTDIR)$(INC_DIR)/tonezone.h
devices:
ifndef DYNFS
@@ -553,14 +558,9 @@ config:
ifneq (,$(COPY_INITD))
$(COPY_INITD)
endif
-ifneq (,$(wildcard /etc/default))
- ifeq (,$(wildcard $(DESTDIR)/etc/default/zaptel))
- install -D -m 644 zaptel.sysconfig $(DESTDIR)/etc/default/zaptel
- endif
-endif
-ifneq (,$(wildcard /etc/sysconfig))
- ifeq (,$(wildcard $(DESTDIR)/etc/sysconfig/zaptel))
- install -D -m 644 zaptel.sysconfig $(DESTDIR)/etc/sysconfig/zaptel
+ifneq (,$(RCCONF_DIR))
+ ifeq (,$(wildcard $(DESTDIR)$(RCCONF_DIR)/zaptel))
+ $(INSTALL) -D -m 644 zaptel.sysconfig $(DESTDIR)$(RCCONF_DIR)/zaptel
endif
endif
ifneq (,$(COPY_NETSCR))