A C++ wrapper for the basic C datatypes defined by the pEpEngine.
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.

53 lines
1015 B

  1. # Copyright 2021, pEp Foundation
  2. # This file is part of libpEpDatatypes
  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. TARGET=libpEpDatatypes.a
  7. # Defaults
  8. DEBUG=1
  9. PREFIX?=$(HOME)
  10. ENGINE_LIB_PATH=$(PREFIX)/lib
  11. ENGINE_INC_PATH=$(PREFIX)/include
  12. CXXFLAGS+=-fPIC
  13. # Build target
  14. BUILD_FOR:=$(shell uname)
  15. ifneq (,$(findstring g++,$(CXX)))
  16. CXXFLAGS+=-fdiagnostics-color=always
  17. else ifneq (,$(findstring clang,$(CXX)))
  18. CXXFLAGS+=-fcolor-diagnostics
  19. endif
  20. ######### Overrides #########
  21. -include $(HERE)local.conf
  22. ifeq ($(DEBUG),1)
  23. CXXFLAGS+=-g -O0
  24. else
  25. CXXFLAGS+=-DNDEBUG=1 -O3
  26. endif
  27. ifdef $(LANG_VERSION)
  28. CXXFLAGS+=-std=$(LANG_VERSION)
  29. else
  30. CXXFLAGS+=-std=c++14
  31. endif
  32. # Add -L Prefixes to LIB/INC paths,
  33. # if not already explicitly set in local.conf
  34. ifndef ENGINE_LIB
  35. ENGINE_LIB=-L$(ENGINE_LIB_PATH)
  36. endif
  37. ifndef ENGINE_INC
  38. ENGINE_INC=-I$(ENGINE_INC_PATH)
  39. endif
  40. CXXFLAGS += $(ENGINE_INC)