defs.mk: Introduced ARCH_32 as a central place to specialize x86 architecture

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2013-08-13 13:56:17 +00:00
commit 730b8603c2

View file

@ -88,11 +88,22 @@ PCKG_DEFS_DIR = $(MODDIR)/make/defs.d
# ----- compilation options
TARGET ?= Linux
OS ?= $(shell sh $(MOD_SCRIPT_DIR)/get_os.sh)
ifndef ARCH
ifeq ($(shell uname -m),x86_64)
ARCH = x86_64
else
ARCH = x86
ARCH_32 = i586
ARCH = $(ARCH_32)
endif
endif
ifeq ($(ARCH),$(ARCH_32))
PROJECT_CFLAGS += -m32
PROJECT_CPPFLAGS += -m32
PROJECT_LDFLAGS += -m32
endif
FULL_NAME = $(shell id -nu | xargs getent passwd | cut -d: -f5)
DEVELOPMENT ?= $(shell echo $(VERSION) | grep -q 'dev' && echo true)
USE_PROJECT_LIB ?= true
@ -506,7 +517,7 @@ ifeq ($(USE_QT),true)
endif
ifeq ($(USE_X),true)
ifeq ($(ARCH),x86)
ifeq ($(ARCH),$(ARCH_32))
BUILD_LDFLAGS += -L/usr/X11/lib -lXext -lX11
else
BUILD_LDFLAGS += -L/usr/X11/lib64 -lXext -lX11