# Copyright 2018, pEp Foundation # This file is part of libpEpAdapter # This file may be used under the terms of the GNU General Public License version 3 # see LICENSE.txt HERE:=$(dir $(lastword $(MAKEFILE_LIST))) TARGET=libpEpAdapter.a # Build config # Defaults DEBUG=1 PREFIX?=$(HOME) # Overrides -include $(HERE)local.conf # Constants CXXFLAGS+=-std=c++11 -fPIC CXXFLAGS+=-Wall -pedantic-errors -Wno-unused-parameter -Wno-reorder-ctor CXXFLAGS+=-isystem $(PREFIX)/include CFLAGS+=-fPIC -pthread -DSQLITE_THREADSAFE=1 LDFLAGS+=-L$(PREFIX)/lib ifneq (,$(findstring g++,$(CXX))) CXXFLAGS+=-fdiagnostics-color=always CFLAGS+=-fdiagnostics-color=always else ifneq (,$(findstring clang,$(CXX))) CXXFLAGS+=-fcolor-diagnostics -fdiagnostics-show-template-tree CFLAGS+=-fcolor-diagnostics endif ifeq ($(DEBUG),1) CXXFLAGS+=-g -O0 CFLAGS+=-g -O0 else CXXFLAGS+=-DNDEBUG=1 -O3 CFLAGS+=-DNDEBUG=1 -O3 endif