Changeset View
Changeset View
Standalone View
Standalone View
files/generate_build.rb
| #!/usr/bin/ruby | #!/usr/bin/ruby | ||||
| # Android build system is complicated and does not allow to build | |||||
| # separate parts easily. | |||||
| # This script tries to mimic Android build rules. | |||||
| def expand(dir, files) | def expand(dir, files) | ||||
| files.map { |f| File.join(dir, f) } | files.map { |f| File.join(dir, f) } | ||||
| end | end | ||||
| # Compiles sources to *.o files. | # Compiles sources to *.o files. | ||||
| # Returns array of output *.o filenames | # Returns array of output *.o filenames | ||||
| def compile(sources, cflags, params = {}) | def compile(sources, cflags, params = {}) | ||||
| outputs = [] | outputs = [] | ||||
| for s in sources | for s in sources | ||||
| ext = File.extname(s) | ext = File.extname(s) | ||||
| case ext | case ext | ||||
| when ".c" | when ".c" | ||||
| cc = "cc" | cc = "cc" | ||||
| lang_flags = "-std=gnu11 $CFLAGS $CPPFLAGS" | |||||
| when ".cpp", ".cc" | when ".cpp", ".cc" | ||||
| cc = "cxx" | cc = "cxx" | ||||
| lang_flags = "-std=gnu++2a $CXXFLAGS $CPPFLAGS" | |||||
| else | else | ||||
| raise "Unknown extension #{ext}" | raise "Unknown extension #{ext}" | ||||
| end | end | ||||
| output = s + ".o" | output = s + ".o" | ||||
| outputs << output | outputs << output | ||||
| order_deps = if params[:order_deps] | order_deps = if params[:order_deps] | ||||
| " || " + params[:order_deps].join(" ") | " || " + params[:order_deps].join(" ") | ||||
| else | else | ||||
| "" | "" | ||||
| end | end | ||||
| puts "build #{output}: #{cc} #{s}#{order_deps}\n cflags = #{lang_flags} #{cflags}" | # TODO: try to build the tools with LLVM libc: -stdlib=libc++ | ||||
| puts "build #{output}: #{cc} #{s}#{order_deps}\n cflags = #{cflags}" | |||||
| end | end | ||||
| return outputs | return outputs | ||||
| end | end | ||||
| # Generate proto and compile it | # Generate proto and compile it | ||||
| def protoc(source) | def protoc(source) | ||||
| basename = File.join(File.dirname(source), File.basename(source, ".proto")) | basename = File.join(File.dirname(source), File.basename(source, ".proto")) | ||||
| cfile = basename + ".pb.cc" | cfile = basename + ".pb.cc" | ||||
| hfile = basename + ".pb.h" | hfile = basename + ".pb.h" | ||||
| ofile = cfile + ".o" | ofile = cfile + ".o" | ||||
| puts "build #{cfile} #{hfile}: protoc #{source}" | puts "build #{cfile} #{hfile}: protoc #{source}" | ||||
| puts "build #{ofile}: cc #{cfile}\n cflags = -std=gnu++2a $CXXFLAGS $CPPFLAGS -I." | puts "build #{ofile}: cxx #{cfile}\n cflags = -I." | ||||
| return hfile, cfile, ofile | return hfile, cfile, ofile | ||||
| end | end | ||||
| # dir - directory where ninja file is located | # dir - directory where ninja file is located | ||||
| # lib - static library path relative to dir | # lib - static library path relative to dir | ||||
| def subninja(dir, lib) | def subninja(dir, lib) | ||||
| puts "subninja #{dir}build.ninja" | puts "subninja #{dir}build.ninja" | ||||
| return lib.each { |l| dir + l } | return lib.each { |l| dir + l } | ||||
| end | end | ||||
| # Links object files | # Links object files | ||||
| def link(output, objects, ldflags) | def link(output, objects, ldflags) | ||||
| puts "build #{output}: link #{objects.join(" ")}\n ldflags = #{ldflags} $LDFLAGS" | # TODO: try to build the tools with LLVM libc: -stdlib=libc++ | ||||
| puts "build #{output}: link #{objects.join(" ")}\n ldflags = #{ldflags}" | |||||
| end | end | ||||
| def genheader(input, variable, output) | def genheader(input, variable, output) | ||||
| puts "build #{output}: genheader #{input}\n var = #{variable}" | puts "build #{output}: genheader #{input}\n var = #{variable}" | ||||
| end | end | ||||
| puts "# This set of commands generated by generate_build.rb script\n\n" | puts "# This script is generated by https://github.com/anatol/android-platform-tools-build tool\n\n" | ||||
| puts "CC = #{ENV["CC"] || "clang"}" | puts "CC = #{ENV["CC"] || "clang"}" | ||||
| puts "CXX = #{ENV["CXX"] || "clang++"}\n\n" | puts "CXX = #{ENV["CXX"] || "clang++"}\n\n" | ||||
| puts "CFLAGS = #{ENV["CFLAGS"]}" | puts "CFLAGS = #{ENV["CFLAGS"]}" | ||||
| puts "CPPFLAGS = #{ENV["CPPFLAGS"]}" | |||||
| puts "CXXFLAGS = #{ENV["CXXFLAGS"]}" | puts "CXXFLAGS = #{ENV["CXXFLAGS"]}" | ||||
| puts "LDFLAGS = #{ENV["LDFLAGS"]}" | puts "LDFLAGS = #{ENV["LDFLAGS"]}" | ||||
| puts "PLATFORM_TOOLS_VERSION = #{ENV["PLATFORM_TOOLS_VERSION"]}\n\n" | puts "PLATFORM_TOOLS_VERSION = #{ENV["PLATFORM_TOOLS_VERSION"]}\n\n" | ||||
| puts "" " | puts "" " | ||||
| rule cc | rule cc | ||||
| command = $CC $cflags -c $in -o $out | command = $CC -std=gnu11 $CFLAGS $CPPFLAGS $cflags -c $in -o $out | ||||
| rule cxx | rule cxx | ||||
| command = $CXX $cflags -c $in -o $out | command = $CXX -std=gnu++2a $CXXFLAGS $CPPFLAGS $cflags -c $in -o $out | ||||
| rule link | rule link | ||||
| command = $CXX $ldflags $LDFLAGS $in -o $out | command = $CXX $ldflags $LDFLAGS $in -o $out | ||||
| rule protoc | rule protoc | ||||
| command = protoc --cpp_out=. $in | command = protoc --cpp_out=. $in | ||||
| rule genheader | rule genheader | ||||
| command = (echo 'unsigned char $var[] = {' && xxd -i <$in && echo '};') > $out | command = (echo 'unsigned char $var[] = {' && xxd -i <$in && echo '};') > $out | ||||
| " "" | " "" | ||||
| key_type_h, key_type_c, key_type_o = protoc("core/adb/proto/key_type.proto") | |||||
| adbdfiles = %w( | adbdfiles = %w( | ||||
| adb.cpp | adb.cpp | ||||
| adb_io.cpp | adb_io.cpp | ||||
| adb_listeners.cpp | adb_listeners.cpp | ||||
| adb_trace.cpp | adb_trace.cpp | ||||
| adb_utils.cpp | adb_utils.cpp | ||||
| fdevent/fdevent.cpp | fdevent/fdevent.cpp | ||||
| fdevent/fdevent_poll.cpp | fdevent/fdevent_poll.cpp | ||||
| fdevent/fdevent_epoll.cpp | fdevent/fdevent_epoll.cpp | ||||
| shell_service_protocol.cpp | shell_service_protocol.cpp | ||||
| sockets.cpp | sockets.cpp | ||||
| transport.cpp | transport.cpp | ||||
| transport_local.cpp | |||||
| transport_usb.cpp | |||||
| types.cpp | types.cpp | ||||
| ) | ) | ||||
| libadbd = compile(expand("core/adb", adbdfiles), '-DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/include -Icore/diagnose_usb/include') | libadbd = compile(expand("core/adb", adbdfiles), '-DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" -DADB_HOST=1 -Icore/include -Ilibbase/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/src/include -Icore/diagnose_usb/include -Icore/adb/crypto/include -Icore/adb/proto -Icore/adb/tls/include', :order_deps => [key_type_h]) | ||||
| apkent_h, apkent_c, apkent_o = protoc("core/adb/fastdeploy/proto/ApkEntry.proto") | apkent_h, apkent_c, apkent_o = protoc("core/adb/fastdeploy/proto/ApkEntry.proto") | ||||
| app_processes_h, app_processes_c, app_processes_o = protoc("core/adb/proto/app_processes.proto") | |||||
| adb_known_hosts_h, adb_known_hosts_c, adb_known_hosts_o = protoc("core/adb/proto/adb_known_hosts.proto") | |||||
| pairing_h, pairing_c, pairing_o = protoc("core/adb/proto/pairing.proto") | |||||
| deployagent_inc = "core/adb/client/deployagent.inc" | deployagent_inc = "core/adb/client/deployagent.inc" | ||||
| genheader("core/adb/deployagent.jar", "kDeployAgent", deployagent_inc) | genheader("core/adb/deployagent.jar", "kDeployAgent", deployagent_inc) | ||||
| deployagentscript_inc = "core/adb/client/deployagentscript.inc" | deployagentscript_inc = "core/adb/client/deployagentscript.inc" | ||||
| genheader("core/adb/fastdeploy/deployagent/deployagent.sh", "kDeployAgentScript", deployagentscript_inc) | genheader("core/adb/fastdeploy/deployagent/deployagent.sh", "kDeployAgentScript", deployagentscript_inc) | ||||
| adbfiles = %w( | adbfiles = %w( | ||||
| client/adb_client.cpp | client/adb_client.cpp | ||||
| client/adb_install.cpp | client/adb_install.cpp | ||||
| client/adb_wifi.cpp | |||||
| client/auth.cpp | client/auth.cpp | ||||
| client/bugreport.cpp | client/bugreport.cpp | ||||
| client/commandline.cpp | client/commandline.cpp | ||||
| client/console.cpp | client/console.cpp | ||||
| client/fastdeploy.cpp | client/fastdeploy.cpp | ||||
| client/fastdeploycallbacks.cpp | client/fastdeploycallbacks.cpp | ||||
| client/file_sync_client.cpp | client/file_sync_client.cpp | ||||
| client/incremental.cpp | |||||
| client/incremental_server.cpp | |||||
| client/incremental_utils.cpp | |||||
| client/line_printer.cpp | client/line_printer.cpp | ||||
| client/main.cpp | client/main.cpp | ||||
| client/pairing/pairing_client.cpp | |||||
| client/transport_local.cpp | |||||
| client/transport_usb.cpp | |||||
| client/usb_dispatch.cpp | client/usb_dispatch.cpp | ||||
| client/usb_libusb.cpp | client/usb_libusb.cpp | ||||
| client/usb_linux.cpp | client/usb_linux.cpp | ||||
| crypto/key.cpp | |||||
| crypto/rsa_2048_key.cpp | |||||
| crypto/x509_generator.cpp | |||||
| fastdeploy/deploypatchgenerator/apk_archive.cpp | fastdeploy/deploypatchgenerator/apk_archive.cpp | ||||
| fastdeploy/deploypatchgenerator/deploy_patch_generator.cpp | fastdeploy/deploypatchgenerator/deploy_patch_generator.cpp | ||||
| fastdeploy/deploypatchgenerator/patch_utils.cpp | fastdeploy/deploypatchgenerator/patch_utils.cpp | ||||
| pairing_auth/aes_128_gcm.cpp | |||||
| pairing_auth/pairing_auth.cpp | |||||
| pairing_connection/pairing_connection.cpp | |||||
| services.cpp | services.cpp | ||||
| socket_spec.cpp | socket_spec.cpp | ||||
| sysdeps/env.cpp | |||||
| sysdeps/errno.cpp | sysdeps/errno.cpp | ||||
| sysdeps/posix/network.cpp | sysdeps/posix/network.cpp | ||||
| sysdeps_unix.cpp | sysdeps_unix.cpp | ||||
| tls/adb_ca_list.cpp | |||||
| tls/tls_connection.cpp | |||||
| ) | ) | ||||
| libadb = compile(expand("core/adb", adbfiles), "-D_GNU_SOURCE -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/include -Ibase/libs/androidfw/include -Inative/include", :order_deps => [apkent_h, deployagent_inc, deployagentscript_inc]) | libadb = compile(expand("core/adb", adbfiles), "-D_GNU_SOURCE -DADB_HOST=1 -Icore/include -Ilibbase/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/src/include -Ibase/libs/androidfw/include -Inative/include -Icore/adb/crypto/include -Icore/adb/proto -Icore/adb/tls/include -Icore/adb/pairing_connection/include -Ilibziparchive/include -Icore/adb/pairing_auth/include", | ||||
| :order_deps => [apkent_h, key_type_h, app_processes_h, adb_known_hosts_h, pairing_h, deployagent_inc, deployagentscript_inc]) | |||||
| androidfwfiles = %w( | androidfwfiles = %w( | ||||
| LocaleData.cpp | LocaleData.cpp | ||||
| ResourceTypes.cpp | ResourceTypes.cpp | ||||
| TypeWrappers.cpp | TypeWrappers.cpp | ||||
| ZipFileRO.cpp | ZipFileRO.cpp | ||||
| ) | ) | ||||
| libandroidfw = compile(expand("base/libs/androidfw", androidfwfiles), "-Icore/base/include -Ibase/libs/androidfw/include -Icore/libutils/include -Icore/liblog/include -Icore/libsystem/include -Inative/include -Icore/libcutils/include -Icore/libziparchive/include") | libandroidfw = compile(expand("base/libs/androidfw", androidfwfiles), "-Ilibbase/include -Ibase/libs/androidfw/include -Icore/libutils/include -Icore/liblog/include -Icore/libsystem/include -Inative/include -Icore/libcutils/include -Ilibziparchive/include") | ||||
| basefiles = %w( | basefiles = %w( | ||||
| chrono_utils.cpp | chrono_utils.cpp | ||||
| errors_unix.cpp | errors_unix.cpp | ||||
| file.cpp | file.cpp | ||||
| liblog_symbols.cpp | liblog_symbols.cpp | ||||
| logging.cpp | logging.cpp | ||||
| mapped_file.cpp | mapped_file.cpp | ||||
| parsebool.cpp | |||||
| parsenetaddress.cpp | parsenetaddress.cpp | ||||
| stringprintf.cpp | stringprintf.cpp | ||||
| strings.cpp | strings.cpp | ||||
| test_utils.cpp | test_utils.cpp | ||||
| threads.cpp | threads.cpp | ||||
| ) | ) | ||||
| libbase = compile(expand("core/base", basefiles), "-DADB_HOST=1 -Icore/base/include -Icore/include") | libbase = compile(expand("libbase", basefiles), "-DADB_HOST=1 -Ilibbase/include -Icore/include") | ||||
| logfiles = %w( | logfiles = %w( | ||||
| log_event_list.cpp | log_event_list.cpp | ||||
| log_event_write.cpp | log_event_write.cpp | ||||
| logger_name.cpp | logger_name.cpp | ||||
| logger_write.cpp | logger_write.cpp | ||||
| logprint.cpp | logprint.cpp | ||||
| properties.cpp | properties.cpp | ||||
| ) | ) | ||||
| liblog = compile(expand("core/liblog", logfiles), "-DLIBLOG_LOG_TAG=1006 -D_XOPEN_SOURCE=700 -DFAKE_LOG_DEVICE=1 -Icore/log/include -Icore/include -Icore/base/include") | liblog = compile(expand("core/liblog", logfiles), "-DLIBLOG_LOG_TAG=1006 -D_XOPEN_SOURCE=700 -DFAKE_LOG_DEVICE=1 -Icore/liblog/include -Icore/include -Ilibbase/include") | ||||
| cutilsfiles = %w( | cutilsfiles = %w( | ||||
| android_get_control_file.cpp | android_get_control_file.cpp | ||||
| canned_fs_config.cpp | canned_fs_config.cpp | ||||
| fs_config.cpp | fs_config.cpp | ||||
| load_file.cpp | load_file.cpp | ||||
| socket_inaddr_any_server_unix.cpp | socket_inaddr_any_server_unix.cpp | ||||
| socket_local_client_unix.cpp | socket_local_client_unix.cpp | ||||
| socket_local_server_unix.cpp | socket_local_server_unix.cpp | ||||
| socket_network_client_unix.cpp | socket_network_client_unix.cpp | ||||
| sockets.cpp | sockets.cpp | ||||
| sockets_unix.cpp | sockets_unix.cpp | ||||
| threads.cpp | threads.cpp | ||||
| ) | ) | ||||
| libcutils = compile(expand("core/libcutils", cutilsfiles), "-D_GNU_SOURCE -Icore/libcutils/include -Icore/include -Icore/base/include") | libcutils = compile(expand("core/libcutils", cutilsfiles), "-D_GNU_SOURCE -Icore/libcutils/include -Icore/include -Ilibbase/include") | ||||
| diagnoseusbfiles = %w( | diagnoseusbfiles = %w( | ||||
| diagnose_usb.cpp | diagnose_usb.cpp | ||||
| ) | ) | ||||
| libdiagnoseusb = compile(expand("core/diagnose_usb", diagnoseusbfiles), "-Icore/include -Icore/base/include -Icore/diagnose_usb/include") | libdiagnoseusb = compile(expand("core/diagnose_usb", diagnoseusbfiles), "-Icore/include -Ilibbase/include -Icore/diagnose_usb/include") | ||||
| libcryptofiles = %w( | libcryptofiles = %w( | ||||
| android_pubkey.c | android_pubkey.cpp | ||||
| ) | ) | ||||
| libcrypto = compile(expand("core/libcrypto_utils", libcryptofiles), "-Icore/libcrypto_utils/include -Iboringssl/include") | libcrypto = compile(expand("core/libcrypto_utils", libcryptofiles), "-Icore/libcrypto_utils/include -Iboringssl/src/include") | ||||
| # TODO: make subninja working | # TODO: make subninja working | ||||
| #boringssl = subninja('boringssl/build/', ['crypto/libcrypto.a']) | #boringssl = subninja('boringssl/src/build/', ['ssl/libssl.a']) | ||||
| boringssl = ["boringssl/build/crypto/libcrypto.a"] | boringssl = ["boringssl/src/build/crypto/libcrypto.a", "boringssl/src/build/ssl/libssl.a"] | ||||
| boringssl_ldflags = "-Wl,--whole-archive " + boringssl.join(" ") + " -Wl,--no-whole-archive" | |||||
| fastbootfiles = %w( | fastbootfiles = %w( | ||||
| bootimg_utils.cpp | bootimg_utils.cpp | ||||
| fastboot.cpp | fastboot.cpp | ||||
| fastboot_driver.cpp | fastboot_driver.cpp | ||||
| fs.cpp | fs.cpp | ||||
| main.cpp | main.cpp | ||||
| socket.cpp | socket.cpp | ||||
| tcp.cpp | tcp.cpp | ||||
| udp.cpp | udp.cpp | ||||
| usb_linux.cpp | usb_linux.cpp | ||||
| util.cpp | util.cpp | ||||
| ) | ) | ||||
| libfastboot = compile(expand("core/fastboot", fastbootfiles), '-DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -DUSE_F2FS -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Imkbootimg/include/bootimg -Iextras/ext4_utils/include -Iextras/f2fs_utils -Icore/libziparchive/include -Icore/fs_mgr/liblp/include -Icore/diagnose_usb/include -Iavb') | libfastboot = compile(expand("core/fastboot", fastbootfiles), '-DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -DUSE_F2FS -Ilibbase/include -Icore/include -Icore/adb -Icore/libsparse/include -Imkbootimg/include/bootimg -Iextras/ext4_utils/include -Iextras/f2fs_utils -Ilibziparchive/include -Icore/fs_mgr/liblp/include -Icore/diagnose_usb/include -Iavb') | ||||
| fsmgrfiles = %w( | fsmgrfiles = %w( | ||||
| liblp/images.cpp | liblp/images.cpp | ||||
| liblp/partition_opener.cpp | liblp/partition_opener.cpp | ||||
| liblp/reader.cpp | liblp/reader.cpp | ||||
| liblp/utility.cpp | liblp/utility.cpp | ||||
| liblp/writer.cpp | liblp/writer.cpp | ||||
| ) | ) | ||||
| libfsmgr = compile(expand("core/fs_mgr", fsmgrfiles), "-Icore/fs_mgr/liblp/include -Icore/base/include -Iextras/ext4_utils/include -Icore/libsparse/include") | libfsmgr = compile(expand("core/fs_mgr", fsmgrfiles), "-Icore/fs_mgr/liblp/include -Ilibbase/include -Iextras/ext4_utils/include -Icore/libsparse/include") | ||||
| sparsefiles = %w( | sparsefiles = %w( | ||||
| backed_block.cpp | backed_block.cpp | ||||
| output_file.cpp | output_file.cpp | ||||
| sparse.cpp | sparse.cpp | ||||
| sparse_crc32.cpp | sparse_crc32.cpp | ||||
| sparse_err.cpp | sparse_err.cpp | ||||
| sparse_read.cpp | sparse_read.cpp | ||||
| ) | ) | ||||
| libsparse = compile(expand("core/libsparse", sparsefiles), "-Icore/libsparse/include -Icore/base/include") | libsparse = compile(expand("core/libsparse", sparsefiles), "-Icore/libsparse/include -Ilibbase/include") | ||||
| f2fsfiles = %w( | f2fsfiles = %w( | ||||
| ) | ) | ||||
| f2fs = compile(expand("extras/f2fs_utils", f2fsfiles), "-DHAVE_LINUX_TYPES_H -If2fs-tools/include -Icore/liblog/include") | f2fs = compile(expand("extras/f2fs_utils", f2fsfiles), "-DHAVE_LINUX_TYPES_H -If2fs-tools/include -Icore/liblog/include") | ||||
| zipfiles = %w( | zipfiles = %w( | ||||
| zip_archive.cc | zip_archive.cc | ||||
| zip_error.cpp | |||||
| zip_cd_entry_map.cc | |||||
| ) | ) | ||||
| libzip = compile(expand("core/libziparchive", zipfiles), "-Icore/base/include -Icore/include -Icore/libziparchive/include") | # we use -std=c++17 as this lib currently does not compile with c++20 standard due to | ||||
| # https://stackoverflow.com/questions/37618213/when-is-a-private-constructor-not-a-private-constructor/57430419#57430419 | |||||
| libzip = compile(expand("libziparchive", zipfiles), "-std=c++17 -Ilibbase/include -Icore/include -Ilibziparchive/include") | |||||
| utilfiles = %w( | utilfiles = %w( | ||||
| FileMap.cpp | FileMap.cpp | ||||
| SharedBuffer.cpp | SharedBuffer.cpp | ||||
| String16.cpp | String16.cpp | ||||
| String8.cpp | String8.cpp | ||||
| VectorImpl.cpp | VectorImpl.cpp | ||||
| Unicode.cpp | Unicode.cpp | ||||
| ) | ) | ||||
| libutil = compile(expand("core/libutils", utilfiles), "-Icore/include -Icore/base/include") | libutil = compile(expand("core/libutils", utilfiles), "-Icore/include -Ilibbase/include") | ||||
| ext4files = %w( | ext4files = %w( | ||||
| ext4_utils.cpp | ext4_utils.cpp | ||||
| wipe.cpp | wipe.cpp | ||||
| ext4_sb.cpp | ext4_sb.cpp | ||||
| ) | ) | ||||
| libext4 = compile(expand("extras/ext4_utils", ext4files), "-D_GNU_SOURCE -Icore/libsparse/include -Icore/include -Iselinux/libselinux/include -Iextras/ext4_utils/include -Icore/base/include") | libext4 = compile(expand("extras/ext4_utils", ext4files), "-D_GNU_SOURCE -Icore/libsparse/include -Icore/include -Iselinux/libselinux/include -Iextras/ext4_utils/include -Ilibbase/include") | ||||
| link("fastboot", libfsmgr + libsparse + libzip + libcutils + liblog + libutil + libbase + libext4 + f2fs + libfastboot + libdiagnoseusb + boringssl, "-lz -lpcre2-8 -lpthread -ldl -lselinux -lsepol") | link("fastboot", libfsmgr + libsparse + libzip + libcutils + liblog + libutil + libbase + libext4 + f2fs + libfastboot + libdiagnoseusb, boringssl_ldflags + " -lz -lpcre2-8 -lpthread -lselinux -lsepol") | ||||
| # mke2fs.android - a ustom version of mke2fs that supports --android_sparse (FS#56955) | # mke2fs.android - a ustom version of mke2fs that supports --android_sparse (FS#56955) | ||||
| libext2fsfiles = %w( | libext2fsfiles = %w( | ||||
| lib/blkid/cache.c | lib/blkid/cache.c | ||||
| lib/blkid/dev.c | lib/blkid/dev.c | ||||
| lib/blkid/devname.c | lib/blkid/devname.c | ||||
| lib/blkid/devno.c | lib/blkid/devno.c | ||||
| lib/blkid/getsize.c | lib/blkid/getsize.c | ||||
| ▲ Show 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | |||||
| ext2simgfiles = %w( | ext2simgfiles = %w( | ||||
| contrib/android/ext2simg.c | contrib/android/ext2simg.c | ||||
| ) | ) | ||||
| ext2simg = compile(expand("e2fsprogs", ext2simgfiles), "-Ie2fsprogs/lib -Icore/libsparse/include") | ext2simg = compile(expand("e2fsprogs", ext2simgfiles), "-Ie2fsprogs/lib -Icore/libsparse/include") | ||||
| link("ext2simg", ext2simg + libext2fs + libsparse + libbase + libzip + liblog + libutil, "-lz -lpthread") | link("ext2simg", ext2simg + libext2fs + libsparse + libbase + libzip + liblog + libutil, "-lz -lpthread") | ||||
| link("adb", libbase + liblog + libcutils + libutil + libadbd + libadb + libdiagnoseusb + libcrypto + boringssl + libandroidfw + libzip + [apkent_o], "-lpthread -lusb-1.0 -lprotobuf-lite -lz") | link("adb", libbase + liblog + libcutils + libutil + libadbd + libadb + libdiagnoseusb + libcrypto + libandroidfw + libzip + [apkent_o, key_type_o, app_processes_o, adb_known_hosts_o, pairing_o], boringssl_ldflags + " -lpthread -lusb-1.0 -lprotobuf -lz -llz4 -lbrotlidec -lbrotlienc -lzstd") | ||||
| No newline at end of file | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.