# Installation path options. SBINDIR=/sbin MANDIR=/usr/share/man SYSCONTROLSOCKET=/var/run/dinitctl # General build options. # FreeBSD: use clang++ by default, supports sanitizers, requires linking with -lrt # Cannot use LTO with default linker. CXX=clang++ CXXFLAGS=-std=c++11 -Os -Wall -fno-plt -fno-rtti CPPFLAGS= LDFLAGS=-lrt TEST_CXXFLAGS=$(CXXFLAGS) -fsanitize=address,undefined TEST_LDFLAGS=$(LDFLAGS) $(TEST_CXXFLAGS) BUILD_SHUTDOWN=no # Notes: # -fno-rtti (optional) : Dinit does not require C++ Run-time Type Information # -fno-plt (optional) : Recommended optimisation # -flto (optional) : Perform link-time optimisation # -fsanitize=address,undefined : Apply sanitizers (during unit tests) # # Old versions of FreeBSD had issues with -fno-plt/-fno-rtti.