Introduction
It offers various small makefile utilities to find compilers and external packages with suitable linking flags.
Examples
Example of usage in Makefile (assuming BOOST_DIR and LIMBO_DIR are exported as the environment variable to the path where Boost and limbo library are installed)
UNAME_S = $(shell uname -s)
ifeq ($(UNAME_S), Linux)
STATIC_LINK_FLAG = -Wl,-Bstatic
DYNAMIC_LINK_FLAG = -Wl,-Bdynamic
endif
ifeq ($(UNAME_S), Darwin)
STATIC_LINK_FLAG =
DYNAMIC_LINK_FLAG =
endif
include $(LIMBO_DIR)/include/limbo/makeutils/FindCompiler.mk
include $(LIMBO_DIR)/include/limbo/makeutils/FindBoost.mk
$(info Compilers: CC = $(CC), CXX = $(CXX), FC = $(FC), AR = $(AR))
$(info Boost: BOOST_LINK_FLAG = $(BOOST_LINK_FLAG))
all: test
test: test.cpp
$(CXX) -o $@ $< -I $(BOOST_DIR) $(BOOST_LINK_FLAG) -L $(BOOST_DIR)/lib -lboost_iostreams $(DYNAMIC_LINK_FLAG)
References