Auto-detect OSARCH_64BITS. Otherwise, if OSARCH_64BITS is not specified, the build system would always produce 32-bit libraries, even on 64-bit hosts.

This commit is contained in:
kblaschke 2015-11-06 11:55:21 +01:00
parent f2cfca6e50
commit 795b4fc9bb

View File

@ -69,3 +69,15 @@ SYSFLAGS = -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=6
# System Specific Libraries
#
SYSLIBS = -lpthread -ldl -lrt
#
# Auto-detect architecture if not specified
#
ifndef OSARCH_64BITS
LBITS := $(shell getconf LONG_BIT)
ifeq ($(LBITS),64)
OSARCH_64BITS = 1
else
OSARCH_64BITS = 0
endif
endif