C++11 library providing functionality common to all adapters.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.2 KiB

3 years ago
  1. # Copyright 2018, pEp Foundation
  2. # This file is part of libpEpAdapter
  3. # This file may be used under the terms of the GNU General Public License version 3
  4. # see LICENSE.txt
  5. HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
  6. BUILD_ON:=$(shell uname)
  7. SOVERSION=2.1.22
  8. ifeq ($(BUILD_ON),OS/390)
  9. TARGETS=libpEpAdapter.a libpEpAdapter.so
  10. SO_CFLAGS = -W "l,xplink,dll" -W "c,float(ieee),xplink,dll,exportall"
  11. CPPFLAGS += -W "l,xplink,dll" -W "c,float(ieee),xplink,dll,exportall"
  12. else ifeq ($(BUILD_ON),Linux)
  13. TARGETS=libpEpAdapter.a libpEpAdapter.so.$(SOVERSION)
  14. SO_CFLAGS = -shared -Wl,-soname,libpEpAdapter.so.$(SOVERSION)
  15. else
  16. TARGETS=libpEpAdapter.a
  17. endif
  18. # Build config
  19. # Defaults
  20. DEBUG=1
  21. PREFIX?=$(HOME)
  22. LIBDIR?=$(HOME)/lib
  23. CXXFLAGS+=-std=c++11 -fPIC
  24. # Overrides
  25. -include $(HERE)local.conf
  26. # Constants
  27. CXXFLAGS+=-std=c++11 -fPIC
  28. CXXFLAGS+=-I$(PREFIX)/include
  29. LDFLAGS+=-L$(PREFIX)/lib
  30. ifneq (,$(findstring g++,$(CXX)))
  31. CXXFLAGS+=-fdiagnostics-color=always
  32. else ifneq (,$(findstring clang,$(CXX)))
  33. CXXFLAGS+=-fcolor-diagnostics
  34. endif
  35. ifeq ($(DEBUG),1)
  36. CXXFLAGS+=-g -O0
  37. else
  38. CXXFLAGS+=-DNDEBUG=1 -O3
  39. endif
  40. ifndef ENGINE_TEST
  41. ENGINE_TEST = \"$(HOME)/dev/pEpEngine/test\"
  42. endif