|
|
|
@ -50,7 +50,9 @@ PREFIX=$(HOME)
|
|
|
|
|
PER_MACHINE_DIRECTORY=/usr/local/share/pEp
|
|
|
|
|
|
|
|
|
|
# Filename of the pEpEngine library
|
|
|
|
|
ifeq ($(BUILD_FOR),Linux)
|
|
|
|
|
ifeq ($(BUILD_FOR),OS/390)
|
|
|
|
|
TARGET=libpEpEngine.so
|
|
|
|
|
else ifeq ($(BUILD_FOR),Linux)
|
|
|
|
|
TARGET=libpEpEngine.so
|
|
|
|
|
else ifeq ($(BUILD_FOR),Darwin)
|
|
|
|
|
TARGET=libpEpEngine.dylib
|
|
|
|
@ -82,24 +84,27 @@ endif
|
|
|
|
|
# Are we wiping this on purpose?
|
|
|
|
|
LDLIBS=
|
|
|
|
|
|
|
|
|
|
######### C #########
|
|
|
|
|
ifeq ($(BUILD_FOR),Linux)
|
|
|
|
|
CC=gcc
|
|
|
|
|
ifeq ($(BUILD_FOR),OS/390)
|
|
|
|
|
CC=xlclang -std=c99
|
|
|
|
|
else ifeq ($(BUILD_FOR),Linux)
|
|
|
|
|
CC=gcc -std=c99 -pthread
|
|
|
|
|
else ifeq ($(BUILD_FOR),Darwin)
|
|
|
|
|
CC=clang
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
CFLAGS+=-std=c99 -pthread
|
|
|
|
|
CFLAGS+=-fPIC -fstrict-aliasing
|
|
|
|
|
|
|
|
|
|
ifeq ($(BUILD_FOR),Linux)
|
|
|
|
|
CFLAGS+=-fdiagnostics-color=auto
|
|
|
|
|
ifeq ($(BUILD_FOR),OS/390)
|
|
|
|
|
CFLAGS+= -Wno-gnu-include-next -qnosearch -I$(HERE) -I.
|
|
|
|
|
CFLAGS+= -I/usr/lpp/java/J8.0_64/include -I/usr/include
|
|
|
|
|
CFLAGS+= -DZOS -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L -qlanglvl=NOLIBEXT
|
|
|
|
|
else ifeq ($(BUILD_FOR),Linux)
|
|
|
|
|
CFLAGS+=-fPIC -fstrict-aliasing -fdiagnostics-color=auto
|
|
|
|
|
else ifeq ($(BUILD_FOR),Darwin)
|
|
|
|
|
CFLAGS+=-fcolor-diagnostics
|
|
|
|
|
CFLAGS+=-pthread -fPIC -fstrict-aliasing -fcolor-diagnostics
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# The flag -DNDEBUG will always be removed from CFLAGS for compiling tests.
|
|
|
|
|
# The tests do not work properly, if compiled with -DNDEBUG
|
|
|
|
|
CFLAGS=
|
|
|
|
|
ifeq ($(BUILD_FOR),Linux)
|
|
|
|
|
ifdef WARN
|
|
|
|
|
CFLAGS+= -Wall -pedantic -Wstrict-aliasing=3
|
|
|
|
@ -142,8 +147,10 @@ ifeq ($(BUILD_FOR),Linux)
|
|
|
|
|
CXX=g++
|
|
|
|
|
CXXFLAGS+=-std=gnu++11
|
|
|
|
|
else ifeq ($(BUILD_FOR),Darwin)
|
|
|
|
|
CXX=clang
|
|
|
|
|
CXXFLAGS+=-std=c++11
|
|
|
|
|
# clang issues a warning when "-pthread" is used for linking. So, include it in CXXFLAGS, and not in CXX
|
|
|
|
|
CXX=clang -std=c++11
|
|
|
|
|
else ifeq ($(BUILD_FOR),OS/390)
|
|
|
|
|
CXX=xlclang++ -std=c++11
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
CXXFLAGS+=-pthread
|
|
|
|
@ -151,7 +158,22 @@ CXXFLAGS+=-pthread
|
|
|
|
|
# The flag -DNDEBUG will always be removed from CPPFLAGS for compiling tests.
|
|
|
|
|
#
|
|
|
|
|
# The tests do not work properly, if compiled with -DNDEBUG
|
|
|
|
|
ifeq ($(BUILD_FOR),Linux)
|
|
|
|
|
CXXFLAGS=
|
|
|
|
|
ifeq ($(BUILD_FOR),OS/390)
|
|
|
|
|
CXXFLAGS+= -fdiagnostics-color=auto -Wno-gnu-include-next
|
|
|
|
|
CXXFLAGS+= -qnosearch -I$(HERE) -I. -I../src -I../asn.1 $(ETPAN_INC) -I/usr/lpp/java/J8.0_64/include -I/usr/include
|
|
|
|
|
CXXFLAGS+= -DZOS -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L
|
|
|
|
|
ifdef WARN
|
|
|
|
|
CXXFLAGS+=
|
|
|
|
|
else
|
|
|
|
|
CXXFLAGS+= -w
|
|
|
|
|
endif
|
|
|
|
|
ifdef DEBUG
|
|
|
|
|
CXXFLAGS+= -g
|
|
|
|
|
else
|
|
|
|
|
CXXFLAGS+= -O3 -DNDEBUG
|
|
|
|
|
endif
|
|
|
|
|
else ifeq ($(BUILD_FOR),Linux)
|
|
|
|
|
CXXFLAGS+=-fdiagnostics-color=auto -I../src -I../asn.1 $(ETPAN_INC)
|
|
|
|
|
ifdef WARN
|
|
|
|
|
CXXFLAGS+=
|
|
|
|
@ -165,7 +187,7 @@ ifeq ($(BUILD_FOR),Linux)
|
|
|
|
|
CPPFLAGS+= -DNDEBUG
|
|
|
|
|
endif
|
|
|
|
|
else ifeq ($(BUILD_FOR),Darwin)
|
|
|
|
|
CXXFLAGS+=-fcolor-diagnostics -I../src -I../asn.1 $(ETPAN_INC)
|
|
|
|
|
CXXFLAGS+=-pthread -fcolor-diagnostics -I../src -I../asn.1 $(ETPAN_INC)
|
|
|
|
|
ifdef WARN
|
|
|
|
|
CXXFLAGS+=
|
|
|
|
|
else
|
|
|
|
@ -254,6 +276,16 @@ SEQUOIA_INC=
|
|
|
|
|
# EXTRA_MACROS=-DDEFAULT_KEYSERVER=\"default-server.org\" -DCRASHDUMP_DEFAULT_LINES=23
|
|
|
|
|
EXTRA_MACROS=
|
|
|
|
|
|
|
|
|
|
ifdef PER_USER_DIRECTORY
|
|
|
|
|
EXTRA_MACROS+= -DPER_USER_DIRECTORY=\"$(PER_USER_DIRECTORY)\"
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifdef PER_MACHINE_DIRECTORY
|
|
|
|
|
EXTRA_MACROS+= -DPER_MACHINE_DIRECTORY=\"$(PER_MACHINE_DIRECTORY)\"
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
CFLAGS+=$(EXTRA_MACROS)
|
|
|
|
|
CXXFLAGS+=$(EXTRA_MACROS)
|
|
|
|
|
|
|
|
|
|
######### Misc #########
|
|
|
|
|
# FIXME Maybe include these variables here.
|
|
|
|
|