summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-10 20:53:43 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-10 20:53:43 +0000
commit37366779f945dd90804c31ee827a93e216e228c0 (patch)
treeadcd712dfd66c43755793583ae6b67c10f23b23c /Makefile
parent486c64f2c5aae33d0069e37f9f64c8d730985af3 (diff)
* Add a list of userspace subdirectories (just like for kernel).
* Make it saner to enable/disable them. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3396 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 21 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 42bc3e4..f19093d 100644
--- a/Makefile
+++ b/Makefile
@@ -98,6 +98,13 @@ ifeq ($(findstring xpp,$(MENUSELECT_MODULES)),)
BUILD_XPP:=yes
endif
+SUBDIRS_UTILS_ALL:= xpp/utils ppp
+SUBDIRS_UTILS :=
+ifeq ($(BUILD_XPP),yes)
+ SUBDIRS_UTILS += xpp/utils
+endif
+#SUBDIRS_UTILS += ppp
+
TOPDIR_MODULES:=pciradio tor2 torisa wcfxo wct1xxp wctdm wcte11xp wcusb zaptel ztd-eth ztd-loc ztdummy ztdynamic zttranscode
SUBDIR_MODULES:=wct4xxp wctc4xxp xpp wctdm24xxp wcte12xp
TOPDIR_MODULES+=$(MODULES_EXTRA)
@@ -259,14 +266,14 @@ _all: $(if $(BUILD_MODULES),modules) programs
libs: $(LTZ_SO) $(LTZ_A)
-xpp-utils:
-ifeq (yes,$(BUILD_XPP))
- @$(MAKE) -C xpp/utils
-endif
+utils-subdirs:
+ @for dir in $(SUBDIRS_UTILS); do \
+ $(MAKE) -C $$dir; \
+ done
programs: libs utils
-utils: $(BINS) xpp-utils
+utils: $(BINS) utils-subdirs
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
@@ -445,7 +452,7 @@ install: all devices install-modules install-programs install-firmware
install-programs: install-utils install-libs install-include
-install-utils: utils install-xpp
+install-utils: utils install-utils-subdirs
ifneq (,$(BINS))
install -d $(DESTDIR)$(BIN_DIR)
install $(BINS) $(DESTDIR)$(BIN_DIR)/
@@ -488,10 +495,10 @@ ifneq (no,$(USE_SELINUX))
endif
$(INSTALL) -D -m 644 tonezone.h $(DESTDIR)$(INC_DIR)/tonezone.h
-install-xpp:
-ifeq (yes,$(BUILD_XPP))
- @$(MAKE) -C xpp/utils install
-endif
+install-utils-subdirs:
+ @for dir in $(SUBDIRS_UTILS); do \
+ $(MAKE) -C $$dir install; \
+ done
install-include:
$(INSTALL) -D -m 644 zaptel.h $(DESTDIR)$(INC_DIR)/zaptel.h
@@ -608,10 +615,12 @@ ifeq ($(BUILDVER),linux26)
ifneq (,$(KSRC))
$(KMAKE) clean
endif
- $(MAKE) -C xpp/utils clean
else
$(MAKE) -C wct4xxp clean
endif
+ @for dir in $(SUBDIRS_UTILS_ALL); do \
+ $(MAKE) -C $$dir clean; \
+ done
$(MAKE) -C firmware clean
rm -rf .tmp_versions
rm -f gendigits tones.h
@@ -656,6 +665,6 @@ menuselect-tree: zaptel.xml firmware/firmware.xml
.EXPORT_ALL_VARIABLES:
-.PHONY: menuselect distclean dist-clean clean version.h all _all install b410p devices programs modules tests devel data stackcheck install-udev config update install-programs install-modules install-include install-libs install-xpp xpp-utils uninstall-modules
+.PHONY: menuselect distclean dist-clean clean version.h all _all install b410p devices programs modules tests devel data stackcheck install-udev config update install-programs install-modules install-include install-libs install-utils-subdirs utils-subdirs uninstall-modules
endif