[svn-commits] tzafrir: branch 1.2 r2747 - /branches/1.2/Makefile

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 16 13:47:40 CDT 2007


Author: tzafrir
Date: Mon Jul 16 13:47:39 2007
New Revision: 2747

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2747
Log:
Allow overriding the output of uname -m and uname -r with the variables 
MACHINE and KVERS, respectively.

KVERS existed before, but ther ewere still direct uses of uname -r left.

Modified:
    branches/1.2/Makefile

Modified: branches/1.2/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.2/Makefile?view=diff&rev=2747&r1=2746&r2=2747
==============================================================================
--- branches/1.2/Makefile (original)
+++ branches/1.2/Makefile Mon Jul 16 13:47:39 2007
@@ -11,7 +11,11 @@
 PWD:=$(shell pwd)
 endif
 
-ARCH:=$(shell uname -m | sed -e s/i.86/i386/)
+ifndef MACHINE
+  MACHINE	:=$(shell uname -m)
+endif
+# FIXME: this variable sets ARCH in the kernel Makefile.
+ARCH		:=$(shell echo $(MACHINE) | sed -e s/i.86/i386/)
 
 # If you want to build for a kernel other than the current kernel, set KVERS
 ifndef KVERS
@@ -94,9 +98,14 @@
 INSTALL_PREFIX	:= $(DESTDIR)
 
 CFLAGS+=-I. -O4 -g -Wall
-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)
+ifneq (,$(findstring ppc,$(PACHINE)))
+  CFLAGS	+= -fsigned-char
+  KFLAGS	+= -msoft-float -fsigned-char
+endif
+ifneq (,$(findstring x86_64,$(PACHINE)))
+  CFLAGS	+= -m64
+  KFLAGS	+= -mcmodel=kernel
+endif
 LCFLAGS:=-fPIC $(CFLAGS) -DBUILDING_TONEZONE
 KFLAGS:=-I$(KINCLUDES) -O6
 KFLAGS+=-DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -I$(KSRC)/drivers/net \
@@ -104,9 +113,6 @@
 ifneq (,$(wildcard $(KINCLUDES)/linux/modversions.h))
   KFLAGS+=-DMODVERSIONS -include $(KINCLUDES)/linux/modversions.h
 endif
-KFLAGS_PPC:=$(shell if uname -m | grep -q ppc; then echo "-msoft-float -fsigned-char"; fi)
-KFLAGS+=$(KFLAGS_PPC)
-KFLAGS+=$(shell if uname -r | grep -q 2.4; then if uname -m | grep -q x86_64; then echo "-mcmodel=kernel"; fi; fi)
 
 #
 # Features are now configured in zconfig.h




More information about the svn-commits mailing list