]> Kevux Git Server - fll/commitdiff
Bugfix: project compiled libraries are not being found
authorKevin Day <thekevinday@gmail.com>
Fri, 19 Jul 2019 03:12:16 +0000 (22:12 -0500)
committerKevin Day <thekevinday@gmail.com>
Fri, 19 Jul 2019 03:13:38 +0000 (22:13 -0500)
This is the result of an oversight when I converted the libraries directory to have static and shared into subdirectories.
The explicit link path was not updated accordingly.

build/scripts/generate.sh

index 0ba7f4029ce91354cc60ddbe0ed834c7d3892b87..064037eeb278f7b44da8c6f7209df4c7bb71ccde 100644 (file)
@@ -272,7 +272,9 @@ generate_operation_build(){
   local micro=${variables[$(generate_id version_micro)]}
   local compiler=${variables[$(generate_id build_compiler)]}
   local linker=${variables[$(generate_id build_linker)]}
-  local arguments="-I${path_build}includes -L${path_build}libraries ${variables[$(generate_id flags_all)]} ${variables[$(generate_id build_libraries)]}"
+  local arguments="-I${path_build}includes ${variables[$(generate_id flags_all)]} ${variables[$(generate_id build_libraries)]}"
+  local arguments_shared="-L${path_build}libraries/shared"
+  local arguments_static="-L${path_build}libraries/static"
   local shared=${variables[$(generate_id build_shared)]}
   local static=${variables[$(generate_id build_static)]}
   local sources_library=${variables[$(generate_id build_sources_library)]}
@@ -309,8 +311,8 @@ generate_operation_build(){
         sources="$sources$path_c$i "
       done
 
-      echo $compiler $sources -shared -Wl,-soname,lib$name.so.$major -o ${path_build}libraries/shared/lib$name.so.$major.$minor.$micro $arguments ${variables[$(generate_id flags_shared)]} ${variables[$(generate_id flags_library)]}
-      $compiler $sources -shared -Wl,-soname,lib$name.so.$major -o ${path_build}libraries/shared/lib$name.so.$major.$minor.$micro $arguments ${variables[$(generate_id flags_shared)]} ${variables[$(generate_id flags_library)]} || failure=1
+      echo $compiler $sources -shared -Wl,-soname,lib$name.so.$major -o ${path_build}libraries/shared/lib$name.so.$major.$minor.$micro $arguments $arguments_shared ${variables[$(generate_id flags_shared)]} ${variables[$(generate_id flags_library)]}
+      $compiler $sources -shared -Wl,-soname,lib$name.so.$major -o ${path_build}libraries/shared/lib$name.so.$major.$minor.$micro $arguments $arguments_shared ${variables[$(generate_id flags_shared)]} ${variables[$(generate_id flags_library)]} || failure=1
 
       if [[ $failure == "" ]] ; then
         ln -vsf lib$name.so.$major.$minor.$micro ${path_build}libraries/shared/lib$name.so.$major || failure=1
@@ -330,8 +332,8 @@ generate_operation_build(){
         sources="$sources$path_c$i "
       done
 
-      echo $compiler $sources -o ${path_build}programs/shared/$name $arguments ${variables[$(generate_id flags_shared)]} ${variables[$(generate_id flags_program)]}
-      $compiler $sources -o ${path_build}programs/shared/$name $arguments ${variables[$(generate_id flags_shared)]} ${variables[$(generate_id flags_program)]} || failure=1
+      echo $compiler $sources -o ${path_build}programs/shared/$name $arguments $arguments_shared ${variables[$(generate_id flags_shared)]} ${variables[$(generate_id flags_program)]}
+      $compiler $sources -o ${path_build}programs/shared/$name $arguments $arguments_shared ${variables[$(generate_id flags_shared)]} ${variables[$(generate_id flags_program)]} || failure=1
     fi
   fi
 
@@ -341,8 +343,8 @@ generate_operation_build(){
       for i in $sources_library ; do
         sources="$sources${path_build}objects/$i.o "
 
-        echo $compiler $path_c$i -c -static -o ${path_build}objects/$i.o $arguments ${variables[$(generate_id flags_static)]} ${variables[$(generate_id flags_library)]}
-        $compiler $path_c$i -c -static -o ${path_build}objects/$i.o $arguments ${variables[$(generate_id flags_static)]} ${variables[$(generate_id flags_library)]} || failure=1
+        echo $compiler $path_c$i -c -static -o ${path_build}objects/$i.o $arguments $arguments_static ${variables[$(generate_id flags_static)]} ${variables[$(generate_id flags_library)]}
+        $compiler $path_c$i -c -static -o ${path_build}objects/$i.o $arguments $arguments_static ${variables[$(generate_id flags_static)]} ${variables[$(generate_id flags_library)]} || failure=1
 
         if [[ $failure == "1" ]] ; then
           break;
@@ -367,8 +369,8 @@ generate_operation_build(){
         sources="$sources$path_c$i "
       done
 
-      echo $compiler -static -o ${path_build}programs/static/$name $sources $arguments ${variables[$(generate_id flags_static)]} ${variables[$(generate_id flags_program)]}
-      $compiler -static -o ${path_build}programs/static/$name $sources $arguments ${variables[$(generate_id flags_static)]} ${variables[$(generate_id flags_program)]} || failure=1
+      echo $compiler -static -o ${path_build}programs/static/$name $sources $arguments $arguments_static ${variables[$(generate_id flags_static)]} ${variables[$(generate_id flags_program)]}
+      $compiler -static -o ${path_build}programs/static/$name $sources $arguments $arguments_static ${variables[$(generate_id flags_static)]} ${variables[$(generate_id flags_program)]} || failure=1
     fi
   fi