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.
35 lines
708 B
35 lines
708 B
# Copyright 2022, pEp Foundation
|
|
# This file is part of libpEpCxx11
|
|
# This file may be used under the terms of the GNU General Public License version 3
|
|
# see LICENSE
|
|
|
|
HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
|
|
|
|
TARGET=libpEpCxx11.a
|
|
|
|
# Defaults
|
|
DEBUG=1
|
|
PREFIX?=$(HOME)
|
|
LANG_VERSION=c++11
|
|
CXXFLAGS+=-fPIC -Wall -Wextra -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
|
|
LDFLAGS=-L$(PREFIX)/lib
|