version 1.61, 2008/12/16 18:55:36
|
version 1.69.8.4, 2013/12/05 07:14:36
|
|
|
#// | #// |
#////////////////////////////////////////////////////////////////////////// | #////////////////////////////////////////////////////////////////////////// |
# Configuration options for Pegasus on all architectures running Linux | # Configuration options for Pegasus on all architectures running Linux |
|
# These options are also used by clang( which was designed as dropin |
|
# replacement for gcc). So some of the names are misleading like |
|
# PEGASUS_PLATFORM_LINUX_GENERIC_GNU due to GNU appended, Better will |
|
# be PEGASUS_PLATFORM_LINUX_GENERIC and GNU and CLANG can add it. |
|
# Changing this now(for 9236) will involve lot of work, Will take up |
|
# this work later. |
|
|
| |
include $(ROOT)/mak/config-unix.mak | include $(ROOT)/mak/config-unix.mak |
| |
|
|
| |
OS = linux | OS = linux |
| |
COMPILER = gnu |
|
|
|
PLATFORM_VERSION_SUPPORTED = yes |
|
| |
|
ifeq ($(findstring _CLANG, $(PEGASUS_PLATFORM)), _CLANG) |
|
COMPILER = clang |
|
CXX = clang++ |
|
CC = clang |
|
else |
|
COMPILER = gnu |
ifndef CXX | ifndef CXX |
CXX = g++ | CXX = g++ |
endif | endif |
|
endif |
| |
SH = sh |
PLATFORM_VERSION_SUPPORTED = yes |
|
|
YACC = bison |
|
|
|
RM = rm -f |
|
|
|
DIFF = diff |
|
|
|
SORT = sort |
|
| |
COPY = cp |
|
| |
MOVE = mv |
SH = sh |
| |
MKDIRHIER = mkdir -p |
YACC = bison |
| |
PEGASUS_SUPPORTS_DYNLIB = yes | PEGASUS_SUPPORTS_DYNLIB = yes |
| |
|
|
| |
SYS_LIBS = -ldl -lpthread -lcrypt | SYS_LIBS = -ldl -lpthread -lcrypt |
| |
FLAGS += -W -Wall -Wno-unused -D_GNU_SOURCE -DTHREAD_SAFE -D_REENTRANT |
ifeq ($(COMPILER), clang) |
|
FLAGS += -W -Wall -Wno-unused-parameter -Wno-unused-value -D_GNU_SOURCE \ |
|
-DTHREAD_SAFE -D_REENTRANT -Werror=unused-variable -Wno-unused-function \ |
|
-Werror=switch |
|
else |
|
FLAGS += -W -Wall -Wno-unused -Wunused-variable |
|
# Starting with gcc 4.3 specific warnings can be reported as error |
|
# Enabling a specific selection of warnings to turn into errors |
|
ifeq ($(shell expr $(GCC_VERSION) '>=' 4.3), 1) |
|
FLAGS += -Werror=unused-variable |
|
FLAGS += -Werror=switch |
|
endif |
|
FLAGS += -D_GNU_SOURCE -DTHREAD_SAFE -D_REENTRANT |
|
endif |
|
|
| |
##============================================================================== | ##============================================================================== |
## | ## |
|
|
ifdef PEGASUS_USE_DEBUG_BUILD_OPTIONS | ifdef PEGASUS_USE_DEBUG_BUILD_OPTIONS |
FLAGS += -g | FLAGS += -g |
else | else |
FLAGS += -s |
|
# | # |
# The -fno-enforce-eh-specs is not available in 2.9.5 and it probably | # The -fno-enforce-eh-specs is not available in 2.9.5 and it probably |
# appeared in the 3.0 series of compilers. | # appeared in the 3.0 series of compilers. |
# | # |
|
ifeq ($(COMPILER), gnu) |
|
# disable the strict aliasing |
ifeq ($(shell expr $(GCC_VERSION) '>=' 3.0), 1) | ifeq ($(shell expr $(GCC_VERSION) '>=' 3.0), 1) |
EXTRA_CXX_FLAGS += -fno-enforce-eh-specs |
PEGASUS_EXTRA_CXX_FLAGS += -fno-enforce-eh-specs -fno-strict-aliasing |
endif | endif |
|
endif |
|
|
ifdef PEGASUS_OPTIMIZE_FOR_SIZE | ifdef PEGASUS_OPTIMIZE_FOR_SIZE |
|
ifeq ($(COMPILER), gnu) |
FLAGS += -Os | FLAGS += -Os |
else | else |
|
FLAGS += -Oz |
|
endif |
|
else |
FLAGS += -O2 | FLAGS += -O2 |
endif | endif |
endif | endif |
|
|
## | ## |
##============================================================================== | ##============================================================================== |
| |
|
ifeq ($(COMPILER), gnu) |
ifeq ($(shell expr $(GCC_VERSION) '>=' 4.0), 1) | ifeq ($(shell expr $(GCC_VERSION) '>=' 4.0), 1) |
FLAGS += -fvisibility=hidden | FLAGS += -fvisibility=hidden |
endif | endif |
|
else |
|
FLAGS +=-fvisibility=hidden |
|
endif |
| |
ifndef PEGASUS_ARCH_LIB | ifndef PEGASUS_ARCH_LIB |
ifeq ($(PEGASUS_PLATFORM),LINUX_X86_64_GNU) | ifeq ($(PEGASUS_PLATFORM),LINUX_X86_64_GNU) |
PEGASUS_ARCH_LIB = lib64 | PEGASUS_ARCH_LIB = lib64 |
else |
|
PEGASUS_ARCH_LIB = lib |
|
endif | endif |
|
ifeq ($(PEGASUS_PLATFORM),LINUX_X86_64_CLANG) |
|
PEGASUS_ARCH_LIB = lib64 |
|
endif |
|
PEGASUS_ARCH_LIB = lib |
endif | endif |
DEFINES += -DPEGASUS_ARCH_LIB=\"$(PEGASUS_ARCH_LIB)\" | DEFINES += -DPEGASUS_ARCH_LIB=\"$(PEGASUS_ARCH_LIB)\" |