summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJacek Kryszyn <j.kryszyn@samsung.com>2023-07-28 16:25:55 +0200
committerJacek Kryszyn <j.kryszyn@samsung.com>2023-07-28 16:25:55 +0200
commitbb3025f25201e59d0a7ba7d8bec2578480ed0689 (patch)
tree4e16d90a0f94efc9b3f8970d825dfaa718e45c8c /lib
parent3241cf203afc344273e5f6cc3d5ab40500717b5d (diff)
downloaddynpart-tools-bb3025f25201e59d0a7ba7d8bec2578480ed0689.tar.gz
dynpart-tools-bb3025f25201e59d0a7ba7d8bec2578480ed0689.tar.bz2
dynpart-tools-bb3025f25201e59d0a7ba7d8bec2578480ed0689.zip
lpmake is built using cmake. libraries added as subdirectories. static build
Diffstat (limited to 'lib')
-rw-r--r--lib/base/CMakeLists.txt45
-rw-r--r--lib/boringssl/CMakeLists.txt649
-rw-r--r--lib/ext4_utils/CMakeLists.txt23
-rw-r--r--[-rwxr-xr-x]lib/fmtlib/CMakeLists.txt306
-rwxr-xr-xlib/fmtlib/CMakeLists.txt.orig298
-rw-r--r--lib/libcrypto_utils/CMakeLists.txt21
-rw-r--r--lib/libjsonpb/CMakeLists.txt23
-rw-r--r--lib/liblog/CMakeLists.txt43
-rw-r--r--lib/liblp/CMakeLists.txt30
-rw-r--r--lib/libsparse/CMakeLists.txt27
-rw-r--r--lib/protobuf/CMakeLists.txt186
-rw-r--r--lib/zlib/CMakeLists.txt42
12 files changed, 1402 insertions, 291 deletions
diff --git a/lib/base/CMakeLists.txt b/lib/base/CMakeLists.txt
new file mode 100644
index 0000000..c71485f
--- /dev/null
+++ b/lib/base/CMakeLists.txt
@@ -0,0 +1,45 @@
+cmake_minimum_required(VERSION 3.22)
+
+project(base VERSION 1.0.0 DESCRIPTION "base")
+
+add_library(base STATIC
+ abi_compatibility.cpp
+ chrono_utils.cpp
+ file.cpp
+ liblog_symbols.cpp
+ logging.cpp
+ mapped_file.cpp
+ parsebool.cpp
+ parsenetaddress.cpp
+ process.cpp
+ properties.cpp
+ stringprintf.cpp
+ strings.cpp
+ threads.cpp
+ test_utils.cpp
+ errors_unix.cpp
+)
+
+target_include_directories(base PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/../include
+)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
+
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
+
+target_compile_options(base PRIVATE -std=c++17)
+
+#cd ../base
+#case "$OSTYPE" in
+# linux* | darwin*)
+# src="errors_unix.cpp"
+# ;;
+# *)
+# src="errors_windows.cpp utf8.cpp"
+# ;;
+#esac
+#$CC -std=c++17 -I../include ${CFLAGS} -c abi_compatibility.cpp chrono_utils.cpp file.cpp liblog_symbols.cpp logging.cpp mapped_file.cpp parsebool.cpp parsenetaddress.cpp process.cpp properties.cpp stringprintf.cpp strings.cpp threads.cpp test_utils.cpp ${src}
+#$AR rcs ../lib/libbase.a *.o
+#rm -r *.o
+#unset src \ No newline at end of file
diff --git a/lib/boringssl/CMakeLists.txt b/lib/boringssl/CMakeLists.txt
new file mode 100644
index 0000000..376f03b
--- /dev/null
+++ b/lib/boringssl/CMakeLists.txt
@@ -0,0 +1,649 @@
+cmake_minimum_required(VERSION 3.22)
+
+project(boringssl VERSION 1.0.0 DESCRIPTION "boringssl")
+
+list(APPEND ARCH_SOURCES "")
+
+if(NOT DEFINED ARCH OR ARCH STREQUAL x86_64)
+list(APPEND ARCH_SOURCES
+ "linux-x86_64/crypto/chacha/chacha-x86_64.S"
+ "linux-x86_64/crypto/cipher_extra/aes128gcmsiv-x86_64.S"
+ "linux-x86_64/crypto/cipher_extra/chacha20_poly1305_x86_64.S"
+ "linux-x86_64/crypto/fipsmodule/aes-x86_64.S"
+ "linux-x86_64/crypto/fipsmodule/aesni-gcm-x86_64.S"
+ "linux-x86_64/crypto/fipsmodule/aesni-x86_64.S"
+ "linux-x86_64/crypto/fipsmodule/ghash-ssse3-x86_64.S"
+ "linux-x86_64/crypto/fipsmodule/ghash-x86_64.S"
+ "linux-x86_64/crypto/fipsmodule/md5-x86_64.S"
+ "linux-x86_64/crypto/fipsmodule/p256-x86_64-asm.S"
+ "linux-x86_64/crypto/fipsmodule/p256_beeu-x86_64-asm.S"
+ "linux-x86_64/crypto/fipsmodule/rdrand-x86_64.S"
+ "linux-x86_64/crypto/fipsmodule/rsaz-avx2.S"
+ "linux-x86_64/crypto/fipsmodule/sha1-x86_64.S"
+ "linux-x86_64/crypto/fipsmodule/sha256-x86_64.S"
+ "linux-x86_64/crypto/fipsmodule/sha512-x86_64.S"
+ "linux-x86_64/crypto/fipsmodule/vpaes-x86_64.S"
+ "linux-x86_64/crypto/fipsmodule/x86_64-mont.S"
+ "linux-x86_64/crypto/fipsmodule/x86_64-mont5.S"
+ "linux-x86_64/crypto/test/trampoline-x86_64.S"
+ "src/crypto/hrss/asm/poly_rq_mul.S"
+)
+elseif(ARCH STREQUAL "arm7vl" OR ARCH STREQUAL arm7hf)
+list(APPEND ARCH_SOURCES
+ "linux-arm/crypto/chacha/chacha-armv4.S"
+ "linux-arm/crypto/fipsmodule/aes-armv4.S"
+ "linux-arm/crypto/fipsmodule/aesv8-armx32.S"
+ "linux-arm/crypto/fipsmodule/armv4-mont.S"
+ "linux-arm/crypto/fipsmodule/bsaes-armv7.S"
+ "linux-arm/crypto/fipsmodule/ghash-armv4.S"
+ "linux-arm/crypto/fipsmodule/ghashv8-armx32.S"
+ "linux-arm/crypto/fipsmodule/sha1-armv4-large.S"
+ "linux-arm/crypto/fipsmodule/sha256-armv4.S"
+ "linux-arm/crypto/fipsmodule/sha512-armv4.S"
+ "linux-arm/crypto/fipsmodule/vpaes-armv7.S"
+ "linux-arm/crypto/test/trampoline-armv4.S"
+ "src/crypto/curve25519/asm/x25519-asm-arm.S"
+ "src/crypto/poly1305/poly1305_arm_asm.S"
+ )
+elseif(ARCH STREQUAL "aarch64")
+list(APPEND ARCH_SOURCES
+ "linux-aarch64/crypto/chacha/chacha-armv8.S"
+ "linux-aarch64/crypto/fipsmodule/aesv8-armx64.S"
+ "linux-aarch64/crypto/fipsmodule/armv8-mont.S"
+ "linux-aarch64/crypto/fipsmodule/ghash-neon-armv8.S"
+ "linux-aarch64/crypto/fipsmodule/ghashv8-armx64.S"
+ "linux-aarch64/crypto/fipsmodule/sha1-armv8.S"
+ "linux-aarch64/crypto/fipsmodule/sha256-armv8.S"
+ "linux-aarch64/crypto/fipsmodule/sha512-armv8.S"
+ "linux-aarch64/crypto/fipsmodule/vpaes-armv8.S"
+ "linux-aarch64/crypto/test/trampoline-armv8.S"
+)
+elseif(ARCH STREQUAL "i686")
+list(APPEND ARCH_SOURCES
+ "linux-x86/crypto/chacha/chacha-x86.S"
+ "linux-x86/crypto/fipsmodule/aes-586.S"
+ "linux-x86/crypto/fipsmodule/aesni-x86.S"
+ "linux-x86/crypto/fipsmodule/bn-586.S"
+ "linux-x86/crypto/fipsmodule/co-586.S"
+ "linux-x86/crypto/fipsmodule/ghash-ssse3-x86.S"
+ "linux-x86/crypto/fipsmodule/ghash-x86.S"
+ "linux-x86/crypto/fipsmodule/md5-586.S"
+ "linux-x86/crypto/fipsmodule/sha1-586.S"
+ "linux-x86/crypto/fipsmodule/sha256-586.S"
+ "linux-x86/crypto/fipsmodule/sha512-586.S"
+ "linux-x86/crypto/fipsmodule/vpaes-x86.S"
+ "linux-x86/crypto/fipsmodule/x86-mont.S"
+ "linux-x86/crypto/test/trampoline-x86.S"
+)
+endif()
+
+add_library(boringssl STATIC
+ err_data.c
+ src/crypto/asn1/a_bitstr.c
+ src/crypto/asn1/a_bool.c
+ src/crypto/asn1/a_d2i_fp.c
+ src/crypto/asn1/a_dup.c
+ src/crypto/asn1/a_enum.c
+ src/crypto/asn1/a_gentm.c
+ src/crypto/asn1/a_i2d_fp.c
+ src/crypto/asn1/a_int.c
+ src/crypto/asn1/a_mbstr.c
+ src/crypto/asn1/a_object.c
+ src/crypto/asn1/a_octet.c
+ src/crypto/asn1/a_print.c
+ src/crypto/asn1/a_strnid.c
+ src/crypto/asn1/a_time.c
+ src/crypto/asn1/a_type.c
+ src/crypto/asn1/a_utctm.c
+ src/crypto/asn1/a_utf8.c
+ src/crypto/asn1/asn1_lib.c
+ src/crypto/asn1/asn1_par.c
+ src/crypto/asn1/asn_pack.c
+ src/crypto/asn1/f_enum.c
+ src/crypto/asn1/f_int.c
+ src/crypto/asn1/f_string.c
+ src/crypto/asn1/tasn_dec.c
+ src/crypto/asn1/tasn_enc.c
+ src/crypto/asn1/tasn_fre.c
+ src/crypto/asn1/tasn_new.c
+ src/crypto/asn1/tasn_typ.c
+ src/crypto/asn1/tasn_utl.c
+ src/crypto/asn1/time_support.c
+ src/crypto/base64/base64.c
+ src/crypto/bio/bio.c
+ src/crypto/bio/bio_mem.c
+ src/crypto/bio/connect.c
+ src/crypto/bio/fd.c
+ src/crypto/bio/file.c
+ src/crypto/bio/hexdump.c
+ src/crypto/bio/pair.c
+ src/crypto/bio/printf.c
+ src/crypto/bio/socket.c
+ src/crypto/bio/socket_helper.c
+ src/crypto/bn_extra/bn_asn1.c
+ src/crypto/bn_extra/convert.c
+ src/crypto/buf/buf.c
+ src/crypto/bytestring/asn1_compat.c
+ src/crypto/bytestring/ber.c
+ src/crypto/bytestring/cbb.c
+ src/crypto/bytestring/cbs.c
+ src/crypto/bytestring/unicode.c
+ src/crypto/chacha/chacha.c
+ src/crypto/cipher_extra/cipher_extra.c
+ src/crypto/cipher_extra/derive_key.c
+ src/crypto/cipher_extra/e_aesccm.c
+ src/crypto/cipher_extra/e_aesctrhmac.c
+ src/crypto/cipher_extra/e_aesgcmsiv.c
+ src/crypto/cipher_extra/e_chacha20poly1305.c
+ src/crypto/cipher_extra/e_null.c
+ src/crypto/cipher_extra/e_rc2.c
+ src/crypto/cipher_extra/e_rc4.c
+ src/crypto/cipher_extra/e_tls.c
+ src/crypto/cipher_extra/tls_cbc.c
+ src/crypto/cmac/cmac.c
+ src/crypto/conf/conf.c
+ src/crypto/cpu-aarch64-fuchsia.c
+ src/crypto/cpu-aarch64-linux.c
+ src/crypto/cpu-arm-linux.c
+ src/crypto/cpu-arm.c
+ src/crypto/cpu-intel.c
+ src/crypto/cpu-ppc64le.c
+ src/crypto/crypto.c
+ src/crypto/curve25519/spake25519.c
+ src/crypto/dh/check.c
+ src/crypto/dh/dh.c
+ src/crypto/dh/dh_asn1.c
+ src/crypto/dh/params.c
+ src/crypto/digest_extra/digest_extra.c
+ src/crypto/dsa/dsa.c
+ src/crypto/dsa/dsa_asn1.c
+ src/crypto/ec_extra/ec_asn1.c
+ src/crypto/ec_extra/ec_derive.c
+ src/crypto/ecdh_extra/ecdh_extra.c
+ src/crypto/ecdsa_extra/ecdsa_asn1.c
+ src/crypto/engine/engine.c
+ src/crypto/err/err.c
+ src/crypto/evp/digestsign.c
+ src/crypto/evp/evp.c
+ src/crypto/evp/evp_asn1.c
+ src/crypto/evp/evp_ctx.c
+ src/crypto/evp/p_dsa_asn1.c
+ src/crypto/evp/p_ec.c
+ src/crypto/evp/p_ec_asn1.c
+ src/crypto/evp/p_ed25519.c
+ src/crypto/evp/p_ed25519_asn1.c
+ src/crypto/evp/p_rsa.c
+ src/crypto/evp/p_rsa_asn1.c
+ src/crypto/evp/p_x25519.c
+ src/crypto/evp/p_x25519_asn1.c
+ src/crypto/evp/pbkdf.c
+ src/crypto/evp/print.c
+ src/crypto/evp/scrypt.c
+ src/crypto/evp/sign.c
+ src/crypto/ex_data.c
+ src/crypto/fipsmodule/bcm.c
+ src/crypto/fipsmodule/fips_shared_support.c
+ src/crypto/fipsmodule/is_fips.c
+ src/crypto/hkdf/hkdf.c
+ src/crypto/hrss/hrss.c
+ src/crypto/lhash/lhash.c
+ src/crypto/mem.c
+ src/crypto/obj/obj.c
+ src/crypto/obj/obj_xref.c
+ src/crypto/pem/pem_all.c
+ src/crypto/pem/pem_info.c
+ src/crypto/pem/pem_lib.c
+ src/crypto/pem/pem_oth.c
+ src/crypto/pem/pem_pk8.c
+ src/crypto/pem/pem_pkey.c
+ src/crypto/pem/pem_x509.c
+ src/crypto/pem/pem_xaux.c
+ src/crypto/pkcs7/pkcs7.c
+ src/crypto/pkcs7/pkcs7_x509.c
+ src/crypto/pkcs8/p5_pbev2.c
+ src/crypto/pkcs8/pkcs8.c
+ src/crypto/pkcs8/pkcs8_x509.c
+ src/crypto/poly1305/poly1305.c
+ src/crypto/poly1305/poly1305_arm.c
+ src/crypto/poly1305/poly1305_vec.c
+ src/crypto/pool/pool.c
+ src/crypto/rand_extra/deterministic.c
+ src/crypto/rand_extra/forkunsafe.c
+ src/crypto/rand_extra/fuchsia.c
+ src/crypto/rand_extra/rand_extra.c
+ src/crypto/rand_extra/windows.c
+ src/crypto/rc4/rc4.c
+ src/crypto/refcount_c11.c
+ src/crypto/refcount_lock.c
+ src/crypto/rsa_extra/rsa_asn1.c
+ src/crypto/rsa_extra/rsa_print.c
+ src/crypto/siphash/siphash.c
+ src/crypto/stack/stack.c
+ src/crypto/thread.c
+ src/crypto/thread_none.c
+ src/crypto/thread_pthread.c
+ src/crypto/thread_win.c
+ src/crypto/x509/a_digest.c
+ src/crypto/x509/a_sign.c
+ src/crypto/x509/a_strex.c
+ src/crypto/x509/a_verify.c
+ src/crypto/x509/algorithm.c
+ src/crypto/x509/asn1_gen.c
+ src/crypto/x509/by_dir.c
+ src/crypto/x509/by_file.c
+ src/crypto/x509/i2d_pr.c
+ src/crypto/x509/rsa_pss.c
+ src/crypto/x509/t_crl.c
+ src/crypto/x509/t_req.c
+ src/crypto/x509/t_x509.c
+ src/crypto/x509/t_x509a.c
+ src/crypto/x509/x509.c
+ src/crypto/x509/x509_att.c
+ src/crypto/x509/x509_cmp.c
+ src/crypto/x509/x509_d2.c
+ src/crypto/x509/x509_def.c
+ src/crypto/x509/x509_ext.c
+ src/crypto/x509/x509_lu.c
+ src/crypto/x509/x509_obj.c
+ src/crypto/x509/x509_r2x.c
+ src/crypto/x509/x509_req.c
+ src/crypto/x509/x509_set.c
+ src/crypto/x509/x509_trs.c
+ src/crypto/x509/x509_txt.c
+ src/crypto/x509/x509_v3.c
+ src/crypto/x509/x509_vfy.c
+ src/crypto/x509/x509_vpm.c
+ src/crypto/x509/x509cset.c
+ src/crypto/x509/x509name.c
+ src/crypto/x509/x509rset.c
+ src/crypto/x509/x509spki.c
+ src/crypto/x509/x_algor.c
+ src/crypto/x509/x_all.c
+ src/crypto/x509/x_attrib.c
+ src/crypto/x509/x_crl.c
+ src/crypto/x509/x_exten.c
+ src/crypto/x509/x_info.c
+ src/crypto/x509/x_name.c
+ src/crypto/x509/x_pkey.c
+ src/crypto/x509/x_pubkey.c
+ src/crypto/x509/x_req.c
+ src/crypto/x509/x_sig.c
+ src/crypto/x509/x_spki.c
+ src/crypto/x509/x_val.c
+ src/crypto/x509/x_x509.c
+ src/crypto/x509/x_x509a.c
+ src/crypto/x509v3/pcy_cache.c
+ src/crypto/x509v3/pcy_data.c
+ src/crypto/x509v3/pcy_lib.c
+ src/crypto/x509v3/pcy_map.c
+ src/crypto/x509v3/pcy_node.c
+ src/crypto/x509v3/pcy_tree.c
+ src/crypto/x509v3/v3_akey.c
+ src/crypto/x509v3/v3_akeya.c
+ src/crypto/x509v3/v3_alt.c
+ src/crypto/x509v3/v3_bcons.c
+ src/crypto/x509v3/v3_bitst.c
+ src/crypto/x509v3/v3_conf.c
+ src/crypto/x509v3/v3_cpols.c
+ src/crypto/x509v3/v3_crld.c
+ src/crypto/x509v3/v3_enum.c
+ src/crypto/x509v3/v3_extku.c
+ src/crypto/x509v3/v3_genn.c
+ src/crypto/x509v3/v3_ia5.c
+ src/crypto/x509v3/v3_info.c
+ src/crypto/x509v3/v3_int.c
+ src/crypto/x509v3/v3_lib.c
+ src/crypto/x509v3/v3_ncons.c
+ src/crypto/x509v3/v3_ocsp.c
+ src/crypto/x509v3/v3_pci.c
+ src/crypto/x509v3/v3_pcia.c
+ src/crypto/x509v3/v3_pcons.c
+ src/crypto/x509v3/v3_pku.c
+ src/crypto/x509v3/v3_pmaps.c
+ src/crypto/x509v3/v3_prn.c
+ src/crypto/x509v3/v3_purp.c
+ src/crypto/x509v3/v3_skey.c
+ src/crypto/x509v3/v3_sxnet.c
+ src/crypto/x509v3/v3_utl.c
+ src/third_party/fiat/curve25519.c
+ ${ARCH_SOURCES}
+)
+
+target_include_directories(boringssl PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
+
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
+
+target_compile_options(boringssl PRIVATE -std=c99 -fvisibility=hidden)
+
+target_compile_definitions(boringssl PRIVATE
+ -DOPENSSL_NO_ASM
+ -DBORINGSSL_IMPLEMENTATION
+ -DBORINGSSL_SHARED_LIBRARY
+ -DBORINGSSL_ANDROID_SYSTEM
+ -DOPENSSL_SMALL
+ -D_XOPEN_SOURCE=700
+)
+
+#case "$OSTYPE" in
+# linux*)
+# ;;
+# *)
+# CFLAGS_CRYPTO="-DOPENSSL_NO_ASM"
+# ;;
+#esac
+
+#case "$ARCH" in
+# arm7vl|arm7hf)
+# src="linux-arm/crypto/chacha/chacha-armv4.S
+# linux-arm/crypto/fipsmodule/aes-armv4.S
+# linux-arm/crypto/fipsmodule/aesv8-armx32.S
+# linux-arm/crypto/fipsmodule/armv4-mont.S
+# linux-arm/crypto/fipsmodule/bsaes-armv7.S
+# linux-arm/crypto/fipsmodule/ghash-armv4.S
+# linux-arm/crypto/fipsmodule/ghashv8-armx32.S
+# linux-arm/crypto/fipsmodule/sha1-armv4-large.S
+# linux-arm/crypto/fipsmodule/sha256-armv4.S
+# linux-arm/crypto/fipsmodule/sha512-armv4.S
+# linux-arm/crypto/fipsmodule/vpaes-armv7.S
+# linux-arm/crypto/test/trampoline-armv4.S
+# src/crypto/curve25519/asm/x25519-asm-arm.S
+# src/crypto/poly1305/poly1305_arm_asm.S"
+# ;;
+# aarch64)
+# src="linux-aarch64/crypto/chacha/chacha-armv8.S
+# linux-aarch64/crypto/fipsmodule/aesv8-armx64.S
+# linux-aarch64/crypto/fipsmodule/armv8-mont.S
+# linux-aarch64/crypto/fipsmodule/ghash-neon-armv8.S
+# linux-aarch64/crypto/fipsmodule/ghashv8-armx64.S
+# linux-aarch64/crypto/fipsmodule/sha1-armv8.S
+# linux-aarch64/crypto/fipsmodule/sha256-armv8.S
+# linux-aarch64/crypto/fipsmodule/sha512-armv8.S
+# linux-aarch64/crypto/fipsmodule/vpaes-armv8.S
+# linux-aarch64/crypto/test/trampoline-armv8.S"
+# ;;
+# i686)
+# src="linux-x86/crypto/chacha/chacha-x86.S
+# linux-x86/crypto/fipsmodule/aes-586.S
+# linux-x86/crypto/fipsmodule/aesni-x86.S
+# linux-x86/crypto/fipsmodule/bn-586.S
+# linux-x86/crypto/fipsmodule/co-586.S
+# linux-x86/crypto/fipsmodule/ghash-ssse3-x86.S
+# linux-x86/crypto/fipsmodule/ghash-x86.S
+# linux-x86/crypto/fipsmodule/md5-586.S
+# linux-x86/crypto/fipsmodule/sha1-586.S
+# linux-x86/crypto/fipsmodule/sha256-586.S
+# linux-x86/crypto/fipsmodule/sha512-586.S
+# linux-x86/crypto/fipsmodule/vpaes-x86.S
+# linux-x86/crypto/fipsmodule/x86-mont.S
+# linux-x86/crypto/test/trampoline-x86.S"
+# ;;
+# x86_64)
+# src="linux-x86_64/crypto/chacha/chacha-x86_64.S
+# linux-x86_64/crypto/cipher_extra/aes128gcmsiv-x86_64.S
+# linux-x86_64/crypto/cipher_extra/chacha20_poly1305_x86_64.S
+# linux-x86_64/crypto/fipsmodule/aes-x86_64.S
+# linux-x86_64/crypto/fipsmodule/aesni-gcm-x86_64.S
+# linux-x86_64/crypto/fipsmodule/aesni-x86_64.S
+# linux-x86_64/crypto/fipsmodule/ghash-ssse3-x86_64.S
+# linux-x86_64/crypto/fipsmodule/ghash-x86_64.S
+# linux-x86_64/crypto/fipsmodule/md5-x86_64.S
+# linux-x86_64/crypto/fipsmodule/p256-x86_64-asm.S
+# linux-x86_64/crypto/fipsmodule/p256_beeu-x86_64-asm.S
+# linux-x86_64/crypto/fipsmodule/rdrand-x86_64.S
+# linux-x86_64/crypto/fipsmodule/rsaz-avx2.S
+# linux-x86_64/crypto/fipsmodule/sha1-x86_64.S
+# linux-x86_64/crypto/fipsmodule/sha256-x86_64.S
+# linux-x86_64/crypto/fipsmodule/sha512-x86_64.S
+# linux-x86_64/crypto/fipsmodule/vpaes-x86_64.S
+# linux-x86_64/crypto/fipsmodule/x86_64-mont.S
+# linux-x86_64/crypto/fipsmodule/x86_64-mont5.S
+# linux-x86_64/crypto/test/trampoline-x86_64.S
+# src/crypto/hrss/asm/poly_rq_mul.S"
+# ;;
+#esac
+#
+# $CC -Iinclude -std=c99
+# ${CFLAGS}
+# ${CFLAGS_CRYPTO}
+# -DBORINGSSL_IMPLEMENTATION
+# -fvisibility=hidden
+# -DBORINGSSL_SHARED_LIBRARY
+# -DBORINGSSL_ANDROID_SYSTEM
+# -DOPENSSL_SMALL
+# -D_XOPEN_SOURCE=700
+# -c
+# err_data.c
+# src/crypto/asn1/a_bitstr.c
+# src/crypto/asn1/a_bool.c
+# src/crypto/asn1/a_d2i_fp.c
+# src/crypto/asn1/a_dup.c
+# src/crypto/asn1/a_enum.c
+# src/crypto/asn1/a_gentm.c
+# src/crypto/asn1/a_i2d_fp.c
+# src/crypto/asn1/a_int.c
+# src/crypto/asn1/a_mbstr.c
+# src/crypto/asn1/a_object.c
+# src/crypto/asn1/a_octet.c
+# src/crypto/asn1/a_print.c
+# src/crypto/asn1/a_strnid.c
+# src/crypto/asn1/a_time.c
+# src/crypto/asn1/a_type.c
+# src/crypto/asn1/a_utctm.c
+# src/crypto/asn1/a_utf8.c
+# src/crypto/asn1/asn1_lib.c
+# src/crypto/asn1/asn1_par.c
+# src/crypto/asn1/asn_pack.c
+# src/crypto/asn1/f_enum.c
+# src/crypto/asn1/f_int.c
+# src/crypto/asn1/f_string.c
+# src/crypto/asn1/tasn_dec.c
+# src/crypto/asn1/tasn_enc.c
+# src/crypto/asn1/tasn_fre.c
+# src/crypto/asn1/tasn_new.c
+# src/crypto/asn1/tasn_typ.c
+# src/crypto/asn1/tasn_utl.c
+# src/crypto/asn1/time_support.c
+# src/crypto/base64/base64.c
+# src/crypto/bio/bio.c
+# src/crypto/bio/bio_mem.c
+# src/crypto/bio/connect.c
+# src/crypto/bio/fd.c
+# src/crypto/bio/file.c
+# src/crypto/bio/hexdump.c
+# src/crypto/bio/pair.c
+# src/crypto/bio/printf.c
+# src/crypto/bio/socket.c
+# src/crypto/bio/socket_helper.c
+# src/crypto/bn_extra/bn_asn1.c
+# src/crypto/bn_extra/convert.c
+# src/crypto/buf/buf.c
+# src/crypto/bytestring/asn1_compat.c
+# src/crypto/bytestring/ber.c
+# src/crypto/bytestring/cbb.c
+# src/crypto/bytestring/cbs.c
+# src/crypto/bytestring/unicode.c
+# src/crypto/chacha/chacha.c
+# src/crypto/cipher_extra/cipher_extra.c
+# src/crypto/cipher_extra/derive_key.c
+# src/crypto/cipher_extra/e_aesccm.c
+# src/crypto/cipher_extra/e_aesctrhmac.c
+# src/crypto/cipher_extra/e_aesgcmsiv.c
+# src/crypto/cipher_extra/e_chacha20poly1305.c
+# src/crypto/cipher_extra/e_null.c
+# src/crypto/cipher_extra/e_rc2.c
+# src/crypto/cipher_extra/e_rc4.c
+# src/crypto/cipher_extra/e_tls.c
+# src/crypto/cipher_extra/tls_cbc.c
+# src/crypto/cmac/cmac.c
+# src/crypto/conf/conf.c
+# src/crypto/cpu-aarch64-fuchsia.c
+# src/crypto/cpu-aarch64-linux.c
+# src/crypto/cpu-arm-linux.c
+# src/crypto/cpu-arm.c
+# src/crypto/cpu-intel.c
+# src/crypto/cpu-ppc64le.c
+# src/crypto/crypto.c
+# src/crypto/curve25519/spake25519.c
+# src/crypto/dh/check.c
+# src/crypto/dh/dh.c
+# src/crypto/dh/dh_asn1.c
+# src/crypto/dh/params.c
+# src/crypto/digest_extra/digest_extra.c
+# src/crypto/dsa/dsa.c
+# src/crypto/dsa/dsa_asn1.c
+# src/crypto/ec_extra/ec_asn1.c
+# src/crypto/ec_extra/ec_derive.c
+# src/crypto/ecdh_extra/ecdh_extra.c
+# src/crypto/ecdsa_extra/ecdsa_asn1.c
+# src/crypto/engine/engine.c
+# src/crypto/err/err.c
+# src/crypto/evp/digestsign.c
+# src/crypto/evp/evp.c
+# src/crypto/evp/evp_asn1.c
+# src/crypto/evp/evp_ctx.c
+# src/crypto/evp/p_dsa_asn1.c
+# src/crypto/evp/p_ec.c
+# src/crypto/evp/p_ec_asn1.c
+# src/crypto/evp/p_ed25519.c
+# src/crypto/evp/p_ed25519_asn1.c
+# src/crypto/evp/p_rsa.c
+# src/crypto/evp/p_rsa_asn1.c
+# src/crypto/evp/p_x25519.c
+# src/crypto/evp/p_x25519_asn1.c
+# src/crypto/evp/pbkdf.c
+# src/crypto/evp/print.c
+# src/crypto/evp/scrypt.c
+# src/crypto/evp/sign.c
+# src/crypto/ex_data.c
+# src/crypto/fipsmodule/bcm.c
+# src/crypto/fipsmodule/fips_shared_support.c
+# src/crypto/fipsmodule/is_fips.c
+# src/crypto/hkdf/hkdf.c
+# src/crypto/hrss/hrss.c
+# src/crypto/lhash/lhash.c
+# src/crypto/mem.c
+# src/crypto/obj/obj.c
+# src/crypto/obj/obj_xref.c
+# src/crypto/pem/pem_all.c
+# src/crypto/pem/pem_info.c
+# src/crypto/pem/pem_lib.c
+# src/crypto/pem/pem_oth.c
+# src/crypto/pem/pem_pk8.c
+# src/crypto/pem/pem_pkey.c
+# src/crypto/pem/pem_x509.c
+# src/crypto/pem/pem_xaux.c
+# src/crypto/pkcs7/pkcs7.c
+# src/crypto/pkcs7/pkcs7_x509.c
+# src/crypto/pkcs8/p5_pbev2.c
+# src/crypto/pkcs8/pkcs8.c
+# src/crypto/pkcs8/pkcs8_x509.c
+# src/crypto/poly1305/poly1305.c
+# src/crypto/poly1305/poly1305_arm.c
+# src/crypto/poly1305/poly1305_vec.c
+# src/crypto/pool/pool.c
+# src/crypto/rand_extra/deterministic.c
+# src/crypto/rand_extra/forkunsafe.c
+# src/crypto/rand_extra/fuchsia.c
+# src/crypto/rand_extra/rand_extra.c
+# src/crypto/rand_extra/windows.c
+# src/crypto/rc4/rc4.c
+# src/crypto/refcount_c11.c
+# src/crypto/refcount_lock.c
+# src/crypto/rsa_extra/rsa_asn1.c
+# src/crypto/rsa_extra/rsa_print.c
+# src/crypto/siphash/siphash.c
+# src/crypto/stack/stack.c
+# src/crypto/thread.c
+# src/crypto/thread_none.c
+# src/crypto/thread_pthread.c
+# src/crypto/thread_win.c
+# src/crypto/x509/a_digest.c
+# src/crypto/x509/a_sign.c
+# src/crypto/x509/a_strex.c
+# src/crypto/x509/a_verify.c
+# src/crypto/x509/algorithm.c
+# src/crypto/x509/asn1_gen.c
+# src/crypto/x509/by_dir.c
+# src/crypto/x509/by_file.c
+# src/crypto/x509/i2d_pr.c
+# src/crypto/x509/rsa_pss.c
+# src/crypto/x509/t_crl.c
+# src/crypto/x509/t_req.c
+# src/crypto/x509/t_x509.c
+# src/crypto/x509/t_x509a.c
+# src/crypto/x509/x509.c
+# src/crypto/x509/x509_att.c
+# src/crypto/x509/x509_cmp.c
+# src/crypto/x509/x509_d2.c
+# src/crypto/x509/x509_def.c
+# src/crypto/x509/x509_ext.c
+# src/crypto/x509/x509_lu.c
+# src/crypto/x509/x509_obj.c
+# src/crypto/x509/x509_r2x.c
+# src/crypto/x509/x509_req.c
+# src/crypto/x509/x509_set.c
+# src/crypto/x509/x509_trs.c
+# src/crypto/x509/x509_txt.c
+# src/crypto/x509/x509_v3.c
+# src/crypto/x509/x509_vfy.c
+# src/crypto/x509/x509_vpm.c
+# src/crypto/x509/x509cset.c
+# src/crypto/x509/x509name.c
+# src/crypto/x509/x509rset.c
+# src/crypto/x509/x509spki.c
+# src/crypto/x509/x_algor.c
+# src/crypto/x509/x_all.c
+# src/crypto/x509/x_attrib.c
+# src/crypto/x509/x_crl.c
+# src/crypto/x509/x_exten.c
+# src/crypto/x509/x_info.c
+# src/crypto/x509/x_name.c
+# src/crypto/x509/x_pkey.c
+# src/crypto/x509/x_pubkey.c
+# src/crypto/x509/x_req.c
+# src/crypto/x509/x_sig.c
+# src/crypto/x509/x_spki.c
+# src/crypto/x509/x_val.c
+# src/crypto/x509/x_x509.c
+# src/crypto/x509/x_x509a.c
+# src/crypto/x509v3/pcy_cache.c
+# src/crypto/x509v3/pcy_data.c
+# src/crypto/x509v3/pcy_lib.c
+# src/crypto/x509v3/pcy_map.c
+# src/crypto/x509v3/pcy_node.c
+# src/crypto/x509v3/pcy_tree.c
+# src/crypto/x509v3/v3_akey.c
+# src/crypto/x509v3/v3_akeya.c
+# src/crypto/x509v3/v3_alt.c
+# src/crypto/x509v3/v3_bcons.c
+# src/crypto/x509v3/v3_bitst.c
+# src/crypto/x509v3/v3_conf.c
+# src/crypto/x509v3/v3_cpols.c
+# src/crypto/x509v3/v3_crld.c
+# src/crypto/x509v3/v3_enum.c
+# src/crypto/x509v3/v3_extku.c
+# src/crypto/x509v3/v3_genn.c
+# src/crypto/x509v3/v3_ia5.c
+# src/crypto/x509v3/v3_info.c
+# src/crypto/x509v3/v3_int.c
+# src/crypto/x509v3/v3_lib.c
+# src/crypto/x509v3/v3_ncons.c
+# src/crypto/x509v3/v3_ocsp.c
+# src/crypto/x509v3/v3_pci.c
+# src/crypto/x509v3/v3_pcia.c
+# src/crypto/x509v3/v3_pcons.c
+# src/crypto/x509v3/v3_pku.c
+# src/crypto/x509v3/v3_pmaps.c
+# src/crypto/x509v3/v3_prn.c
+# src/crypto/x509v3/v3_purp.c
+# src/crypto/x509v3/v3_skey.c
+# src/crypto/x509v3/v3_sxnet.c
+# src/crypto/x509v3/v3_utl.c
+# src/third_party/fiat/curve25519.c ${src}
+
+#$AR rcs ../lib/libcrypto.a *.o
+#rm -r *.o \ No newline at end of file
diff --git a/lib/ext4_utils/CMakeLists.txt b/lib/ext4_utils/CMakeLists.txt
new file mode 100644
index 0000000..410a805
--- /dev/null
+++ b/lib/ext4_utils/CMakeLists.txt
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 3.22)
+
+project(ext4_utils VERSION 1.0.0 DESCRIPTION "ext4_utils")
+
+add_library(ext4_utils STATIC
+ ext4_sb.cpp
+ ext4_utils.cpp
+ wipe.cpp
+)
+
+target_include_directories(ext4_utils PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/../include
+)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
+
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
+
+target_compile_options(ext4_utils PRIVATE -fno-strict-aliasing -std=c++17)
+
+#$CC -std=c++17 -I../include -fno-strict-aliasing ${CFLAGS} -c ext4_utils.cpp wipe.cpp ext4_sb.cpp
+#$AR rcs ../lib/libext4_utils.a *.o
+#rm -r *.o \ No newline at end of file
diff --git a/lib/fmtlib/CMakeLists.txt b/lib/fmtlib/CMakeLists.txt
index 0a17358..2d11546 100755..100644
--- a/lib/fmtlib/CMakeLists.txt
+++ b/lib/fmtlib/CMakeLists.txt
@@ -1,298 +1,22 @@
-cmake_minimum_required(VERSION 3.1.0)
+cmake_minimum_required(VERSION 3.22)
-# Use newer policies if available, up to most recent tested version of CMake.
-if(${CMAKE_VERSION} VERSION_LESS 3.11)
- cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
-else()
- cmake_policy(VERSION 3.11)
-endif()
+project(fmtlib VERSION 1.0.0 DESCRIPTION "fmtlib")
-# Determine if fmt is built as a subproject (using add_subdirectory)
-# or if it is the master project.
-set(MASTER_PROJECT OFF)
-if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
- set(MASTER_PROJECT ON)
- message(STATUS "CMake version: ${CMAKE_VERSION}")
-endif ()
+add_library(fmtlib STATIC
+ src/format.cc
+)
-# Joins arguments and places the results in ${result_var}.
-function(join result_var)
- set(result )
- foreach (arg ${ARGN})
- set(result "${result}${arg}")
- endforeach ()
- set(${result_var} "${result}" PARENT_SCOPE)
-endfunction()
+target_include_directories(fmtlib PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+)
-# Set the default CMAKE_BUILD_TYPE to Release.
-# This should be done before the project command since the latter can set
-# CMAKE_BUILD_TYPE itself (it does so for nmake).
-if (MASTER_PROJECT AND NOT CMAKE_BUILD_TYPE)
- join(doc "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or "
- "CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
- set(CMAKE_BUILD_TYPE Release CACHE STRING ${doc})
-endif ()
+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
-option(FMT_PEDANTIC "Enable extra warnings and expensive tests." OFF)
-option(FMT_WERROR "Halt the compilation with an error on compiler warnings."
- OFF)
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
-# Options that control generation of various targets.
-option(FMT_DOC "Generate the doc target." ${MASTER_PROJECT})
-option(FMT_INSTALL "Generate the install target." ${MASTER_PROJECT})
-option(FMT_TEST "Generate the test target." ${MASTER_PROJECT})
-option(FMT_FUZZ "Generate the fuzz target." OFF)
+target_compile_options(fmtlib PRIVATE -std=c++17)
-project(FMT CXX)
-
-# Get version from core.h
-file(READ include/fmt/core.h core_h)
-if (NOT core_h MATCHES "FMT_VERSION ([0-9]+)([0-9][0-9])([0-9][0-9])")
- message(FATAL_ERROR "Cannot get FMT_VERSION from core.h.")
-endif ()
-# Use math to skip leading zeros if any.
-math(EXPR CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1})
-math(EXPR CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MATCH_2})
-math(EXPR CPACK_PACKAGE_VERSION_PATCH ${CMAKE_MATCH_3})
-join(FMT_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.
- ${CPACK_PACKAGE_VERSION_PATCH})
-message(STATUS "Version: ${FMT_VERSION}")
-
-message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
-
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
- "${CMAKE_CURRENT_SOURCE_DIR}/support/cmake")
-
-include(cxx14)
-include(CheckCXXCompilerFlag)
-
-set(FMT_REQUIRED_FEATURES cxx_auto_type cxx_variadic_templates)
-
-if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
- set(PEDANTIC_COMPILE_FLAGS -pedantic-errors -Wall -Wextra -pedantic
- -Wold-style-cast -Wundef
- -Wredundant-decls -Wwrite-strings -Wpointer-arith
- -Wcast-qual -Wformat=2 -Wmissing-include-dirs
- -Wcast-align -Wnon-virtual-dtor
- -Wctor-dtor-privacy -Wdisabled-optimization
- -Winvalid-pch -Woverloaded-virtual
- -Wconversion -Wswitch-enum
- -Wno-ctor-dtor-privacy -Wno-format-nonliteral -Wno-shadow)
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
- set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wnoexcept
- -Wno-dangling-else -Wno-unused-local-typedefs)
- endif ()
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
- set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wdouble-promotion
- -Wtrampolines -Wzero-as-null-pointer-constant -Wuseless-cast
- -Wvector-operation-performance -Wsized-deallocation)
- endif ()
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
- set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wshift-overflow=2
- -Wnull-dereference -Wduplicated-cond)
- endif ()
- set(WERROR_FLAG -Werror)
-endif ()
-
-if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- set(PEDANTIC_COMPILE_FLAGS -Wall -Wextra -pedantic -Wconversion
- -Wno-sign-conversion -Wdeprecated -Wweak-vtables)
- check_cxx_compiler_flag(-Wzero-as-null-pointer-constant HAS_NULLPTR_WARNING)
- if (HAS_NULLPTR_WARNING)
- set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS}
- -Wzero-as-null-pointer-constant)
- endif ()
- set(WERROR_FLAG -Werror)
-endif ()
-
-if (MSVC)
- set(PEDANTIC_COMPILE_FLAGS /W3)
- set(WERROR_FLAG /WX)
-endif ()
-
-if (MASTER_PROJECT AND CMAKE_GENERATOR MATCHES "Visual Studio")
- # If Microsoft SDK is installed create script run-msbuild.bat that
- # calls SetEnv.cmd to set up build environment and runs msbuild.
- # It is useful when building Visual Studio projects with the SDK
- # toolchain rather than Visual Studio.
- include(FindSetEnv)
- if (WINSDK_SETENV)
- set(MSBUILD_SETUP "call \"${WINSDK_SETENV}\"")
- endif ()
- # Set FrameworkPathOverride to get rid of MSB3644 warnings.
- set(netfxpath "C:\\Program Files\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.0")
- file(WRITE run-msbuild.bat "
- ${MSBUILD_SETUP}
- ${CMAKE_MAKE_PROGRAM} -p:FrameworkPathOverride=\"${netfxpath}\" %*")
-endif ()
-
-set(strtod_l_headers stdlib.h)
-if (APPLE)
- set(strtod_l_headers ${strtod_l_headers} xlocale.h)
-endif ()
-
-include(CheckSymbolExists)
-if (WIN32)
- check_symbol_exists(_strtod_l "${strtod_l_headers}" HAVE_STRTOD_L)
-else ()
- check_symbol_exists(strtod_l "${strtod_l_headers}" HAVE_STRTOD_L)
-endif ()
-
-function(add_headers VAR)
- set(headers ${${VAR}})
- foreach (header ${ARGN})
- set(headers ${headers} include/fmt/${header})
- endforeach()
- set(${VAR} ${headers} PARENT_SCOPE)
-endfunction()
-
-# Define the fmt library, its includes and the needed defines.
-add_headers(FMT_HEADERS chrono.h color.h compile.h core.h format.h format-inl.h
- locale.h ostream.h posix.h printf.h ranges.h)
-set(FMT_SOURCES src/format.cc src/posix.cc)
-
-add_library(fmt ${FMT_SOURCES} ${FMT_HEADERS} README.rst ChangeLog.rst)
-add_library(fmt::fmt ALIAS fmt)
-
-if (HAVE_STRTOD_L)
- target_compile_definitions(fmt PUBLIC FMT_LOCALE)
-endif ()
-
-if (FMT_WERROR)
- target_compile_options(fmt PRIVATE ${WERROR_FLAG})
-endif ()
-if (FMT_PEDANTIC)
- target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS})
-endif ()
-
-target_compile_features(fmt INTERFACE ${FMT_REQUIRED_FEATURES})
-
-target_include_directories(fmt PUBLIC
- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
- $<INSTALL_INTERFACE:include>)
-
-set_target_properties(fmt PROPERTIES
- VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}
- DEBUG_POSTFIX d)
-
-if (BUILD_SHARED_LIBS)
- if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
- # Fix rpmlint warning:
- # unused-direct-shlib-dependency /usr/lib/libformat.so.1.1.0 /lib/libm.so.6.
- target_link_libraries(fmt -Wl,--as-needed)
- endif ()
- target_compile_definitions(fmt PRIVATE FMT_EXPORT INTERFACE FMT_SHARED)
-endif ()
-if (FMT_SAFE_DURATION_CAST)
- target_compile_definitions(fmt PUBLIC FMT_SAFE_DURATION_CAST)
-endif()
-
-add_library(fmt-header-only INTERFACE)
-add_library(fmt::fmt-header-only ALIAS fmt-header-only)
-
-target_compile_definitions(fmt-header-only INTERFACE FMT_HEADER_ONLY=1)
-
-target_compile_features(fmt-header-only INTERFACE ${FMT_REQUIRED_FEATURES})
-
-target_include_directories(fmt-header-only INTERFACE
- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
- $<INSTALL_INTERFACE:include>)
-
-# Install targets.
-if (FMT_INSTALL)
- include(GNUInstallDirs)
- include(CMakePackageConfigHelpers)
- set(FMT_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/fmt CACHE STRING
- "Installation directory for cmake files, relative to ${CMAKE_INSTALL_PREFIX}.")
- set(version_config ${PROJECT_BINARY_DIR}/fmt-config-version.cmake)
- set(project_config ${PROJECT_BINARY_DIR}/fmt-config.cmake)
- set(pkgconfig ${PROJECT_BINARY_DIR}/fmt.pc)
- set(targets_export_name fmt-targets)
-
- set (INSTALL_TARGETS fmt)
- if (TARGET fmt-header-only)
- set(INSTALL_TARGETS ${INSTALL_TARGETS} fmt-header-only)
- endif ()
-
- set(FMT_LIB_DIR ${CMAKE_INSTALL_LIBDIR} CACHE STRING
- "Installation directory for libraries, relative to ${CMAKE_INSTALL_PREFIX}.")
-
- set(FMT_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR}/fmt CACHE STRING
- "Installation directory for include files, relative to ${CMAKE_INSTALL_PREFIX}.")
-
- set(FMT_PKGCONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig CACHE PATH
- "Installation directory for pkgconfig (.pc) files, relative to ${CMAKE_INSTALL_PREFIX}.")
-
- # Generate the version, config and target files into the build directory.
- write_basic_package_version_file(
- ${version_config}
- VERSION ${FMT_VERSION}
- COMPATIBILITY AnyNewerVersion)
- configure_file(
- "${PROJECT_SOURCE_DIR}/support/cmake/fmt.pc.in"
- "${pkgconfig}"
- @ONLY)
- configure_package_config_file(
- ${PROJECT_SOURCE_DIR}/support/cmake/fmt-config.cmake.in
- ${project_config}
- INSTALL_DESTINATION ${FMT_CMAKE_DIR})
- # Use a namespace because CMake provides better diagnostics for namespaced
- # imported targets.
- export(TARGETS ${INSTALL_TARGETS} NAMESPACE fmt::
- FILE ${PROJECT_BINARY_DIR}/${targets_export_name}.cmake)
-
- # Install version, config and target files.
- install(
- FILES ${project_config} ${version_config}
- DESTINATION ${FMT_CMAKE_DIR})
- install(EXPORT ${targets_export_name} DESTINATION ${FMT_CMAKE_DIR}
- NAMESPACE fmt::)
-
- # Install the library and headers.
- install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name}
- LIBRARY DESTINATION ${FMT_LIB_DIR}
- ARCHIVE DESTINATION ${FMT_LIB_DIR}
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-
- install(FILES $<TARGET_PDB_FILE:${INSTALL_TARGETS}>
- DESTINATION ${FMT_LIB_DIR} OPTIONAL)
- install(FILES ${FMT_HEADERS} DESTINATION ${FMT_INC_DIR})
- install(FILES "${pkgconfig}" DESTINATION "${FMT_PKGCONFIG_DIR}")
-endif ()
-
-if (FMT_DOC)
- add_subdirectory(doc)
-endif ()
-
-if (FMT_TEST)
- enable_testing()
- add_subdirectory(test)
-endif ()
-
-# Control fuzzing independent of the unit tests.
-if (FMT_FUZZ)
- add_subdirectory(test/fuzzing)
-endif ()
-
-set(gitignore ${PROJECT_SOURCE_DIR}/.gitignore)
-if (MASTER_PROJECT AND EXISTS ${gitignore})
- # Get the list of ignored files from .gitignore.
- file (STRINGS ${gitignore} lines)
- LIST(REMOVE_ITEM lines /doc/html)
- foreach (line ${lines})
- string(REPLACE "." "[.]" line "${line}")
- string(REPLACE "*" ".*" line "${line}")
- set(ignored_files ${ignored_files} "${line}$" "${line}/")
- endforeach ()
- set(ignored_files ${ignored_files}
- /.git /breathe /format-benchmark sphinx/ .buildinfo .doctrees)
-
- set(CPACK_SOURCE_GENERATOR ZIP)
- set(CPACK_SOURCE_IGNORE_FILES ${ignored_files})
- set(CPACK_SOURCE_PACKAGE_FILE_NAME fmt-${FMT_VERSION})
- set(CPACK_PACKAGE_NAME fmt)
- set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.rst)
- include(CPack)
-endif ()
+#cd ../fmtlib
+#$CC -std=c++17 -Iinclude ${CFLAGS} -c src/format.cc
+#$AR rcs ../lib/fmtlib.a *.o
+#rm -r *.o
diff --git a/lib/fmtlib/CMakeLists.txt.orig b/lib/fmtlib/CMakeLists.txt.orig
new file mode 100755
index 0000000..0a17358
--- /dev/null
+++ b/lib/fmtlib/CMakeLists.txt.orig
@@ -0,0 +1,298 @@
+cmake_minimum_required(VERSION 3.1.0)
+
+# Use newer policies if available, up to most recent tested version of CMake.
+if(${CMAKE_VERSION} VERSION_LESS 3.11)
+ cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
+else()
+ cmake_policy(VERSION 3.11)
+endif()
+
+# Determine if fmt is built as a subproject (using add_subdirectory)
+# or if it is the master project.
+set(MASTER_PROJECT OFF)
+if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
+ set(MASTER_PROJECT ON)
+ message(STATUS "CMake version: ${CMAKE_VERSION}")
+endif ()
+
+# Joins arguments and places the results in ${result_var}.
+function(join result_var)
+ set(result )
+ foreach (arg ${ARGN})
+ set(result "${result}${arg}")
+ endforeach ()
+ set(${result_var} "${result}" PARENT_SCOPE)
+endfunction()
+
+# Set the default CMAKE_BUILD_TYPE to Release.
+# This should be done before the project command since the latter can set
+# CMAKE_BUILD_TYPE itself (it does so for nmake).
+if (MASTER_PROJECT AND NOT CMAKE_BUILD_TYPE)
+ join(doc "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or "
+ "CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
+ set(CMAKE_BUILD_TYPE Release CACHE STRING ${doc})
+endif ()
+
+option(FMT_PEDANTIC "Enable extra warnings and expensive tests." OFF)
+option(FMT_WERROR "Halt the compilation with an error on compiler warnings."
+ OFF)
+
+# Options that control generation of various targets.
+option(FMT_DOC "Generate the doc target." ${MASTER_PROJECT})
+option(FMT_INSTALL "Generate the install target." ${MASTER_PROJECT})
+option(FMT_TEST "Generate the test target." ${MASTER_PROJECT})
+option(FMT_FUZZ "Generate the fuzz target." OFF)
+
+project(FMT CXX)
+
+# Get version from core.h
+file(READ include/fmt/core.h core_h)
+if (NOT core_h MATCHES "FMT_VERSION ([0-9]+)([0-9][0-9])([0-9][0-9])")
+ message(FATAL_ERROR "Cannot get FMT_VERSION from core.h.")
+endif ()
+# Use math to skip leading zeros if any.
+math(EXPR CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1})
+math(EXPR CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MATCH_2})
+math(EXPR CPACK_PACKAGE_VERSION_PATCH ${CMAKE_MATCH_3})
+join(FMT_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.
+ ${CPACK_PACKAGE_VERSION_PATCH})
+message(STATUS "Version: ${FMT_VERSION}")
+
+message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
+
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
+ "${CMAKE_CURRENT_SOURCE_DIR}/support/cmake")
+
+include(cxx14)
+include(CheckCXXCompilerFlag)
+
+set(FMT_REQUIRED_FEATURES cxx_auto_type cxx_variadic_templates)
+
+if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ set(PEDANTIC_COMPILE_FLAGS -pedantic-errors -Wall -Wextra -pedantic
+ -Wold-style-cast -Wundef
+ -Wredundant-decls -Wwrite-strings -Wpointer-arith
+ -Wcast-qual -Wformat=2 -Wmissing-include-dirs
+ -Wcast-align -Wnon-virtual-dtor
+ -Wctor-dtor-privacy -Wdisabled-optimization
+ -Winvalid-pch -Woverloaded-virtual
+ -Wconversion -Wswitch-enum
+ -Wno-ctor-dtor-privacy -Wno-format-nonliteral -Wno-shadow)
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
+ set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wnoexcept
+ -Wno-dangling-else -Wno-unused-local-typedefs)
+ endif ()
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
+ set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wdouble-promotion
+ -Wtrampolines -Wzero-as-null-pointer-constant -Wuseless-cast
+ -Wvector-operation-performance -Wsized-deallocation)
+ endif ()
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
+ set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wshift-overflow=2
+ -Wnull-dereference -Wduplicated-cond)
+ endif ()
+ set(WERROR_FLAG -Werror)
+endif ()
+
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ set(PEDANTIC_COMPILE_FLAGS -Wall -Wextra -pedantic -Wconversion
+ -Wno-sign-conversion -Wdeprecated -Wweak-vtables)
+ check_cxx_compiler_flag(-Wzero-as-null-pointer-constant HAS_NULLPTR_WARNING)
+ if (HAS_NULLPTR_WARNING)
+ set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS}
+ -Wzero-as-null-pointer-constant)
+ endif ()
+ set(WERROR_FLAG -Werror)
+endif ()
+
+if (MSVC)
+ set(PEDANTIC_COMPILE_FLAGS /W3)
+ set(WERROR_FLAG /WX)
+endif ()
+
+if (MASTER_PROJECT AND CMAKE_GENERATOR MATCHES "Visual Studio")
+ # If Microsoft SDK is installed create script run-msbuild.bat that
+ # calls SetEnv.cmd to set up build environment and runs msbuild.
+ # It is useful when building Visual Studio projects with the SDK
+ # toolchain rather than Visual Studio.
+ include(FindSetEnv)
+ if (WINSDK_SETENV)
+ set(MSBUILD_SETUP "call \"${WINSDK_SETENV}\"")
+ endif ()
+ # Set FrameworkPathOverride to get rid of MSB3644 warnings.
+ set(netfxpath "C:\\Program Files\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.0")
+ file(WRITE run-msbuild.bat "
+ ${MSBUILD_SETUP}
+ ${CMAKE_MAKE_PROGRAM} -p:FrameworkPathOverride=\"${netfxpath}\" %*")
+endif ()
+
+set(strtod_l_headers stdlib.h)
+if (APPLE)
+ set(strtod_l_headers ${strtod_l_headers} xlocale.h)
+endif ()
+
+include(CheckSymbolExists)
+if (WIN32)
+ check_symbol_exists(_strtod_l "${strtod_l_headers}" HAVE_STRTOD_L)
+else ()
+ check_symbol_exists(strtod_l "${strtod_l_headers}" HAVE_STRTOD_L)
+endif ()
+
+function(add_headers VAR)
+ set(headers ${${VAR}})
+ foreach (header ${ARGN})
+ set(headers ${headers} include/fmt/${header})
+ endforeach()
+ set(${VAR} ${headers} PARENT_SCOPE)
+endfunction()
+
+# Define the fmt library, its includes and the needed defines.
+add_headers(FMT_HEADERS chrono.h color.h compile.h core.h format.h format-inl.h
+ locale.h ostream.h posix.h printf.h ranges.h)
+set(FMT_SOURCES src/format.cc src/posix.cc)
+
+add_library(fmt ${FMT_SOURCES} ${FMT_HEADERS} README.rst ChangeLog.rst)
+add_library(fmt::fmt ALIAS fmt)
+
+if (HAVE_STRTOD_L)
+ target_compile_definitions(fmt PUBLIC FMT_LOCALE)
+endif ()
+
+if (FMT_WERROR)
+ target_compile_options(fmt PRIVATE ${WERROR_FLAG})
+endif ()
+if (FMT_PEDANTIC)
+ target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS})
+endif ()
+
+target_compile_features(fmt INTERFACE ${FMT_REQUIRED_FEATURES})
+
+target_include_directories(fmt PUBLIC
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
+ $<INSTALL_INTERFACE:include>)
+
+set_target_properties(fmt PROPERTIES
+ VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}
+ DEBUG_POSTFIX d)
+
+if (BUILD_SHARED_LIBS)
+ if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ # Fix rpmlint warning:
+ # unused-direct-shlib-dependency /usr/lib/libformat.so.1.1.0 /lib/libm.so.6.
+ target_link_libraries(fmt -Wl,--as-needed)
+ endif ()
+ target_compile_definitions(fmt PRIVATE FMT_EXPORT INTERFACE FMT_SHARED)
+endif ()
+if (FMT_SAFE_DURATION_CAST)
+ target_compile_definitions(fmt PUBLIC FMT_SAFE_DURATION_CAST)
+endif()
+
+add_library(fmt-header-only INTERFACE)
+add_library(fmt::fmt-header-only ALIAS fmt-header-only)
+
+target_compile_definitions(fmt-header-only INTERFACE FMT_HEADER_ONLY=1)
+
+target_compile_features(fmt-header-only INTERFACE ${FMT_REQUIRED_FEATURES})
+
+target_include_directories(fmt-header-only INTERFACE
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
+ $<INSTALL_INTERFACE:include>)
+
+# Install targets.
+if (FMT_INSTALL)
+ include(GNUInstallDirs)
+ include(CMakePackageConfigHelpers)
+ set(FMT_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/fmt CACHE STRING
+ "Installation directory for cmake files, relative to ${CMAKE_INSTALL_PREFIX}.")
+ set(version_config ${PROJECT_BINARY_DIR}/fmt-config-version.cmake)
+ set(project_config ${PROJECT_BINARY_DIR}/fmt-config.cmake)
+ set(pkgconfig ${PROJECT_BINARY_DIR}/fmt.pc)
+ set(targets_export_name fmt-targets)
+
+ set (INSTALL_TARGETS fmt)
+ if (TARGET fmt-header-only)
+ set(INSTALL_TARGETS ${INSTALL_TARGETS} fmt-header-only)
+ endif ()
+
+ set(FMT_LIB_DIR ${CMAKE_INSTALL_LIBDIR} CACHE STRING
+ "Installation directory for libraries, relative to ${CMAKE_INSTALL_PREFIX}.")
+
+ set(FMT_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR}/fmt CACHE STRING
+ "Installation directory for include files, relative to ${CMAKE_INSTALL_PREFIX}.")
+
+ set(FMT_PKGCONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig CACHE PATH
+ "Installation directory for pkgconfig (.pc) files, relative to ${CMAKE_INSTALL_PREFIX}.")
+
+ # Generate the version, config and target files into the build directory.
+ write_basic_package_version_file(
+ ${version_config}
+ VERSION ${FMT_VERSION}
+ COMPATIBILITY AnyNewerVersion)
+ configure_file(
+ "${PROJECT_SOURCE_DIR}/support/cmake/fmt.pc.in"
+ "${pkgconfig}"
+ @ONLY)
+ configure_package_config_file(
+ ${PROJECT_SOURCE_DIR}/support/cmake/fmt-config.cmake.in
+ ${project_config}
+ INSTALL_DESTINATION ${FMT_CMAKE_DIR})
+ # Use a namespace because CMake provides better diagnostics for namespaced
+ # imported targets.
+ export(TARGETS ${INSTALL_TARGETS} NAMESPACE fmt::
+ FILE ${PROJECT_BINARY_DIR}/${targets_export_name}.cmake)
+
+ # Install version, config and target files.
+ install(
+ FILES ${project_config} ${version_config}
+ DESTINATION ${FMT_CMAKE_DIR})
+ install(EXPORT ${targets_export_name} DESTINATION ${FMT_CMAKE_DIR}
+ NAMESPACE fmt::)
+
+ # Install the library and headers.
+ install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name}
+ LIBRARY DESTINATION ${FMT_LIB_DIR}
+ ARCHIVE DESTINATION ${FMT_LIB_DIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ install(FILES $<TARGET_PDB_FILE:${INSTALL_TARGETS}>
+ DESTINATION ${FMT_LIB_DIR} OPTIONAL)
+ install(FILES ${FMT_HEADERS} DESTINATION ${FMT_INC_DIR})
+ install(FILES "${pkgconfig}" DESTINATION "${FMT_PKGCONFIG_DIR}")
+endif ()
+
+if (FMT_DOC)
+ add_subdirectory(doc)
+endif ()
+
+if (FMT_TEST)
+ enable_testing()
+ add_subdirectory(test)
+endif ()
+
+# Control fuzzing independent of the unit tests.
+if (FMT_FUZZ)
+ add_subdirectory(test/fuzzing)
+endif ()
+
+set(gitignore ${PROJECT_SOURCE_DIR}/.gitignore)
+if (MASTER_PROJECT AND EXISTS ${gitignore})
+ # Get the list of ignored files from .gitignore.
+ file (STRINGS ${gitignore} lines)
+ LIST(REMOVE_ITEM lines /doc/html)
+ foreach (line ${lines})
+ string(REPLACE "." "[.]" line "${line}")
+ string(REPLACE "*" ".*" line "${line}")
+ set(ignored_files ${ignored_files} "${line}$" "${line}/")
+ endforeach ()
+ set(ignored_files ${ignored_files}
+ /.git /breathe /format-benchmark sphinx/ .buildinfo .doctrees)
+
+ set(CPACK_SOURCE_GENERATOR ZIP)
+ set(CPACK_SOURCE_IGNORE_FILES ${ignored_files})
+ set(CPACK_SOURCE_PACKAGE_FILE_NAME fmt-${FMT_VERSION})
+ set(CPACK_PACKAGE_NAME fmt)
+ set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.rst)
+ include(CPack)
+endif ()
diff --git a/lib/libcrypto_utils/CMakeLists.txt b/lib/libcrypto_utils/CMakeLists.txt
new file mode 100644
index 0000000..794c624
--- /dev/null
+++ b/lib/libcrypto_utils/CMakeLists.txt
@@ -0,0 +1,21 @@
+cmake_minimum_required(VERSION 3.22)
+
+project(libcrypto_utils VERSION 1.0.0 DESCRIPTION "libcrypto_utils")
+
+add_library(libcrypto_utils STATIC
+ android_pubkey.c
+)
+
+target_include_directories(libcrypto_utils PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/../boringssl/include
+)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
+
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
+
+#cd ../libcrypto_utils
+#$CC -Iinclude -I../boringssl/include ${CFLAGS} -c android_pubkey.c
+#$AR rcs ../lib/libcrypto_utils.a *.o
+#rm -r *.o \ No newline at end of file
diff --git a/lib/libjsonpb/CMakeLists.txt b/lib/libjsonpb/CMakeLists.txt
new file mode 100644
index 0000000..aac22e2
--- /dev/null
+++ b/lib/libjsonpb/CMakeLists.txt
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 3.22)
+
+project(libjsonpb VERSION 1.0.0 DESCRIPTION "ext4_utils")
+
+add_library(libjsonpb STATIC
+ parse/jsonpb.cpp
+)
+
+target_include_directories(libjsonpb PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/../include
+ ${CMAKE_CURRENT_SOURCE_DIR}/parse/include
+)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
+
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
+
+target_compile_options(libjsonpb PRIVATE -std=c++17)
+
+#cd ../libjsonpb
+#$CC -std=c++17 -I../include -Iparse/include ${CFLAGS} -c parse/jsonpb.cpp
+#$AR rcs ../lib/libjsonpbparse.a *.o
+#rm -r *.o \ No newline at end of file
diff --git a/lib/liblog/CMakeLists.txt b/lib/liblog/CMakeLists.txt
new file mode 100644
index 0000000..7112c15
--- /dev/null
+++ b/lib/liblog/CMakeLists.txt
@@ -0,0 +1,43 @@
+cmake_minimum_required(VERSION 3.22)
+
+project(liblog VERSION 1.0.0 DESCRIPTION "liblog")
+
+add_library(liblog STATIC
+ log_event_list.cpp
+ log_event_write.cpp
+ logger_name.cpp
+ logger_read.cpp
+ logger_write.cpp
+ logprint.cpp
+ properties.cpp
+ event_tag_map.cpp
+)
+
+target_include_directories(liblog PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/../include
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/../base/include
+)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
+
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
+
+target_compile_definitions(liblog PRIVATE
+ -DLIBLOG_LOG_TAG=1006
+ -DSNET_EVENT_LOG_TAG=1397638484
+)
+
+target_compile_options(liblog PRIVATE -std=c++17)
+
+#case "$OSTYPE" in
+# linux* | darwin*)
+# src="event_tag_map.cpp"
+# ;;
+# *)
+# ;;
+#esac
+#$CC -std=c++17 -I../include -Iinclude -I../base/include -DLIBLOG_LOG_TAG=1006 -DSNET_EVENT_LOG_TAG=1397638484 ${CFLAGS} -c log_event_list.cpp log_event_write.cpp logger_name.cpp logger_read.cpp logger_write.cpp logprint.cpp properties.cpp ${src}
+#$AR rcs ../lib/liblog.a *.o
+#rm -r *.o
+#unset src \ No newline at end of file
diff --git a/lib/liblp/CMakeLists.txt b/lib/liblp/CMakeLists.txt
new file mode 100644
index 0000000..088a563
--- /dev/null
+++ b/lib/liblp/CMakeLists.txt
@@ -0,0 +1,30 @@
+cmake_minimum_required(VERSION 3.22)
+
+project(liblp VERSION 1.0.0 DESCRIPTION "liblp")
+
+add_library(liblp STATIC
+ builder.cpp
+ images.cpp
+ partition_opener.cpp
+ property_fetcher.cpp
+ reader.cpp
+ utility.cpp
+ writer.cpp
+)
+
+target_include_directories(liblp PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/../include
+)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
+
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
+
+target_compile_definitions(liblp PRIVATE -D_FILE_OFFSET_BITS=64)
+
+target_compile_options(liblp PRIVATE -std=c++17)
+
+#cd ../liblp
+#$CC -std=c++17 -I../include -D_FILE_OFFSET_BITS=64 ${CFLAGS} -c builder.cpp images.cpp partition_opener.cpp property_fetcher.cpp reader.cpp utility.cpp writer.cpp
+#$AR rcs ../lib/liblp.a *.o
+#rm -r *.o
diff --git a/lib/libsparse/CMakeLists.txt b/lib/libsparse/CMakeLists.txt
new file mode 100644
index 0000000..5d717ca
--- /dev/null
+++ b/lib/libsparse/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.22)
+
+project(libsparse VERSION 1.0.0 DESCRIPTION "libsparse")
+
+add_library(libsparse STATIC
+ backed_block.cpp
+ output_file.cpp
+ sparse.cpp
+ sparse_crc32.cpp
+ sparse_err.cpp
+ sparse_read.cpp
+)
+
+target_include_directories(libsparse PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/../include
+)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
+
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
+
+target_compile_options(libsparse PRIVATE -std=c++17)
+
+#cd ../libsparse
+#$CC -std=c++17 -I../include ${CFLAGS} -c backed_block.cpp output_file.cpp sparse.cpp sparse_crc32.cpp sparse_err.cpp sparse_read.cpp
+#$AR rcs ../lib/libsparse.a *.o
+#rm -r *.o \ No newline at end of file
diff --git a/lib/protobuf/CMakeLists.txt b/lib/protobuf/CMakeLists.txt
new file mode 100644
index 0000000..5dd4f12
--- /dev/null
+++ b/lib/protobuf/CMakeLists.txt
@@ -0,0 +1,186 @@
+cmake_minimum_required(VERSION 3.22)
+
+project(protobuf VERSION 1.0.0 DESCRIPTION "protobuf")
+
+add_library(protobuf STATIC
+ src/google/protobuf/any_lite.cc
+ src/google/protobuf/arena.cc
+ src/google/protobuf/extension_set.cc
+ src/google/protobuf/generated_enum_util.cc
+ src/google/protobuf/generated_message_table_driven_lite.cc
+ src/google/protobuf/generated_message_util.cc
+ src/google/protobuf/implicit_weak_message.cc
+ src/google/protobuf/io/coded_stream.cc
+ src/google/protobuf/io/io_win32.cc
+ src/google/protobuf/io/strtod.cc
+ src/google/protobuf/io/zero_copy_stream.cc
+ src/google/protobuf/io/zero_copy_stream_impl.cc
+ src/google/protobuf/io/zero_copy_stream_impl_lite.cc
+ src/google/protobuf/message_lite.cc
+ src/google/protobuf/parse_context.cc
+ src/google/protobuf/repeated_field.cc
+ src/google/protobuf/stubs/bytestream.cc
+ src/google/protobuf/stubs/common.cc
+ src/google/protobuf/stubs/int128.cc
+ src/google/protobuf/stubs/status.cc
+ src/google/protobuf/stubs/statusor.cc
+ src/google/protobuf/stubs/stringpiece.cc
+ src/google/protobuf/stubs/stringprintf.cc
+ src/google/protobuf/stubs/structurally_valid.cc
+ src/google/protobuf/stubs/strutil.cc
+ src/google/protobuf/stubs/time.cc
+ src/google/protobuf/wire_format_lite.cc
+ src/google/protobuf/any.cc
+ src/google/protobuf/any.pb.cc
+ src/google/protobuf/api.pb.cc
+ src/google/protobuf/compiler/importer.cc
+ src/google/protobuf/compiler/parser.cc
+ src/google/protobuf/descriptor.cc
+ src/google/protobuf/descriptor.pb.cc
+ src/google/protobuf/descriptor_database.cc
+ src/google/protobuf/duration.pb.cc
+ src/google/protobuf/dynamic_message.cc
+ src/google/protobuf/empty.pb.cc
+ src/google/protobuf/extension_set_heavy.cc
+ src/google/protobuf/field_mask.pb.cc
+ src/google/protobuf/generated_message_reflection.cc
+ src/google/protobuf/generated_message_table_driven.cc
+ src/google/protobuf/io/gzip_stream.cc
+ src/google/protobuf/io/printer.cc
+ src/google/protobuf/io/tokenizer.cc
+ src/google/protobuf/map_field.cc
+ src/google/protobuf/message.cc
+ src/google/protobuf/reflection_ops.cc
+ src/google/protobuf/service.cc
+ src/google/protobuf/source_context.pb.cc
+ src/google/protobuf/struct.pb.cc
+ src/google/protobuf/stubs/mathlimits.cc
+ src/google/protobuf/stubs/substitute.cc
+ src/google/protobuf/text_format.cc
+ src/google/protobuf/timestamp.pb.cc
+ src/google/protobuf/type.pb.cc
+ src/google/protobuf/unknown_field_set.cc
+ src/google/protobuf/util/delimited_message_util.cc
+ src/google/protobuf/util/field_comparator.cc
+ src/google/protobuf/util/field_mask_util.cc
+ src/google/protobuf/util/internal/datapiece.cc
+ src/google/protobuf/util/internal/default_value_objectwriter.cc
+ src/google/protobuf/util/internal/error_listener.cc
+ src/google/protobuf/util/internal/field_mask_utility.cc
+ src/google/protobuf/util/internal/json_escaping.cc
+ src/google/protobuf/util/internal/json_objectwriter.cc
+ src/google/protobuf/util/internal/json_stream_parser.cc
+ src/google/protobuf/util/internal/object_writer.cc
+ src/google/protobuf/util/internal/proto_writer.cc
+ src/google/protobuf/util/internal/protostream_objectsource.cc
+ src/google/protobuf/util/internal/protostream_objectwriter.cc
+ src/google/protobuf/util/internal/type_info.cc
+ src/google/protobuf/util/internal/type_info_test_helper.cc
+ src/google/protobuf/util/internal/utility.cc
+ src/google/protobuf/util/json_util.cc
+ src/google/protobuf/util/message_differencer.cc
+ src/google/protobuf/util/time_util.cc
+ src/google/protobuf/util/type_resolver_util.cc
+ src/google/protobuf/wire_format.cc
+ src/google/protobuf/wrappers.pb.cc
+)
+
+target_include_directories(protobuf PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
+ ${CMAKE_CURRENT_SOURCE_DIR}/android
+)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
+
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
+
+target_compile_options(protobuf PRIVATE -std=c++17)
+
+target_compile_definitions(protobuf PRIVATE
+ -DHAVE_ZLIB=1
+)
+#cd ../protobuf
+#$CC -std=c++17 -Isrc -Iandroid -DHAVE_ZLIB=1 ${CFLAGS} -c \
+#src/google/protobuf/any_lite.cc \
+#src/google/protobuf/arena.cc \
+#src/google/protobuf/extension_set.cc \
+#src/google/protobuf/generated_enum_util.cc \
+#src/google/protobuf/generated_message_table_driven_lite.cc \
+#src/google/protobuf/generated_message_util.cc \
+#src/google/protobuf/implicit_weak_message.cc \
+#src/google/protobuf/io/coded_stream.cc \
+#src/google/protobuf/io/io_win32.cc \
+#src/google/protobuf/io/strtod.cc \
+#src/google/protobuf/io/zero_copy_stream.cc \
+#src/google/protobuf/io/zero_copy_stream_impl.cc \
+#src/google/protobuf/io/zero_copy_stream_impl_lite.cc \
+#src/google/protobuf/message_lite.cc \
+#src/google/protobuf/parse_context.cc \
+#src/google/protobuf/repeated_field.cc \
+#src/google/protobuf/stubs/bytestream.cc \
+#src/google/protobuf/stubs/common.cc \
+#src/google/protobuf/stubs/int128.cc \
+#src/google/protobuf/stubs/status.cc \
+#src/google/protobuf/stubs/statusor.cc \
+#src/google/protobuf/stubs/stringpiece.cc \
+#src/google/protobuf/stubs/stringprintf.cc \
+#src/google/protobuf/stubs/structurally_valid.cc \
+#src/google/protobuf/stubs/strutil.cc \
+#src/google/protobuf/stubs/time.cc \
+#src/google/protobuf/wire_format_lite.cc \
+#src/google/protobuf/any.cc \
+#src/google/protobuf/any.pb.cc \
+#src/google/protobuf/api.pb.cc \
+#src/google/protobuf/compiler/importer.cc \
+#src/google/protobuf/compiler/parser.cc \
+#src/google/protobuf/descriptor.cc \
+#src/google/protobuf/descriptor.pb.cc \
+#src/google/protobuf/descriptor_database.cc \
+#src/google/protobuf/duration.pb.cc \
+#src/google/protobuf/dynamic_message.cc \
+#src/google/protobuf/empty.pb.cc \
+#src/google/protobuf/extension_set_heavy.cc \
+#src/google/protobuf/field_mask.pb.cc \
+#src/google/protobuf/generated_message_reflection.cc \
+#src/google/protobuf/generated_message_table_driven.cc \
+#src/google/protobuf/io/gzip_stream.cc \
+#src/google/protobuf/io/printer.cc \
+#src/google/protobuf/io/tokenizer.cc \
+#src/google/protobuf/map_field.cc \
+#src/google/protobuf/message.cc \
+#src/google/protobuf/reflection_ops.cc \
+#src/google/protobuf/service.cc \
+#src/google/protobuf/source_context.pb.cc \
+#src/google/protobuf/struct.pb.cc \
+#src/google/protobuf/stubs/mathlimits.cc \
+#src/google/protobuf/stubs/substitute.cc \
+#src/google/protobuf/text_format.cc \
+#src/google/protobuf/timestamp.pb.cc \
+#src/google/protobuf/type.pb.cc \
+#src/google/protobuf/unknown_field_set.cc \
+#src/google/protobuf/util/delimited_message_util.cc \
+#src/google/protobuf/util/field_comparator.cc \
+#src/google/protobuf/util/field_mask_util.cc \
+#src/google/protobuf/util/internal/datapiece.cc \
+#src/google/protobuf/util/internal/default_value_objectwriter.cc \
+#src/google/protobuf/util/internal/error_listener.cc \
+#src/google/protobuf/util/internal/field_mask_utility.cc \
+#src/google/protobuf/util/internal/json_escaping.cc \
+#src/google/protobuf/util/internal/json_objectwriter.cc \
+#src/google/protobuf/util/internal/json_stream_parser.cc \
+#src/google/protobuf/util/internal/object_writer.cc \
+#src/google/protobuf/util/internal/proto_writer.cc \
+#src/google/protobuf/util/internal/protostream_objectsource.cc \
+#src/google/protobuf/util/internal/protostream_objectwriter.cc \
+#src/google/protobuf/util/internal/type_info.cc \
+#src/google/protobuf/util/internal/type_info_test_helper.cc \
+#src/google/protobuf/util/internal/utility.cc \
+#src/google/protobuf/util/json_util.cc \
+#src/google/protobuf/util/message_differencer.cc \
+#src/google/protobuf/util/time_util.cc \
+#src/google/protobuf/util/type_resolver_util.cc \
+#src/google/protobuf/wire_format.cc \
+#src/google/protobuf/wrappers.pb.cc
+
+#$AR rcs ../lib/libprotobuf-cpp-full.a *.o
+#rm -r *.o \ No newline at end of file
diff --git a/lib/zlib/CMakeLists.txt b/lib/zlib/CMakeLists.txt
new file mode 100644
index 0000000..19bcc69
--- /dev/null
+++ b/lib/zlib/CMakeLists.txt
@@ -0,0 +1,42 @@
+cmake_minimum_required(VERSION 3.22)
+
+project(zlib VERSION 1.0.0 DESCRIPTION "zlib")
+
+add_library(zlib STATIC
+ adler32.c
+ compress.c
+ cpu_features.c
+ crc32.c
+ deflate.c
+ gzclose.c
+ gzlib.c
+ gzread.c
+ gzwrite.c
+ infback.c
+ inflate.c
+ inftrees.c
+ inffast.c
+ trees.c
+ uncompr.c
+ zutil.c
+)
+
+target_include_directories(zlib PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/.
+)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
+
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
+
+target_compile_definitions(zlib PRIVATE
+ -DHAVE_HIDDEN
+ -DZLIB_CONST
+)
+
+target_compile_options(zlib PRIVATE -O3)
+
+#cd ../zlib
+#$CC -I. -O3 -DHAVE_HIDDEN -DZLIB_CONST ${CFLAGS} -c adler32.c compress.c cpu_features.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inflate.c inftrees.c inffast.c trees.c uncompr.c zutil.c
+#$AR rcs ../lib/libz.a *.o
+#rm -r *.o \ No newline at end of file