libpEpDatatypes/Makefile.conf

37 lines
729 B
Makefile

# Copyright 2021, pEp Foundation
# This file is part of libpEpDatatypes
# 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=libpEpDatatypes.a
# Defaults
DEBUG=1
PREFIX?=$(HOME)
PREFIX_GTEST=/opt/local/
LANG_VERSION=c++17
CXXFLAGS+=-fPIC -Wall -Wextra -ansi -pedantic
ifneq (,$(findstring g++,$(CXX)))
CXXFLAGS+=-fdiagnostics-color=always
else ifneq (,$(findstring clang,$(CXX)))
CXXFLAGS+=-fcolor-diagnostics
endif
######### Overrides #########
-include $(HERE)local.conf
CXXFLAGS+=-std=$(LANG_VERSION)
ifeq ($(DEBUG),1)
CXXFLAGS+=-g -O0
else
CXXFLAGS+=-DNDEBUG=1 -O3
endif
CXXFLAGS+=-I$(PREFIX)/include