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:
parent
80b25b6270
commit
ff8b432943
@ -22,6 +22,7 @@ all: testcomp testall
|
||||
testcomp:
|
||||
$(CC) $(CFLAGS) \
|
||||
-L$(LOG_MANAGER_PATH) \
|
||||
-Wl,-rpath,$(DEST)/lib \
|
||||
-Wl,-rpath,$(LOG_MANAGER_PATH)/ \
|
||||
-o testlog -DSS_DEBUG \
|
||||
-I$(SOLIDDB_SRC_PATH)/include \
|
||||
@ -30,5 +31,6 @@ testcomp:
|
||||
-llog_manager $(LDLIBS) \
|
||||
$(LOG_MANAGER_PATH)/skygw_utils.o \
|
||||
|
||||
|
||||
testall:
|
||||
- $(LAUNCH_DEBUGGER) $(TESTAPP) $(BACKGR)
|
||||
|
@ -40,12 +40,14 @@ liblink:
|
||||
$(CPP) -shared \
|
||||
-L$(MARIADB_SRC_PATH)/libmysqld \
|
||||
-Wl,-soname,libquery_classifier.so \
|
||||
-Wl,-rpath,$(DEST)/lib \
|
||||
-Wl,-rpath,$(MARIADB_SRC_PATH)/libmysqld \
|
||||
-o libquery_classifier.so.1.0.1 ./query_classifier.o \
|
||||
$(LDLIBS) $(LDMYSQL) $(CPP_LDLIBS)
|
||||
$(DEL) ./libquery_classifier.so
|
||||
$(LINK) ./libquery_classifier.so.1.0.1 ./libquery_classifier.so
|
||||
|
||||
|
||||
install: liblink
|
||||
install ./libquery_classifier.so.1.0.1 ./libquery_classifier.so $(DEST)/lib
|
||||
|
||||
|
@ -23,6 +23,7 @@ testcomp:
|
||||
$(CC) $(CFLAGS) \
|
||||
-L$(QUERY_CLASSIFIER_PATH) \
|
||||
-L$(MARIADB_SRC_PATH)/libmysqld \
|
||||
-Wl,-rpath,$(DEST)/lib \
|
||||
-Wl,-rpath,$(MARIADB_SRC_PATH)/libmysqld \
|
||||
-Wl,-rpath,$(QUERY_CLASSIFIER_PATH)/ \
|
||||
-o testmain -DSS_DEBUG \
|
||||
@ -30,5 +31,6 @@ testcomp:
|
||||
-lquery_classifier $(LDLIBS) $(LDMYSQL) \
|
||||
$(QUERY_CLASSIFIER_PATH)/skygw_utils.o
|
||||
|
||||
|
||||
testall:
|
||||
- $(LAUNCH_DEBUGGER) $(TESTAPP) $(BACKGR)
|
||||
|
Loading…
x
Reference in New Issue
Block a user