From ecb6741bc230995c67d2c87ecb708b8e930d1f89 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Thu, 1 May 2008 12:37:26 +0000 Subject: [PATCH] defs.mk: Make it compile on SuSE 10.3 @ x86_64 --- make/defs.mk | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/make/defs.mk b/make/defs.mk index df99b3a0..0179c2da 100644 --- a/make/defs.mk +++ b/make/defs.mk @@ -69,7 +69,11 @@ IMAGE_DIR ?= $(CVS_ROOT_DIR)/images USE_GFILTER ?= true TARGET ?= Linux OS ?= $(shell sh $(MOD_SCRIPT_DIR)/get_os.sh) -ARCH = @ARCH@ +ifeq ($(shell uname -m),x86_64) +ARCH = x86_64 +else +ARCH = x86 +endif FULL_NAME = $(shell grep "^`id -nu`": /etc/passwd | cut -d: -f5) DEVELOPMENT ?= $(shell echo $(VERSION) | grep -q 'dev' && echo true) USE_PROJECT_LIB ?= true @@ -357,6 +361,12 @@ endif LPPFLAGS += -lstdc++ +ifeq ($(ARCH),x86_64) + CFLAGS += -fPIC + CPPFLAGS += -fPIC + LIBFLAGS += +endif + ifeq ($(GCC_MAJOR),2) LPPFLAGS += -lm CFLAGS += -I/usr/local/include @@ -367,13 +377,6 @@ else LPPFLAGS += -lgcc_s # LPPFLAGS += -L/usr/local/gcc3.3/lib endif - else - ifeq ($(GCC_MAJOR),4) # -PIC is more a thing with AMD64, I think - ifeq ($(TARGET),Linux) - CPPFLAGS += -fPIC - CFLAGS += -fPIC - endif - endif endif endif