diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -11,7 +11,11 @@ ifeq ($(MAKELEVEL),0) 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 @@ HOSTCC=gcc 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 @@ KFLAGS+=-DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -I$(KSRC)/drivers/net \ 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 |