[zaptel-commits] branch 1.2 r1015 - /branches/1.2/Makefile

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Sun Apr 30 09:11:51 MST 2006


Author: kpfleming
Date: Sun Apr 30 11:11:50 2006
New Revision: 1015

URL: http://svn.digium.com/view/zaptel?rev=1015&view=rev
Log:
optimize variable settings
use the kernel Makefile for every step that it can be

Modified:
    branches/1.2/Makefile

Modified: branches/1.2/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.2/Makefile?rev=1015&r1=1014&r2=1015&view=diff
==============================================================================
--- branches/1.2/Makefile (original)
+++ branches/1.2/Makefile Sun Apr 30 11:11:50 2006
@@ -25,8 +25,8 @@
 CFLAGS_PPC:=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
 CFLAGS_X86-64:=$(shell if uname -m | grep -q x86_64; then echo "-m64"; fi)
 CFLAGS+=$(CFLAGS_PPC) $(CFLAGS_X86-64)
-LCFLAGS=-fPIC $(CFLAGS) -DBUILDING_TONEZONE
-KFLAGS=-I$(KINCLUDES) -O6
+LCFLAGS:=-fPIC $(CFLAGS) -DBUILDING_TONEZONE
+KFLAGS:=-I$(KINCLUDES) -O6
 KFLAGS+=-DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -I$(KSRC)/drivers/net \
 	-Wall -I. -Wstrict-prototypes -fomit-frame-pointer -I$(KSRC)/drivers/net/wan -I$(KINCLUDES)/net
 ifneq (,$(wildcard $(KINCLUDES)/linux/modversions.h))
@@ -42,11 +42,14 @@
 
 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
+EXTRA_CFLAGS:=-I$(src)
 
 ROOT_PREFIX=
-INSTALL_PREFIX=$(DESTDIR)
-
-CONFIG_FILE=$(INSTALL_PREFIX)/etc/zaptel.conf
+INSTALL_PREFIX:=$(DESTDIR)
+
+CONFIG_FILE:=$(INSTALL_PREFIX)/etc/zaptel.conf
 CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\"
 
 ifeq (2.6,$(shell echo $(KVERS) | cut -d. -f1-2))
@@ -158,9 +161,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) XPPMOD=$(XPPMOD) modules
-
-xpp: linux26
+	$(KMAKE) modules
+
+obj-m += $(MODULESO)
 
 #ifneq ($(TOPDIR),)
 #include $(TOPDIR)/Rules.make
@@ -342,7 +345,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; \
@@ -462,9 +465,9 @@
 	rm -f ${BINS}
 	rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
 	rm -f $(TZOBJS) $(LIBTONEZONE_SO) *.lo
-	rm -f *.ko *.mod.c .*o.cmd
-	rm -f xpp/*.ko xpp/*.mod.c xpp/.*o.cmd
-	rm -f xpp/*.o xpp/*.mod.o
+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