[svn-commits] trunk - r899 /trunk/Makefile

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Jan 12 17:38:08 CST 2006


Author: mattf
Date: Thu Jan 12 17:38:08 2006
New Revision: 899

URL: http://svn.digium.com/view/zaptel?rev=899&view=rev
Log:
More target additions for seperating out the modulels install and the programs install (#4962)

Modified:
    trunk/Makefile

Modified: trunk/Makefile
URL: http://svn.digium.com/view/zaptel/trunk/Makefile?rev=899&r1=898&r2=899&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Thu Jan 12 17:38:08 2006
@@ -145,6 +145,16 @@
 endif
 MODULESO:=$(MODULES:%=%.o)
 MODULESKO:=$(MODULES:%=%.ko)
+ifeq ($(BUILDVER),linux26)
+MODULES_BUILD:=$(MODULESKO)
+else
+MODULES_BUILD:=$(MODULESO)
+endif
+
+BIN_DIR:=$(INSTALL_PREFIX)/sbin
+LIB_DIR:=$(INSTALL_PREFIX)/usr/lib
+INC_DIR:=$(INSTALL_PREFIX)/usr/include
+MOD_DIR:=$(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc
 
 ifneq (,$(wildcard /usr/include/newt.h))
 ZTTOOL:=zttool
@@ -159,7 +169,11 @@
 #PRIMARY=wcfxo
 PWD:=$(shell pwd)
 
-all: $(BUILDVER) $(LIBTONEZONE_SO)
+all: modules $(LIBTONEZONE_SO)
+
+programs: $(BINS)
+
+modules: $(BUILDVER)
 
 linux24: $(MODULESO) $(BINS)
 
@@ -446,6 +460,20 @@
 		echo "Not under version control";  \
 	fi
 
+# make should *fail* and not silently succeed if a program did not build
+install-programs: $(BINS) $(LIBTONEZONE) libtonezone.a
+	install -d $(BIN_DIR)
+	install $(BINS) $(BIN_DIR)
+	install -d $(LIB_DIR)
+	install -m 755 $(LIBTONEZONE) libtonezone.a $(LIB_DIR)
+	install -d $(INC_DIR)/linux
+	install -m 644 tonezone.h $(INC_DIR)
+	install -m 644 zaptel.h torisa.h $(INC_DIR)/linux
+
+install-modules: $(MODULES_BUILD)
+	install -d $(MOD_DIR)
+	install -m 644 $(MODULES_BUILD) $(MOD_DIR)
+
 clean:
 	rm -f torisatool makefw tor2fw.h radfw.h
 	rm -f ${BINS}



More information about the svn-commits mailing list