version 1.61, 2008/12/16 18:55:36
|
version 1.62, 2012/07/26 11:14:52
|
|
|
#// | #// |
#////////////////////////////////////////////////////////////////////////// | #////////////////////////////////////////////////////////////////////////// |
# 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 |
| |
|
ifeq ($(COMPILER), clang) |
|
FLAGS += -W -Wall -Wno-unused-parameter -Wno-unused-value -D_GNU_SOURCE \ |
|
-DTHREAD_SAFE -D_REENTRANT -Wno-unused-variable -Wno-unused-function |
|
else |
FLAGS += -W -Wall -Wno-unused -D_GNU_SOURCE -DTHREAD_SAFE -D_REENTRANT | FLAGS += -W -Wall -Wno-unused -D_GNU_SOURCE -DTHREAD_SAFE -D_REENTRANT |
|
endif |
##============================================================================== | ##============================================================================== |
## | ## |
## The DYNAMIC_FLAGS variable defines linker flags that only apply to shared | ## The DYNAMIC_FLAGS variable defines linker flags that only apply to shared |
|
|
# 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) |
ifeq ($(shell expr $(GCC_VERSION) '>=' 3.0), 1) | ifeq ($(shell expr $(GCC_VERSION) '>=' 3.0), 1) |
EXTRA_CXX_FLAGS += -fno-enforce-eh-specs | EXTRA_CXX_FLAGS += -fno-enforce-eh-specs |
endif | endif |
|
else |
|
EXTRA_CXX_FLAGS += -fno-enforce-eh-specs |
|
endif |
|
|
ifdef PEGASUS_OPTIMIZE_FOR_SIZE | ifdef PEGASUS_OPTIMIZE_FOR_SIZE |
FLAGS += -Os | FLAGS += -Os |
else | else |
|
|
## | ## |
##============================================================================== | ##============================================================================== |
| |
|
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)\" |