An Implementation of the Tox Protocol Specification (https://toktok.ltd/spec.html)
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.
 
 

34 lines
706 B

# Copyright 2022, pibit AG
# This file is part of libpox
# 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=pox
TARGET_STATIC=lib$(TARGET_NAME).a
# Build config
# Defaults
DEBUG=1
PREFIX?=$(HOME)
# Overrides
-include $(HERE)local.conf
# Constants
CXXFLAGS+=-ansi -std=c++17 -fPIC -Wall -Wextra -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