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.

49 lines
979 B

11 months ago
  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. LANG_VERSION=c++17
  13. CXXFLAGS+=-fPIC
  14. # Build target
  15. BUILD_FOR:=$(shell uname)
  16. ifneq (,$(findstring g++,$(CXX)))
  17. CXXFLAGS+=-fdiagnostics-color=always
  18. else ifneq (,$(findstring clang,$(CXX)))
  19. CXXFLAGS+=-fcolor-diagnostics
  20. endif
  21. ######### Overrides #########
  22. -include $(HERE)local.conf
  23. CXXFLAGS+=-std=$(LANG_VERSION)
  24. ifeq ($(DEBUG),1)
  25. CXXFLAGS+=-g -O0
  26. else
  27. CXXFLAGS+=-DNDEBUG=1 -O3
  28. endif
  29. # Add -L Prefixes to LIB/INC paths,
  30. # if not already explicitly set in local.conf
  31. ifndef ENGINE_LIB
  32. ENGINE_LIB=-L$(ENGINE_LIB_PATH)
  33. endif
  34. ifndef ENGINE_INC
  35. ENGINE_INC=-I$(ENGINE_INC_PATH)
  36. endif
  37. CXXFLAGS += $(ENGINE_INC)