# Copyright 2022, pEp Foundation # This file is part of # 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_NAME=pEpHelloWorld TARGET_STATIC=lib$(TARGET_NAME).a # Build config # Defaults DEBUG=1 PREFIX?=$(HOME) # Overrides -include $(HERE)local.conf # Constants CXXFLAGS+=-std=c++11 -fPIC -Wall -Wextra -ansi -pedantic CXXFLAGS+=-I$(PREFIX)/include LDFLAGS+=-L$(PREFIX)/lib ifneq (,$(findstring g++,$(CXX))) CXXFLAGS+=-fdiagnostics-color=always else ifneq (,$(findstring clang,$(CXX))) CXXFLAGS+=-fcolor-diagnostics endif ifeq ($(DEBUG),1) CXXFLAGS+=-g -O0 else CXXFLAGS+=-DNDEBUG=1 -O3 endif