From: Michael Wagner Date: Wed, 6 Feb 2019 20:31:18 +0000 (+0100) Subject: Merge branch 'master' of http://wagnertech.de/git/projects X-Git-Tag: sysd2sysv_0.2-2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=79db08267b1bb93ea92e2538a66bbaac21c240b6;hp=a90bb22f89db56adb14f48da5a6858ac8dcd20bc;p=projects.git Merge branch 'master' of wagnertech.de/git/projects --- diff --git a/tools/make/c_configure.sh b/tools/make/c_configure.sh index 011d048..9f21ef1 100755 --- a/tools/make/c_configure.sh +++ b/tools/make/c_configure.sh @@ -66,9 +66,19 @@ function add_library { # parameter: # $1: main directory # $2: library name (without l or lib ) +# $3: library path (optional) src=$(pwd) echo "EXTLIB += -l$2" >> $1/make.pre + if [ -n "$3" ] + then + lib_path=$3 + if [ ${lib_path:0:1} != "/" ] + then + lib_path="$src/$lib_path" + fi + echo "LDFLAGS += -L$lib_path" >> $1/make.pre + fi } function append_library { diff --git a/tools/make/cpp.make b/tools/make/cpp.make index 183afe4..52f5409 100644 --- a/tools/make/cpp.make +++ b/tools/make/cpp.make @@ -19,5 +19,5 @@ clean: ar r $(TARGET) *.o %.so: $(SOURCE:%.cpp=%.o) $(LDLIBS) - $(CXX) -shared -o $(TARGET) *.o $(LDLIBS) $(EXTLIB) + $(CXX) -shared -o $(TARGET) *.o $(LDFLAGS) $(LDLIBS) $(EXTLIB) -include make.post