2 ## @brief find Boost library given BOOST_DIR, set BOOST_LINK_FLAG to either STATIC_LINK_FLAG or DYNAMIC_LINK_FLAG
4 ## It check whether Boost library is installed as static library. If so, link to static library; otherwise, link to shared library.
5 ## Use following command in the Makefile to view the results
7 ## $(info Boost: BOOST_LINK_FLAG = $(BOOST_LINK_FLAG))
12 ## @param BOOST_DIR given path to Boost library
13 ## @param BOOST_LINK_FLAG set linking flag to Boost
19 # use libboost_system.a to test whether boost has static library
20 ifeq ($(wildcard $(BOOST_DIR)/lib/libboost_system.a),)
21 BOOST_LINK_FLAG = -Wl,-rpath,$(BOOST_DIR)/lib $(DYNAMIC_LINK_FLAG)
23 BOOST_LINK_FLAG = $(STATIC_LINK_FLAG)