|
@@ -27,7 +27,7 @@ endif # verbose
|
|
|
else
|
|
|
|
|
|
ifeq (,$(main_makefile))
|
|
|
-# hack to automatically use config.mak in all the modules, without
|
|
|
+# hack to automatically use config.mak in all the modules, without
|
|
|
# changing the current module makefiles (which all include Makefile.defs):
|
|
|
# if not called from the main makefile (module, lib or ut):
|
|
|
# include config.mak, but if not present or incomplete (makefile_defs!=1)
|
|
@@ -150,7 +150,7 @@ OSREL_N:= $(shell echo $(OSREL) | sed -e 's/^[^0-9]*//' \
|
|
|
|
|
|
|
|
|
# TLS support
|
|
|
-CORE_TLS ?=
|
|
|
+CORE_TLS ?=
|
|
|
# by default compile with tls hooks support (so that no ser recompile is
|
|
|
# needed before the tls module can be used)
|
|
|
TLS_HOOKS=1
|
|
@@ -177,7 +177,7 @@ INSTALL ?= install
|
|
|
TAR ?= tar
|
|
|
endif
|
|
|
|
|
|
-INSTALL_TOUCH = touch # used to create the file first (good to
|
|
|
+INSTALL_TOUCH = touch # used to create the file first (good to
|
|
|
# make solaris install work)
|
|
|
INSTALL_CFG = $(INSTALL) -m 644
|
|
|
INSTALL_BIN = $(INSTALL) -m 755
|
|
@@ -221,8 +221,8 @@ ifneq (,$(findstring gcc, $(CC_LONGVER)))
|
|
|
# CC_VER:=$(word 1,$(CC)) $(shell $(CC) - --version|head -n 1|cut -d" " -f 3\
|
|
|
# |sed -e 's/^.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/'\
|
|
|
# -e 's/^[^0-9].*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/')
|
|
|
- # sed with POSIX.1 regex doesn't support |, + or ?
|
|
|
- # (darwin, solaris ...) => this complicated expression
|
|
|
+ # sed with POSIX.1 regex doesn't support |, + or ?
|
|
|
+ # (darwin, solaris ...) => this complicated expression
|
|
|
MKDEP=$(CC) -MM -MG
|
|
|
#transform gcc version into 2.9x or 3.0
|
|
|
CC_SHORTVER:=$(shell echo "$(CC_VER)" | cut -d" " -f 2| \
|
|
@@ -253,7 +253,7 @@ ifneq (, $(findstring Sun, $(CC_LONGVER)))
|
|
|
CC_SHORTVER:=$(shell echo "$(CC_LONGVER)"|head -n 1| \
|
|
|
sed -e 's/.*\([0-9]\.[0-9]\).*/\1/g' )
|
|
|
CC_VER=$(CC) $(CC_SHORTVER)
|
|
|
- MKDEP=$(CC) -xM1
|
|
|
+ MKDEP=$(CC) -xM1
|
|
|
endif
|
|
|
|
|
|
ifneq (, $(findstring Intel(R) C++ Compiler, $(CC_LONGVER)))
|
|
@@ -263,7 +263,7 @@ ifneq (, $(findstring Intel(R) C++ Compiler, $(CC_LONGVER)))
|
|
|
sed -e 's/.*Version \([0-9]\.[0-9]\.[0-9]*\).*/\1/g' )
|
|
|
CC_SHORTVER:=$(shell echo "$(CC_FULLVER)" | cut -d. -f1,2 )
|
|
|
CC_VER=$(CC) $(CC_FULLVER)
|
|
|
- MKDEP=$(CC) -MM
|
|
|
+ MKDEP=$(CC) -MM
|
|
|
endif
|
|
|
|
|
|
ifneq (, $(findstring clang, $(CC_LONGVER)))
|
|
@@ -273,7 +273,7 @@ ifneq (, $(findstring clang, $(CC_LONGVER)))
|
|
|
CC_SHORTVER:=$(shell echo "$(CC_FULLVER)" | cut -d. -f1,2 )
|
|
|
CC_VER=$(CC) $(CC_FULLVER)
|
|
|
CC_OPT=-O3
|
|
|
- MKDEP=$(CC) -MM
|
|
|
+ MKDEP=$(CC) -MM
|
|
|
endif
|
|
|
|
|
|
ifeq (,$(CC_NAME))
|
|
@@ -281,7 +281,7 @@ ifeq (,$(CC_NAME))
|
|
|
CC_NAME=$(CC)
|
|
|
CC_SHORTVER=unknown
|
|
|
CC_VER=unknown
|
|
|
- MKDEP=gcc -MM
|
|
|
+ MKDEP=gcc -MM
|
|
|
$(warning Unknown compiler $(CC)\; supported compilers: \
|
|
|
gcc, sun cc, intel icc )
|
|
|
endif
|
|
@@ -520,8 +520,8 @@ data_target = $(prefix)/$(data_dir)
|
|
|
# an implemetation of the "two levels segregated fit" malloc algorithm
|
|
|
# -DDL_MALLOC
|
|
|
# a malloc implementation based on Doug Lea's dl_malloc
|
|
|
-# -DSF_MALLOC
|
|
|
-# an experimental multi-CPU, pool based, multi-process safe version of
|
|
|
+# -DSF_MALLOC
|
|
|
+# an experimental multi-CPU, pool based, multi-process safe version of
|
|
|
# F_MALLOC. Should give better performance on machines with lots of CPUs
|
|
|
# after some tunning.
|
|
|
# -DLL_MALLOC
|
|
@@ -537,7 +537,7 @@ data_target = $(prefix)/$(data_dir)
|
|
|
# -DUSE_SYSV_SEM
|
|
|
# uses sys v sems for locking (slower & limited number)
|
|
|
# -DUSE_PTHREAD_MUTEX
|
|
|
-# uses pthread mutexes, faster than sys v or posix sems, but do not
|
|
|
+# uses pthread mutexes, faster than sys v or posix sems, but do not
|
|
|
# work on all systems inter-processes (e.g. linux)
|
|
|
# -DUSE_POSIX_SEM
|
|
|
# uses posix semaphores for locking (faster than sys v)
|
|
@@ -549,7 +549,7 @@ data_target = $(prefix)/$(data_dir)
|
|
|
# try busy waiting for a while and if the lock is still held go to
|
|
|
# force reschedule (FAST_LOCK)
|
|
|
# -DADAPTIVE_WAIT_LOOPS=number
|
|
|
-# number of loops we busy wait, after "number" loops have elapsed we
|
|
|
+# number of loops we busy wait, after "number" loops have elapsed we
|
|
|
# force a reschedule (FAST_LOCK)
|
|
|
# -DNOSMP
|
|
|
# don't use smp compliant locking (faster but won't work on SMP machines)
|
|
@@ -563,26 +563,26 @@ data_target = $(prefix)/$(data_dir)
|
|
|
# -DDISABLE_NAGLE
|
|
|
# disable the tcp Nagle algorithm (lower delay)
|
|
|
# -DUSE_TLS
|
|
|
-# compiles in tls support, requires -DUSE_TCP. Note: this is only
|
|
|
+# compiles in tls support, requires -DUSE_TCP. Note: this is only
|
|
|
# generic support (parsing a.s.o.), it does not include the actual
|
|
|
# "tls engine". If you really want tls you need also either
|
|
|
# -DCORE_TLS and a tls/ subdir with the tls code or -DTLS_HOOKS and
|
|
|
# the tls module loaded.
|
|
|
# -DCORE_TLS
|
|
|
-# compiles tls in-core support. Requires -DUSE_TLS, conflicts
|
|
|
+# compiles tls in-core support. Requires -DUSE_TLS, conflicts
|
|
|
# -DTLS_HOOKS. Please use make CORE_TLS=1 instead (it will set all the
|
|
|
# needed defines automatically and extra libraries needed for linking).
|
|
|
# -DTLS_HOOKS
|
|
|
# compile tls module support (support for having the "tls engine" in a
|
|
|
# module). Requires -DUSE_TLS, conflicts -DCORE_TLS.
|
|
|
# Please use make TLS_HOOKS=1 (or TLS_HOOKS=0 to for disabling) instead
|
|
|
-# of setting -DTLS_HOOKS (it will set all the needed defines
|
|
|
+# of setting -DTLS_HOOKS (it will set all the needed defines
|
|
|
# automatically)
|
|
|
# -DHAVE_RESOLV_RES
|
|
|
# support for changing some of the resolver parameters present
|
|
|
# (_res structure in <resolv.h>)
|
|
|
# -DUSE_COMP
|
|
|
-# compiles in comp=[sergz|sigcomp] support (parsing uri & via,
|
|
|
+# compiles in comp=[sergz|sigcomp] support (parsing uri & via,
|
|
|
# adding it to via, lumps a.s.o). WARNING: right now this option
|
|
|
# is useless since the compression code doesn't exist yet.
|
|
|
# -DHONOR_MADDR
|
|
@@ -605,7 +605,7 @@ data_target = $(prefix)/$(data_dir)
|
|
|
# if enabled profiling will be enabled for child processes
|
|
|
# Don't forget to set PROFILE (see below)
|
|
|
# -DNO_SIG_DEBUG
|
|
|
-# turns off debugging messages in signal handlers (which might be
|
|
|
+# turns off debugging messages in signal handlers (which might be
|
|
|
# unsafe)
|
|
|
# -DUSE_NAPTR
|
|
|
# turns on naptr support (but must be also enabled from the config)
|
|
@@ -669,7 +669,7 @@ C_DEFS= $(extra_defs) \
|
|
|
# you may also want to set -DPROFILING
|
|
|
|
|
|
# WARNING: do not add mode=debug or mode=release anymore in the Makefile,
|
|
|
-# use make mode=debug all instead. Anyway no by default ser is compiled w/
|
|
|
+# use make mode=debug all instead. Anyway no by default ser is compiled w/
|
|
|
# debugging symbols in all cases (-g). --andrei
|
|
|
|
|
|
# memory managers and related debug mode
|
|
@@ -739,7 +739,7 @@ ifeq ($(CC_NAME), gcc)
|
|
|
else echo "as" ; \
|
|
|
fi\
|
|
|
fi)
|
|
|
-
|
|
|
+
|
|
|
LDTYPE:=$(shell if $(LDPATH) -V 1>/dev/null 2>/dev/null; then \
|
|
|
if $(LDPATH) -V 2>&1|grep GNU >/dev/null; \
|
|
|
then echo gnu; \
|
|
@@ -828,7 +828,7 @@ ifeq ($(ARCH), alpha)
|
|
|
endif
|
|
|
|
|
|
ifeq ($(use_fast_lock), yes)
|
|
|
- C_DEFS+= -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024
|
|
|
+ C_DEFS+= -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024
|
|
|
found_lock_method=yes
|
|
|
endif
|
|
|
|
|
@@ -839,8 +839,8 @@ C_INCLUDES=
|
|
|
ifeq ($(mode), release)
|
|
|
#if i386
|
|
|
ifeq ($(ARCH), i386)
|
|
|
- # if gcc
|
|
|
-ifeq ($(CC_NAME), gcc)
|
|
|
+ # if gcc
|
|
|
+ifeq ($(CC_NAME), gcc)
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
#common stuff
|
|
|
CFLAGS=-g $(CC_OPT) -funroll-loops -Wcast-align $(PROFILE)
|
|
@@ -860,7 +860,7 @@ $(call set_if_empty,CPUTYPE,athlon64)
|
|
|
CFLAGS+=-m32 -minline-all-stringops \
|
|
|
-falign-loops \
|
|
|
-ftree-vectorize \
|
|
|
- -mtune=$(CPUTYPE)
|
|
|
+ -mtune=$(CPUTYPE)
|
|
|
LDFLAGS+=-m32
|
|
|
else
|
|
|
#if gcc 3.4+
|
|
@@ -868,7 +868,7 @@ ifeq ($(CC_SHORTVER), 3.4)
|
|
|
$(call set_if_empty,CPUTYPE,athlon)
|
|
|
CFLAGS+=-m32 -minline-all-stringops \
|
|
|
-falign-loops \
|
|
|
- -mtune=$(CPUTYPE)
|
|
|
+ -mtune=$(CPUTYPE)
|
|
|
LDFLAGS+=-m32
|
|
|
else
|
|
|
#if gcc 3.0+
|
|
@@ -882,7 +882,7 @@ else
|
|
|
ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5])
|
|
|
$(warning Old gcc detected ($(CC_SHORTVER)), use gcc >= 3.1 \
|
|
|
for better results)
|
|
|
-
|
|
|
+
|
|
|
CFLAGS+=-m486 \
|
|
|
-malign-loops=4
|
|
|
else
|
|
@@ -906,7 +906,7 @@ else # CC_NAME, clang
|
|
|
ifeq ($(CC_NAME), icc)
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
CFLAGS=-g -O3 -ipo -ipo_obj -unroll $(PROFILE) \
|
|
|
- -tpp6 -xK #-openmp #optimize for PIII
|
|
|
+ -tpp6 -xK #-openmp #optimize for PIII
|
|
|
# -prefetch doesn't seem to work
|
|
|
#( ty to inline acroos files, unroll loops,prefetch,
|
|
|
# optimize for PIII, use PIII instructions & vect.,
|
|
@@ -921,7 +921,7 @@ endif #ARCH, i386
|
|
|
|
|
|
#x86_64
|
|
|
ifeq ($(ARCH), x86_64)
|
|
|
- # if gcc
|
|
|
+ # if gcc
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
#common stuff
|
|
@@ -952,21 +952,21 @@ $(call set_if_empty,CPUTYPE,opteron)
|
|
|
CFLAGS+=-m64 -minline-all-stringops \
|
|
|
-falign-loops \
|
|
|
-ftree-vectorize \
|
|
|
- -mtune=$(CPUTYPE)
|
|
|
+ -mtune=$(CPUTYPE)
|
|
|
LDFLAGS+=-m64
|
|
|
else
|
|
|
#if gcc 3.4
|
|
|
ifeq ($(CC_SHORTVER), 3.4)
|
|
|
$(call set_if_empty,CPUTYPE,athlon64)
|
|
|
CFLAGS+=-m64 -minline-all-stringops \
|
|
|
- -falign-loops
|
|
|
+ -falign-loops
|
|
|
LDFLAGS+=-m64
|
|
|
else
|
|
|
#if gcc 3.0
|
|
|
ifeq ($(CC_SHORTVER), 3.0)
|
|
|
$(call set_if_empty,CPUTYPE,athlon64)
|
|
|
CFLAGS+=-minline-all-stringops \
|
|
|
- -falign-loops
|
|
|
+ -falign-loops
|
|
|
#-mcpu=$(CPUTYPE) \ # not working on all x86_64 gccs
|
|
|
#-mcpu=athlon
|
|
|
#-m64 on x86_64/x86 works starting with gcc 3.2
|
|
@@ -974,7 +974,7 @@ else
|
|
|
ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5])
|
|
|
$(warning Old gcc detected ($(CC_SHORTVER)), use gcc >= 3.1 \
|
|
|
for better results)
|
|
|
-
|
|
|
+
|
|
|
CFLAGS+=-m486 \
|
|
|
-malign-loops=4
|
|
|
else
|
|
@@ -994,13 +994,13 @@ ifeq ($(CC_NAME), clang)
|
|
|
$(call set_if_empty,CPUTYPE,opteron)
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
CFLAGS+=-g -m64 \
|
|
|
- $(CC_OPT)
|
|
|
+ $(CC_OPT)
|
|
|
LDFLAGS+=-m64
|
|
|
else # CC_NAME, clang
|
|
|
ifeq ($(CC_NAME), icc)
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
CFLAGS=-g -O3 -ipo -ipo_obj -unroll $(PROFILE) \
|
|
|
- -tpp6 -xK #-openmp #optimize for PIII
|
|
|
+ -tpp6 -xK #-openmp #optimize for PIII
|
|
|
# -prefetch doesn't seem to work
|
|
|
#( ty to inline acroos files, unroll loops,prefetch,
|
|
|
# optimize for PIII, use PIII instructions & vect.,
|
|
@@ -1021,7 +1021,7 @@ ifeq ($(CC_NAME), gcc)
|
|
|
#common stuff
|
|
|
CFLAGS=-g $(CC_OPT) -funroll-loops $(PROFILE) \
|
|
|
#-Wcast-align \
|
|
|
- #-Wmissing-prototypes
|
|
|
+ #-Wmissing-prototypes
|
|
|
#if gcc 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
$(call set_if_empty,CPUTYPE,ultrasparc)
|
|
@@ -1069,28 +1069,28 @@ $(warning Old gcc detected ($(CC_SHORTVER)), use gcc >= 3.1 \
|
|
|
ifneq ($(OS), netbsd)
|
|
|
# on netbsd/sparc64, gcc 2.95.3 does not compile
|
|
|
# ser with -mv8
|
|
|
- CFLAGS+= -mv9
|
|
|
+ CFLAGS+= -mv9
|
|
|
# -m64/-m32 on sparc works starting with gcc 3.0
|
|
|
endif
|
|
|
ifeq ($(ASTYPE), solaris)
|
|
|
CFLAGS+= -Wa,-xarch=v8plus
|
|
|
-endif
|
|
|
+endif
|
|
|
else #CC_SHORTVER, 2.9x
|
|
|
#really old version
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
-
|
|
|
- CFLAGS+= -mv9
|
|
|
+
|
|
|
+ CFLAGS+= -mv9
|
|
|
ifeq ($(ASTYPE), solaris)
|
|
|
CFLAGS+= -Wa,-xarch=v8plus
|
|
|
-endif
|
|
|
-
|
|
|
+endif
|
|
|
+
|
|
|
endif #CC_SHORTVER, 2.9x
|
|
|
endif #CC_SHORTVER, 3.0
|
|
|
endif #CC_SHORTVER, 3.4
|
|
|
endif #CC_SHORTVER, 4.x
|
|
|
endif #CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
-
|
|
|
+
|
|
|
else #CC_NAME, gcc
|
|
|
ifeq ($(CC_NAME), suncc)
|
|
|
C_DEFS+=-DSPARC64_MODE
|
|
@@ -1112,7 +1112,7 @@ ifeq ($(CC_NAME), gcc)
|
|
|
#common stuff
|
|
|
CFLAGS=-g $(CC_OPT) -funroll-loops $(PROFILE) \
|
|
|
#-Wcast-align \
|
|
|
- #-Wmissing-prototypes
|
|
|
+ #-Wmissing-prototypes
|
|
|
#if gcc 5.0+, 4.5+ or 4.2+
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
$(call set_if_empty,CPUTYPE,v8)
|
|
@@ -1150,13 +1150,13 @@ else #CC_SHORTVER, 2.9x
|
|
|
#really old version
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
-
|
|
|
+
|
|
|
endif #CC_SHORTVER, 2.9x
|
|
|
endif #CC_SHORTVER, 3.0
|
|
|
endif #CC_SHORTVER, 3.4
|
|
|
endif #CC_SHORTVER, 4.x
|
|
|
endif #CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
-
|
|
|
+
|
|
|
else #CC_NAME, gcc
|
|
|
ifeq ($(CC_NAME), suncc)
|
|
|
CFLAGS+= -g -xO5 -fast -native -xCC \
|
|
@@ -1171,7 +1171,7 @@ endif #ARCH, sparc
|
|
|
|
|
|
#if ipaq/netwinder
|
|
|
ifeq ($(ARCH), arm)
|
|
|
- # if gcc
|
|
|
+ # if gcc
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
#common stuff
|
|
@@ -1179,12 +1179,12 @@ ifeq ($(CC_NAME), gcc)
|
|
|
#if gcc 4.5+ or 4.2+
|
|
|
ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
CFLAGS+= -ftree-vectorize -fno-strict-overflow
|
|
|
- # not supported on arm: -minline-all-stringops
|
|
|
+ # not supported on arm: -minline-all-stringops
|
|
|
else
|
|
|
#if gcc 4.x+
|
|
|
ifeq ($(CC_SHORTVER), 4.x)
|
|
|
CFLAGS+= -ftree-vectorize
|
|
|
- # not supported on arm: -minline-all-stringops
|
|
|
+ # not supported on arm: -minline-all-stringops
|
|
|
else
|
|
|
#if gcc 3.4+
|
|
|
ifeq ($(CC_SHORTVER), 3.4)
|
|
@@ -1192,34 +1192,34 @@ ifeq ($(CC_SHORTVER), 3.4)
|
|
|
else
|
|
|
#if gcc 3.0
|
|
|
ifeq ($(CC_SHORTVER), 3.0)
|
|
|
- CFLAGS+=
|
|
|
+ CFLAGS+=
|
|
|
#-mcpu=athlon
|
|
|
else
|
|
|
ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5])
|
|
|
$(warning Old gcc detected ($(CC_SHORTVER)), use gcc 3.0.x \
|
|
|
for better results)
|
|
|
-
|
|
|
+
|
|
|
CFLAGS+=
|
|
|
else
|
|
|
#really old version
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
-
|
|
|
+
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
-
|
|
|
+
|
|
|
else # CC_NAME, gcc
|
|
|
#other compilers
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
|
endif #CC_NAME, gcc
|
|
|
-endif #ARCH, arm
|
|
|
+endif #ARCH, arm
|
|
|
|
|
|
- #if armv6 cpu
|
|
|
+ #if armv6 cpu
|
|
|
ifeq ($(ARCH), arm6)
|
|
|
- # if gcc
|
|
|
+ # if gcc
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
#common stuff
|
|
@@ -1239,25 +1239,25 @@ ifeq ($(CC_SHORTVER), 3.4)
|
|
|
else
|
|
|
#if gcc 3.0
|
|
|
ifeq ($(CC_SHORTVER), 3.0)
|
|
|
- CFLAGS+=
|
|
|
+ CFLAGS+=
|
|
|
#-mcpu=athlon
|
|
|
else
|
|
|
ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5])
|
|
|
$(warning Old gcc detected ($(CC_SHORTVER)), use gcc 3.0.x \
|
|
|
for better results)
|
|
|
-
|
|
|
+
|
|
|
CFLAGS+=
|
|
|
else
|
|
|
#really old version
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
-
|
|
|
+
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
-
|
|
|
+
|
|
|
else # CC_NAME, gcc
|
|
|
#other compilers
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
@@ -1266,7 +1266,7 @@ endif #ARCH, arm6
|
|
|
|
|
|
#if mips (R3000)
|
|
|
ifeq ($(ARCH), mips)
|
|
|
- # if gcc
|
|
|
+ # if gcc
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
#common stuff
|
|
@@ -1294,19 +1294,19 @@ else
|
|
|
ifeq ($(CC_SHORTVER), 2.9x) #older gcc version (2.9[1-5])
|
|
|
$(warning Old gcc detected ($(CC_SHORTVER)), use gcc 3.0.x \
|
|
|
for better results)
|
|
|
-
|
|
|
+
|
|
|
CFLAGS+=-march=r3000
|
|
|
else
|
|
|
#really old version
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
-
|
|
|
+
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
-
|
|
|
+
|
|
|
else # CC_NAME, gcc
|
|
|
#other compilers
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
@@ -1315,7 +1315,7 @@ endif #ARCH, mips
|
|
|
|
|
|
#if >=mips2 (R4000, R5000, R6000 ....)
|
|
|
ifeq ($(ARCH), mips2)
|
|
|
- # if gcc
|
|
|
+ # if gcc
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
#common stuff
|
|
@@ -1346,13 +1346,13 @@ else
|
|
|
#really old version
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
-
|
|
|
+
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
-
|
|
|
+
|
|
|
else # CC_NAME, gcc
|
|
|
#other compilers
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
@@ -1361,7 +1361,7 @@ endif #ARCH, mips2
|
|
|
|
|
|
#if >=mips64
|
|
|
ifeq ($(ARCH), mips64)
|
|
|
- # if gcc
|
|
|
+ # if gcc
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
#common stuff
|
|
@@ -1393,13 +1393,13 @@ else
|
|
|
#really old version
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
-
|
|
|
+
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
-
|
|
|
+
|
|
|
else # CC_NAME, gcc
|
|
|
#other compilers
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
@@ -1408,7 +1408,7 @@ endif #ARCH, mips64
|
|
|
|
|
|
#if alpha
|
|
|
ifeq ($(ARCH), alpha)
|
|
|
- # if gcc
|
|
|
+ # if gcc
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
#common stuff
|
|
@@ -1420,7 +1420,7 @@ ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+,$(CC_SHORTVER))))
|
|
|
else
|
|
|
#if gcc 4.0+
|
|
|
ifeq ($(CC_SHORTVER), 4.x)
|
|
|
- CFLAGS+=
|
|
|
+ CFLAGS+=
|
|
|
# not supported: -minline-all-stringops
|
|
|
else
|
|
|
#if gcc 3.4+
|
|
@@ -1439,22 +1439,22 @@ else
|
|
|
#really old version
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
-
|
|
|
+
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
-
|
|
|
+
|
|
|
else # CC_NAME, gcc
|
|
|
#other compilers
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
|
endif #CC_NAME, gcc
|
|
|
-endif #ARCH, alpha
|
|
|
+endif #ARCH, alpha
|
|
|
|
|
|
#if ppc
|
|
|
ifeq ($(ARCH), ppc)
|
|
|
- # if gcc
|
|
|
+ # if gcc
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
#common stuff
|
|
@@ -1496,22 +1496,22 @@ else
|
|
|
#really old version
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
-
|
|
|
+
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
-
|
|
|
+
|
|
|
else # CC_NAME, gcc
|
|
|
#other compilers
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
|
endif #CC_NAME, gcc
|
|
|
-endif #ARCH, ppc
|
|
|
+endif #ARCH, ppc
|
|
|
|
|
|
#if ppc64
|
|
|
ifeq ($(ARCH), ppc64)
|
|
|
- # if gcc
|
|
|
+ # if gcc
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
C_DEFS+=-DCC_GCC_LIKE_ASM
|
|
|
#common stuff
|
|
@@ -1545,18 +1545,18 @@ else
|
|
|
#really old version
|
|
|
$(warning You are using an old and unsupported gcc \
|
|
|
version ($(CC_SHORTVER)), compile at your own risk!)
|
|
|
-
|
|
|
+
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
endif # CC_SHORTVER, 4.x
|
|
|
endif # CC_SHORTVER, 6.0+, 5.0+, 4.5+ or 4.2+
|
|
|
-
|
|
|
+
|
|
|
else # CC_NAME, gcc
|
|
|
#other compilers
|
|
|
$(error Unsupported compiler ($(CC):$(CC_NAME)), try gcc)
|
|
|
endif #CC_NAME, gcc
|
|
|
-endif #ARCH, ppc
|
|
|
+endif #ARCH, ppc
|
|
|
|
|
|
CFLAGS+= $(CC_EXTRA_OPTS)
|
|
|
|
|
@@ -1570,9 +1570,9 @@ ifeq ($(LDTYPE), solaris)
|
|
|
LIB_LDFLAGS:=-G $(LDFLAGS)
|
|
|
LIB_SONAME=-Wl,-h,
|
|
|
LD_RPATH=-Wl,-R,
|
|
|
-else
|
|
|
+else
|
|
|
#gcc and maybe others, => gnu ld
|
|
|
- LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE)
|
|
|
+ LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE)
|
|
|
MOD_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
LIB_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
LIB_SONAME=-Wl,-soname,
|
|
@@ -1581,7 +1581,7 @@ endif
|
|
|
endif
|
|
|
ifeq ($(CC_NAME), icc)
|
|
|
#gcc and maybe others
|
|
|
- LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE)
|
|
|
+ LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE)
|
|
|
MOD_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
LIB_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
LIB_SONAME=-Wl,-soname,
|
|
@@ -1601,10 +1601,10 @@ endif
|
|
|
|
|
|
ifeq ($(CC_NAME), clang)
|
|
|
LDFLAGS+=-Wl,-O2 -Wl,-E $(PROFILE)
|
|
|
- MOD_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
- LIB_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
- LIB_SONAME=-Wl,-soname,
|
|
|
- LD_RPATH=-Wl,-rpath,
|
|
|
+ MOD_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
+ LIB_LDFLAGS:=-shared $(LDFLAGS)
|
|
|
+ LIB_SONAME=-Wl,-soname,
|
|
|
+ LD_RPATH=-Wl,-rpath,
|
|
|
endif
|
|
|
|
|
|
LDFLAGS+= $(LD_EXTRA_OPTS)
|
|
@@ -1727,8 +1727,8 @@ ifeq ($(OS), linux)
|
|
|
LIBS+=-lpthread
|
|
|
endif
|
|
|
endif
|
|
|
- # check for >= 2.5.44
|
|
|
|
|
|
+ # check for >= 2.5.44
|
|
|
ifeq ($(shell [ $(OSREL_N) -ge 2005044 ] && echo has_epoll), has_epoll)
|
|
|
ifeq ($(NO_EPOLL),)
|
|
|
C_DEFS+=-DHAVE_EPOLL
|
|
@@ -1827,7 +1827,7 @@ ifeq ($(CC_NAME), suncc)
|
|
|
endif
|
|
|
OLD_SOLARIS= $(shell echo "$(OSREL)" | \
|
|
|
sed -e 's/^5\.[0-6][^0-9]*$$/yes/' )
|
|
|
- LIBS+= -L$(LOCALBASE)/lib -lxnet -lsocket -lnsl
|
|
|
+ LIBS+= -L$(LOCALBASE)/lib -lxnet -lsocket -lnsl
|
|
|
ifeq ($(OLD_SOLARIS), yes)
|
|
|
LIBS+=-lposix4
|
|
|
else
|
|
@@ -1906,7 +1906,7 @@ ifeq ($(OS), openbsd)
|
|
|
# unfortunately pthread is needed for sigwait
|
|
|
LIBS= -lpthread
|
|
|
endif # if opensd
|
|
|
-
|
|
|
+
|
|
|
ifeq ($(OS), netbsd)
|
|
|
C_DEFS+=-DHAVE_SOCKADDR_SA_LEN -DHAVE_GETHOSTBYNAME2 \
|
|
|
-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_CONNECT_ECONNRESET_BUG -DHAVE_TIMEGM
|
|
@@ -1927,7 +1927,7 @@ ifeq ($(OS), netbsd)
|
|
|
C_DEFS+=-DHAVE_SELECT
|
|
|
endif
|
|
|
YACC=yacc
|
|
|
- LIBS=
|
|
|
+ LIBS=
|
|
|
endif
|
|
|
|
|
|
# OS X support, same as freebsd
|
|
@@ -1954,7 +1954,7 @@ ifeq ($(OS), darwin)
|
|
|
C_DEFS+=-DHAVE_SELECT
|
|
|
endif
|
|
|
LDFLAGS= # darwin doesn't like -O2 or -E
|
|
|
- # the modules uses symbols from ser => either
|
|
|
+ # the modules uses symbols from ser => either
|
|
|
# -flat_namespace -undefined_suppress or -bundle_loader ../../$(MAIN_NAME)
|
|
|
MOD_LDFLAGS:= -bundle -flat_namespace -undefined suppress
|
|
|
# for libs using symbols from ser (e.g srdb2, kcore a.s.o) we
|
|
@@ -2018,7 +2018,7 @@ endif # ifeq ($(makefile_defs), 1)
|
|
|
|
|
|
# if incomplete or missing config.mak, or already exported vars, don't
|
|
|
# try to export/re-export
|
|
|
-ifeq ($(makefile_defs),1)
|
|
|
+ifeq ($(makefile_defs),1)
|
|
|
ifneq ($(exported_vars),1)
|
|
|
|
|
|
|