Added run-time path to dynamically loadable libraries; '-Wl,rpath,$(DEST)/lib' to makefile. When compiling, use
make DEST=<path to library directory>
This commit is contained in:
@ -22,6 +22,7 @@ all: testcomp testall
|
|||||||
testcomp:
|
testcomp:
|
||||||
$(CC) $(CFLAGS) \
|
$(CC) $(CFLAGS) \
|
||||||
-L$(LOG_MANAGER_PATH) \
|
-L$(LOG_MANAGER_PATH) \
|
||||||
|
-Wl,-rpath,$(DEST)/lib \
|
||||||
-Wl,-rpath,$(LOG_MANAGER_PATH)/ \
|
-Wl,-rpath,$(LOG_MANAGER_PATH)/ \
|
||||||
-o testlog -DSS_DEBUG \
|
-o testlog -DSS_DEBUG \
|
||||||
-I$(SOLIDDB_SRC_PATH)/include \
|
-I$(SOLIDDB_SRC_PATH)/include \
|
||||||
@ -30,5 +31,6 @@ testcomp:
|
|||||||
-llog_manager $(LDLIBS) \
|
-llog_manager $(LDLIBS) \
|
||||||
$(LOG_MANAGER_PATH)/skygw_utils.o \
|
$(LOG_MANAGER_PATH)/skygw_utils.o \
|
||||||
|
|
||||||
|
|
||||||
testall:
|
testall:
|
||||||
- $(LAUNCH_DEBUGGER) $(TESTAPP) $(BACKGR)
|
- $(LAUNCH_DEBUGGER) $(TESTAPP) $(BACKGR)
|
||||||
|
@ -40,12 +40,14 @@ liblink:
|
|||||||
$(CPP) -shared \
|
$(CPP) -shared \
|
||||||
-L$(MARIADB_SRC_PATH)/libmysqld \
|
-L$(MARIADB_SRC_PATH)/libmysqld \
|
||||||
-Wl,-soname,libquery_classifier.so \
|
-Wl,-soname,libquery_classifier.so \
|
||||||
|
-Wl,-rpath,$(DEST)/lib \
|
||||||
-Wl,-rpath,$(MARIADB_SRC_PATH)/libmysqld \
|
-Wl,-rpath,$(MARIADB_SRC_PATH)/libmysqld \
|
||||||
-o libquery_classifier.so.1.0.1 ./query_classifier.o \
|
-o libquery_classifier.so.1.0.1 ./query_classifier.o \
|
||||||
$(LDLIBS) $(LDMYSQL) $(CPP_LDLIBS)
|
$(LDLIBS) $(LDMYSQL) $(CPP_LDLIBS)
|
||||||
$(DEL) ./libquery_classifier.so
|
$(DEL) ./libquery_classifier.so
|
||||||
$(LINK) ./libquery_classifier.so.1.0.1 ./libquery_classifier.so
|
$(LINK) ./libquery_classifier.so.1.0.1 ./libquery_classifier.so
|
||||||
|
|
||||||
|
|
||||||
install: liblink
|
install: liblink
|
||||||
install ./libquery_classifier.so.1.0.1 ./libquery_classifier.so $(DEST)/lib
|
install ./libquery_classifier.so.1.0.1 ./libquery_classifier.so $(DEST)/lib
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ testcomp:
|
|||||||
$(CC) $(CFLAGS) \
|
$(CC) $(CFLAGS) \
|
||||||
-L$(QUERY_CLASSIFIER_PATH) \
|
-L$(QUERY_CLASSIFIER_PATH) \
|
||||||
-L$(MARIADB_SRC_PATH)/libmysqld \
|
-L$(MARIADB_SRC_PATH)/libmysqld \
|
||||||
|
-Wl,-rpath,$(DEST)/lib \
|
||||||
-Wl,-rpath,$(MARIADB_SRC_PATH)/libmysqld \
|
-Wl,-rpath,$(MARIADB_SRC_PATH)/libmysqld \
|
||||||
-Wl,-rpath,$(QUERY_CLASSIFIER_PATH)/ \
|
-Wl,-rpath,$(QUERY_CLASSIFIER_PATH)/ \
|
||||||
-o testmain -DSS_DEBUG \
|
-o testmain -DSS_DEBUG \
|
||||||
@ -30,5 +31,6 @@ testcomp:
|
|||||||
-lquery_classifier $(LDLIBS) $(LDMYSQL) \
|
-lquery_classifier $(LDLIBS) $(LDMYSQL) \
|
||||||
$(QUERY_CLASSIFIER_PATH)/skygw_utils.o
|
$(QUERY_CLASSIFIER_PATH)/skygw_utils.o
|
||||||
|
|
||||||
|
|
||||||
testall:
|
testall:
|
||||||
- $(LAUNCH_DEBUGGER) $(TESTAPP) $(BACKGR)
|
- $(LAUNCH_DEBUGGER) $(TESTAPP) $(BACKGR)
|
||||||
|
Reference in New Issue
Block a user