Limbo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FindLemon.mk
Go to the documentation of this file.
1 ## @file FindLemon.mk
2 ## @brief find Lemon library given LEMON_DIR, set LEMON_LINK_FLAG to either STATIC_LINK_FLAG or DYNAMIC_LINK_FLAG
3 ##
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
6 ##
7 ## $(info Lemon: LEMON_LINK_FLAG = $(LEMON_LINK_FLAG))
8 ##
9 ## @author Yibo Lin
10 ## @date Jan 2017 11:18:47 AM CST
11 ##
12 ## @param LEMON_DIR given path to Lemon library
13 ## @param LEMON_LINK_FLAG set linking flag to Lemon
14 
15 ## @cond
16 
17 LEMON_LINK_FLAG :=
18 
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)
22 else
23  LEMON_LINK_FLAG = $(STATIC_LINK_FLAG)
24 endif
25 
26 ## @endcond