posaune
authorMichael Wagner <michael@wagnertech.de>
Sun, 9 Sep 2018 19:37:57 +0000 (21:37 +0200)
committerMichael Wagner <michael@wagnertech.de>
Sun, 9 Sep 2018 19:37:57 +0000 (21:37 +0200)
tools/make/c_configure.sh
tools/make/cpp.make
tools/make/mconfigure

index c7b610a..011d048 100755 (executable)
@@ -61,6 +61,16 @@ function add_include {
        echo "CXXFLAGS += -I$src/$2" >> $1/make.pre
 }
 
        echo "CXXFLAGS += -I$src/$2" >> $1/make.pre
 }
 
+function add_library {
+# adds a extern library
+# parameter:
+# $1: main directory
+# $2: library name (without l or lib )
+
+       src=$(pwd)
+       echo "EXTLIB += -l$2" >> $1/make.pre
+}
+
 function append_library {
 # same as append_dependency. In addition a include statement + a link to the library is added to "main directory"
 # parameter:
 function append_library {
 # same as append_dependency. In addition a include statement + a link to the library is added to "main directory"
 # parameter:
index 1b4d863..183afe4 100644 (file)
@@ -19,5 +19,5 @@ clean:
        ar r $(TARGET) *.o
 
 %.so: $(SOURCE:%.cpp=%.o) $(LDLIBS)
        ar r $(TARGET) *.o
 
 %.so: $(SOURCE:%.cpp=%.o) $(LDLIBS)
-       $(CXX) -shared -o $(TARGET) *.o $(LDLIBS)
+       $(CXX) -shared -o $(TARGET) *.o $(LDLIBS) $(EXTLIB)
 -include make.post
 -include make.post
index 438321e..7b6db95 100755 (executable)
@@ -166,7 +166,7 @@ then
        # copy package control
        if [ ! -f debian/control ]
        then
        # copy package control
        if [ ! -f debian/control ]
        then
-               control=$(find etc -name $paket.control)
+               control=$(find etc -name $paket.control) || true
                if [ -z "$control" ]
                then
                        echo "warning: control file not found"
                if [ -z "$control" ]
                then
                        echo "warning: control file not found"