[zaptel-commits] trunk - r900 /trunk/Makefile

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Thu Jan 12 18:19:51 MST 2006


Author: mattf
Date: Thu Jan 12 18:19:51 2006
New Revision: 900

URL: http://svn.digium.com/view/zaptel?rev=900&view=rev
Log:
Use kbuild for ALL portions of 2.6 install/cleanup (#4962) last one!!! :-)

Modified:
    trunk/Makefile

Modified: trunk/Makefile
URL: http://svn.digium.com/view/zaptel/trunk/Makefile?rev=900&r1=899&r2=900&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Thu Jan 12 18:19:51 2006
@@ -58,6 +58,9 @@
 
 KFLAGS+=-DSTANDALONE_ZAPATA
 CFLAGS+=-DSTANDALONE_ZAPATA
+KMAKE  = $(MAKE) -C $(KSRC) SUBDIRS=$(PWD)
+KMAKE_INST = $(KMAKE) \
+  INSTALL_MOD_PATH=$(INSTALL_PREFIX) INSTALL_MOD_DIR=misc modules_install
 
 ROOT_PREFIX=
 INSTALL_PREFIX=$(DESTDIR)
@@ -180,9 +183,9 @@
 linux26: prereq $(BINS)
 	@echo $(KSRC)
 	@if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
-	$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules
-
-obj-m := $(MODULESO)
+	$(KMAKE) modules
+
+obj-m += $(MODULESO)
 
 #ifneq ($(TOPDIR),)
 #include $(TOPDIR)/Rules.make
@@ -345,7 +348,7 @@
 		for x in $(MODULESKO); do \
 			rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/extra/$$x ; \
 		done; \
-		$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) INSTALL_MOD_PATH=$(INSTALL_PREFIX) INSTALL_MOD_DIR=misc modules_install; \
+		$(KMAKE_INST); \
 		if ! [ -f wcfxsusb.ko ]; then \
 			rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc/wcfxsusb.ko; \
 		fi; \
@@ -470,16 +473,22 @@
 	install -m 644 tonezone.h $(INC_DIR)
 	install -m 644 zaptel.h torisa.h $(INC_DIR)/linux
 
-install-modules: $(MODULES_BUILD)
+install-modules: install-$(BUILDVER)
+install-linux24: $(MODULES_BUILD)
 	install -d $(MOD_DIR)
 	install -m 644 $(MODULES_BUILD) $(MOD_DIR)
+
+install-linux26: $(MODULESKO)
+	$(KMAKE_INST)
 
 clean:
 	rm -f torisatool makefw tor2fw.h radfw.h
 	rm -f ${BINS}
 	rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
 	rm -f $(TZOBJS) $(LIBTONEZONE_SO) *.lo
-	rm -f *.ko *.mod.c .*o.cmd
+ifeq (${BUILDVER},linux26)
+	$(KMAKE) clean
+endif
 	rm -rf .tmp_versions
 	rm -f gendigits tones.h
 	rm -f libtonezone*



More information about the zaptel-commits mailing list