2 ## @brief find Lemon library given LEMON_DIR, set LEMON_LINK_FLAG to either STATIC_LINK_FLAG or DYNAMIC_LINK_FLAG
4 ## It check whether Lemon 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 Lemon: LEMON_LINK_FLAG = $(LEMON_LINK_FLAG))
10 ## @date Jan 2017 11:18:47 AM CST
12 ## @param LEMON_DIR given path to Lemon library
13 ## @param LEMON_LINK_FLAG set linking flag to Lemon
19 # use libemon.a to test whether lemon has static library
20 ifeq ($(wildcard $(LEMON_DIR)/lib/libemon.a),)
21 LEMON_LINK_FLAG = -Wl,-rpath,$(LEMON_DIR)/lib $(DYNAMIC_LINK_FLAG)
23 LEMON_LINK_FLAG = $(STATIC_LINK_FLAG)