]> Kevux Git Server - fll/commitdiff
Update: build level and monolithic fixes and improvements
authorKevin Day <thekevinday@gmail.com>
Sat, 23 Nov 2019 04:56:20 +0000 (22:56 -0600)
committerKevin Day <thekevinday@gmail.com>
Sat, 23 Nov 2019 04:56:20 +0000 (22:56 -0600)
Add missing library: fll_file.

Make it even easier to compile against "level" and "monolithic" build processes by providing "--level" and "--monolithic" parameters to the generate.sh script and associated settings files.

Make sure package.sh clears other build modes (when --level is specified, make sur --individual and --monolithic modes are not set).

18 files changed:
build/level_0/settings
build/level_1/settings
build/level_2/settings
build/monolithic/settings
build/scripts/generate.sh
build/scripts/package.sh
level_3/byte_dump/data/build/settings
level_3/firewall/data/build/settings
level_3/fss_basic_list_read/data/build/settings
level_3/fss_basic_list_write/data/build/settings
level_3/fss_basic_read/data/build/settings
level_3/fss_basic_write/data/build/settings
level_3/fss_extended_list_read/data/build/settings
level_3/fss_extended_read/data/build/settings
level_3/fss_extended_write/data/build/settings
level_3/fss_status_code/data/build/settings
level_3/init/data/build/settings
level_3/status_code/data/build/settings

index e41ce5b3b269fcfef5a35747b88106d15b90ba73..179ba4b510f319265b13477eb7d3218c21e35d06 100644 (file)
@@ -11,6 +11,7 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll
+build_libraries_fll-level
 build_sources_library console.c conversion.c file.c memory.c pipe.c print.c utf.c
 build_sources_program
 build_sources_headers color.h console.h conversion.h file.h fss.h memory.h path_fll.h path_filesystem.h pipe.h print.h serialized.h socket.h status.h string.h type.h type_array.h utf.h
index 53c2bcb2d76fc4f534517c84ddbda28784b419f4..015719810eb5e457f592d3dade65208fa7dcdc32 100644 (file)
@@ -11,6 +11,7 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll -lfll_0
+build_libraries_fll-level -lfll_0
 build_sources_library color.c console.c directory.c file.c fss.c fss_basic.c fss_basic_list.c fss_extended.c serialized.c socket.c status.c string.c utf.c
 build_sources_program 
 build_sources_headers color.h console.h directory.h file.h fss.h fss_basic.h fss_basic_list.h fss_status.h fss_extended.h fss_macro.h serialized.h socket.h status.h string.h utf.h
index f5f1a52dd66d27dccc382d0b8052614359b5726f..773a50baf75efa6086ad61eed7ca19e6f27b91a5 100644 (file)
@@ -11,9 +11,10 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll -lfll_0 -lfll_1
-build_sources_library execute.c fss_basic.c fss_basic_list.c fss_extended.c fss_status.c program.c status.c
+build_libraries_fll-level -lfll_0 -lfll_1
+build_sources_library execute.c file.c fss_basic.c fss_basic_list.c fss_extended.c fss_status.c program.c status.c
 build_sources_program 
-build_sources_headers execute.h fss_basic.h fss_basic_list.h fss_extended.h fss_status.h program.h status.h
+build_sources_headers execute.h file.h fss_basic.h fss_basic_list.h fss_extended.h fss_status.h program.h status.h
 build_shared yes
 build_static yes
 
index ec702ab3dcb29307cc38dc6cd3dccea48bdf1e18..9d4cfdd8d6cd7ee437cf8fd4d99ee872ada8f272 100644 (file)
@@ -11,9 +11,9 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll
-build_sources_library level_0/console.c level_0/conversion.c level_0/file.c level_0/memory.c level_0/pipe.c level_0/print.c level_0/utf.c level_1/color.c level_1/console.c level_1/directory.c level_1/file.c level_1/fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_extended.c level_1/serialized.c level_1/socket.c level_1/status.c level_1/string.c level_1/utf.c level_2/execute.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_extended.c level_2/fss_status.c level_2/program.c level_2/status.c
+build_sources_library level_0/console.c level_0/conversion.c level_0/file.c level_0/memory.c level_0/pipe.c level_0/print.c level_0/utf.c level_1/color.c level_1/console.c level_1/directory.c level_1/file.c level_1/fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_extended.c level_1/serialized.c level_1/socket.c level_1/status.c level_1/string.c level_1/utf.c level_2/execute.c level_2/file.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_extended.c level_2/fss_status.c level_2/program.c level_2/status.c
 build_sources_program
-build_sources_headers level_0/color.h level_0/console.h level_0/conversion.h level_0/file.h level_0/fss.h level_0/memory.h level_0/path_fll.h level_0/path_filesystem.h level_0/pipe.h level_0/print.h level_0/serialized.h level_0/socket.h level_0/status.h level_0/string.h level_0/type.h level_0/type_array.h level_0/utf.h level_1/color.h level_1/console.h level_1/directory.h level_1/file.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_status.h level_1/fss_extended.h level_1/fss_macro.h level_1/serialized.h level_1/socket.h level_1/status.h level_1/string.h level_1/utf.h level_2/execute.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_extended.h level_2/fss_status.h level_2/program.h level_2/status.h
+build_sources_headers level_0/color.h level_0/console.h level_0/conversion.h level_0/file.h level_0/fss.h level_0/memory.h level_0/path_fll.h level_0/path_filesystem.h level_0/pipe.h level_0/print.h level_0/serialized.h level_0/socket.h level_0/status.h level_0/string.h level_0/type.h level_0/type_array.h level_0/utf.h level_1/color.h level_1/console.h level_1/directory.h level_1/file.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_status.h level_1/fss_extended.h level_1/fss_macro.h level_1/serialized.h level_1/socket.h level_1/status.h level_1/string.h level_1/utf.h level_2/execute.h level_2/file.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_extended.h level_2/fss_status.h level_2/program.h level_2/status.h
 build_sources_bash
 build_sources_settings
 build_shared yes
index b5f4e77d2bd86336127da52460b76525809677dd..481ec3d4d4da2e94e07ca514895ac1ecf6ff371a 100644 (file)
@@ -28,6 +28,7 @@ generate_main(){
   local c_subtle="\\033[1;30m"
   local c_prefix="\\"
 
+  local build_libraries_fll="build_libraries_fll"
   local variables=
   local settings_file=
   local settings_defines=
@@ -78,6 +79,10 @@ generate_main(){
           grab_next=work_directory
         elif [[ $p == "-d" || $p == "--defines" ]] ; then
           grab_next=defines_override
+        elif [[ $p == "-l" || $p == "--level" ]] ; then
+          build_libraries_fll="build_libraries_fll-level"
+        elif [[ $p == "-m" || $p == "--monolithic" ]] ; then
+          build_libraries_fll="build_libraries_fll-monolithic"
         elif [[ $p == "--enable-shared" ]] ; then
           enable_shared="yes"
         elif [[ $p == "--disable-shared" ]] ; then
@@ -227,6 +232,8 @@ generate_help(){
   echo -e " -${c_important}p$c_reset, --${c_important}project${c_reset}         Project name for storing built status"
   echo -e " -${c_important}w$c_reset, --${c_important}work_directory${c_reset}  Use includes/libraries from this directory instead of system"
   echo -e " -${c_important}d$c_reset, --${c_important}defines${c_reset}         Override custom defines with these defines"
+  echo -e " -${c_important}l$c_reset, --${c_important}level${c_reset}           Use FLL dependencies by level (-lfll_0, -lfll_1, -lfll_2)"
+  echo -e " -${c_important}m$c_reset, --${c_important}monolithic${c_reset}      Use FLL dependencies by monolithic (-lfll)"
   echo
   echo -e "${c_highlight}Special Options:$c_reset"
   echo -e " --${c_important}enable-shared${c_reset}   Forcibly do install shared files"
@@ -248,7 +255,7 @@ generate_id(){
     "build_compiler") echo -n 5;;
     "build_linker") echo -n 6;;
     "build_libraries") echo -n 7;;
-    "build_libraries_fll") echo -n 8;;
+    "$build_libraries_fll") echo -n 8;;
     "build_sources_library") echo -n 9;;
     "build_sources_program") echo -n 10;;
     "build_sources_headers") echo -n 11;;
@@ -285,8 +292,8 @@ generate_load_settings(){
     exit $failure
   fi
 
-  for i in project_name project_level version_major version_minor version_micro build_compiler build_linker build_libraries build_libraries_fll build_sources_library build_sources_program build_sources_headers build_sources_settings build_shared build_static defines_all defines_shared defines_static flags_all flags_shared flags_static flags_library flags_program ; do
-    variables[$(generate_id $i)]=$(grep -s -o "^[[:space:]]*$i\>.*$" $settings_file | sed -e "s|^[[:space:]]*$i\>||" -e 's|^[[:space:]]*||')
+  for i in project_name project_level version_major version_minor version_micro build_compiler build_linker build_libraries $build_libraries_fll build_sources_library build_sources_program build_sources_headers build_sources_settings build_shared build_static defines_all defines_shared defines_static flags_all flags_shared flags_static flags_library flags_program ; do
+    variables[$(generate_id $i)]=$(grep -s -o "^[[:space:]]*$i[[:space:]].*\$" $settings_file | sed -e "s|^[[:space:]]*$i\>||" -e 's|^[[:space:]]*||')
   done
 
   if [[ $project_name == "" ]] ; then
@@ -336,7 +343,7 @@ 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="${variables[$(generate_id build_libraries_fll)]} ${variables[$(generate_id build_libraries)]}"
+  local arguments="${variables[$(generate_id "$build_libraries_fll")]} ${variables[$(generate_id build_libraries)]}"
   local arguments_include="-I${path_build}includes"
   local arguments_shared="-L${path_build}libraries/shared"
   local arguments_static="-L${path_build}libraries/static"
index 9d1db98365f92804e4844cdaab2871dc4d34f31c..3bfb2a8b63f356702ec2e335052024357984f93f 100644 (file)
@@ -63,9 +63,15 @@ package_main(){
           grab_next=path_destination
         elif [[ $p == "-i" || $p == "--individual" ]] ; then
           mode_individual="yes"
+          mode_level=
+          mode_monolithic=
         elif [[ $p == "-l" || $p == "--level" ]] ; then
+          mode_individual=
           mode_level="yes"
+          mode_monolithic=
         elif [[ $p == "-m" || $p == "--monolithic" ]] ; then
+          mode_individual=
+          mode_level=
           mode_monolithic="yes"
         elif [[ $p == "-p" || $p == "--program" ]] ; then
           mode_program="yes"
index 0521c90970fd429f584eaecba6fd29b64054b5fe..f13ab9104cb77cc9e721c8efaabb828b8c780567 100644 (file)
@@ -11,8 +11,8 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll -lfll_program -lfl_utf -lfl_string -lfl_file -lfl_console -lfl_color -lf_utf -lf_print -lf_pipe -lf_file -lf_conversion -lf_console -lf_memory
-#build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
-#build_libraries_fll-monolithic -lfll
+build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
+build_libraries_fll-monolithic -lfll
 build_sources_library byte_dump.c private-byte_dump.c
 build_sources_program main.c
 build_sources_headers byte_dump.h
index c4fea7d133952c0eb4ee959d80888317e4b79497..8569e5936328507f6c944364bd390db7d9c57d7f 100644 (file)
@@ -11,8 +11,8 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll -lfll_program -lfll_fss -lfll_execute -lfl_string -lfl_status -lfl_fss -lf_conversion -lfl_file -lfl_directory -lfl_console -lfl_color -lf_file -lf_utf -lf_print -lf_pipe -lf_console -lf_memory
-#build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
-#build_libraries_fll-monolithic -lfll
+build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
+build_libraries_fll-monolithic -lfll
 build_sources_library firewall.c private-firewall.c
 build_sources_program main.c
 build_sources_headers firewall.h
index 76fadc15b8a5378fdf39be2c6ec311a519fbbad7..762d22658ef3450fbaf1fec5cd8f79b28b7e0f5a 100644 (file)
@@ -11,8 +11,8 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll -lfll_program -lfll_file -lfll_fss -lfll_execute -lfl_string -lfl_status -lfl_fss -lf_conversion -lfl_file -lfl_directory -lfl_console -lfl_color -lf_utf -lf_file -lf_print -lf_pipe -lf_console -lf_memory
-#build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
-#build_libraries_fll-monolithic -lfll
+build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
+build_libraries_fll-monolithic -lfll
 build_sources_library fss_basic_list_read.c private-fss_basic_list_read.c
 build_sources_program main.c
 build_sources_headers fss_basic_list_read.h
index ee732b18830ff597346d8c7c54ea7ccf5f4d1cae..0113ee487567cdf404ade416ddd340345cf14adb 100644 (file)
@@ -11,8 +11,8 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll -lfll_program -lfll_file -lfll_fss -lfll_execute -lfl_string -lfl_status -lfl_fss -lf_conversion -lfl_file -lfl_directory -lfl_console -lfl_color -lf_utf -lf_file -lf_print -lf_pipe -lf_console -lf_memory
-#build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
-#build_libraries_fll-monolithic -lfll
+build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
+build_libraries_fll-monolithic -lfll
 build_sources_library fss_basic_list_write.c
 build_sources_program main.c
 build_sources_headers fss_basic_list_write.h
index 6506de81a3961cdecb810559bd90c57d7ba125be..4230baffdaf2383d07de283d20c58fe59699b9b1 100644 (file)
@@ -11,8 +11,8 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll -lfll_program -lfll_file -lfll_fss -lfll_execute -lfl_string -lfl_status -lfl_fss -lf_conversion -lfl_file -lfl_directory -lfl_console -lfl_color -lf_utf -lf_file -lf_print -lf_pipe -lf_console -lf_memory
-#build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
-#build_libraries_fll-monolithic -lfll
+build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
+build_libraries_fll-monolithic -lfll
 build_sources_library fss_basic_read.c private-fss_basic_read.c
 build_sources_program main.c
 build_sources_headers fss_basic_read.h
index 27cb99bd2dadf6f4cbbbe74265a405dc96b6072a..edf47ab249c1ee3f4dc14c1392ec15d577b2e6c1 100644 (file)
@@ -11,8 +11,8 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll -lfll_program -lfll_file -lfll_fss -lfll_execute -lfl_string -lfl_status -lfl_fss -lf_conversion -lfl_file -lfl_directory -lfl_console -lfl_color -lf_utf -lf_file -lf_print -lf_pipe -lf_console -lf_memory
-#build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
-#build_libraries_fll-monolithic -lfll
+build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
+build_libraries_fll-monolithic -lfll
 build_sources_library fss_basic_write.c
 build_sources_program main.c
 build_sources_headers fss_basic_write.h
index 538361a2e187d13f9fe939587dd6c63236601c35..cefe159756db211082bfe72ed3ad11bd02805d41 100644 (file)
@@ -11,8 +11,8 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll -lfll_program -lfll_file -lfll_fss -lfll_execute -lfl_string -lfl_status -lfl_fss -lf_conversion -lfl_file -lfl_directory -lfl_console -lfl_color -lf_utf -lf_file -lf_print -lf_pipe -lf_console -lf_memory
-#build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
-#build_libraries_fll-monolithic -lfll
+build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
+build_libraries_fll-monolithic -lfll
 build_sources_library fss_extended_list_read.c private-fss_extended_list_read.c
 build_sources_program main.c
 build_sources_headers fss_extended_list_read.h
index 54bc245d2d6e34b784ae70fe6d5500a0b789a5bc..6e190536a96fcb4a4c27f5c779d7a9070c0e5876 100644 (file)
@@ -11,8 +11,8 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll -lfll_program -lfll_file -lfll_fss -lfll_execute -lfl_string -lfl_status -lfl_fss -lf_conversion -lfl_file -lfl_directory -lfl_console -lfl_color -lf_utf -lf_file -lf_print -lf_pipe -lf_console -lf_memory
-#build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
-#build_libraries_fll-monolithic -lfll
+build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
+build_libraries_fll-monolithic -lfll
 build_sources_library fss_extended_read.c private-fss_extended_read.c
 build_sources_program main.c
 build_sources_headers fss_extended_read.h
index d49ec12b6b759a36c793e6efe325b813de30e43a..c55032e0ac7dd66564376cc68d783edec7eba35b 100644 (file)
@@ -11,8 +11,8 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll -lfll_program -lfll_file -lfll_fss -lfll_execute -lfl_string -lfl_status -lfl_fss -lf_conversion -lfl_file -lfl_directory -lfl_color -lf_utf -lf_file -lf_print -lf_pipe -lf_console -lf_memory
-#build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
-#build_libraries_fll-monolithic -lfll
+build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
+build_libraries_fll-monolithic -lfll
 build_sources_library fss_extended_write.c
 build_sources_program main.c
 build_sources_headers fss_extended_write.h
index 0112eb7054a090181d8644751a1cb43f35d7f67f..adacf39ad6e57b3250ea548c8393dd63b20a710c 100644 (file)
@@ -11,8 +11,8 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll -lfll_program -lfll_file -lfll_fss -lfll_execute -lfll_status -lfl_utf -lfl_string -lfl_status -lfl_fss -lfl_file -lfl_directory -lfl_console -lfl_color -lf_utf -lf_print -lf_pipe -lf_file -lf_conversion -lf_console -lf_memory
-#build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
-#build_libraries_fll-monolithic -lfll
+build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
+build_libraries_fll-monolithic -lfll
 build_sources_library fss_status_code.c private-fss_status_code.c
 build_sources_program main.c
 build_sources_headers fss_status_code.h
index cc3d8cd9ffc6d5dac2e82b1e6577244719c114b9..615326509d4b5a422d2f05125d758af9c11a6b7c 100644 (file)
@@ -11,8 +11,8 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll -lfll_program -lfll_fss -lfll_execute -lfl_string -lfl_status -lfl_fss -lf_conversion -lfl_file -lfl_directory -lfl_console -lfl_color -lf_file -lf_utf -lf_print -lf_pipe -lf_console -lf_memory
-#build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
-#build_libraries_fll-monolithic -lfll
+build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
+build_libraries_fll-monolithic -lfll
 build_sources_library init.c private-init.c
 build_sources_program main.c
 build_sources_headers init.h
index 1c5f836c345c7eee4e479bcad64d09697a5c3edb..6409f98f1cf97b57228ae636349bfef7839b86db 100644 (file)
@@ -11,8 +11,8 @@ build_compiler gcc
 build_linker ar
 build_libraries -lc
 build_libraries_fll -lfll_status -lfll_program -lfl_utf -lfl_string -lfl_status -lfl_file -lfl_console -lfl_color -lf_utf -lf_print -lf_pipe -lf_file -lf_conversion -lf_console -lf_memory
-#build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
-#build_libraries_fll-monolithic -lfll
+build_libraries_fll-level -lfll_2 -lfll_1 -lfll_0
+build_libraries_fll-monolithic -lfll
 build_sources_library status_code.c private-status_code.c
 build_sources_program main.c
 build_sources_headers status_code.h