blob: 653025e56c76c3b8e44f4b15ac4d6b7d0cf8d70f [file] [log] [blame]
Denis Vlasenko7d219aa2006-10-05 10:17:08 +00001# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
Denys Vlasenko0ef64bd2010-08-16 20:14:46 +02005# Licensed under GPLv2, see file LICENSE in this source tree.
Denis Vlasenko7d219aa2006-10-05 10:17:08 +00006
Denys Vlasenko5c296de2010-07-03 14:28:35 +02007libbb/appletlib.o: include/usage_compressed.h
8
Denis Vlasenko0b354702006-11-24 14:54:27 +00009lib-y:=
10
Denys Vlasenkod70e0e92010-06-08 12:15:11 +020011INSERT
12
Denis Vlasenkod62fd842007-10-07 20:46:34 +000013lib-y += appletlib.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000014lib-y += ask_confirmation.o
15lib-y += bb_askpass.o
Denys Vlasenko9ff50b82010-10-18 11:40:26 +020016lib-y += bb_bswap_64.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000017lib-y += bb_do_delay.o
18lib-y += bb_pwd.o
Denis Vlasenkofb290382008-03-02 12:51:26 +000019lib-y += bb_qsort.o
Denys Vlasenko4813a512009-06-15 09:50:54 +020020#lib-y += bb_strtod.o
Denis Vlasenkod686a042006-11-27 14:43:21 +000021lib-y += bb_strtonum.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000022lib-y += change_identity.o
23lib-y += chomp.o
24lib-y += compare_string_array.o
25lib-y += concat_path_file.o
26lib-y += concat_subpath_file.o
YU Jincheng5156b242021-10-10 02:19:51 +080027lib-y += const_hack.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000028lib-y += copy_file.o
29lib-y += copyfd.o
30lib-y += crc32.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000031lib-y += default_error_retval.o
32lib-y += device_open.o
33lib-y += dump.o
Denys Vlasenkoe765b5a2014-05-02 17:15:58 +020034lib-y += executable.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000035lib-y += fclose_nonstdin.o
36lib-y += fflush_stdout_and_exit.o
37lib-y += fgets_str.o
38lib-y += find_pid_by_name.o
39lib-y += find_root_device.o
40lib-y += full_write.o
41lib-y += get_console.o
42lib-y += get_last_path_component.o
43lib-y += get_line_from_file.o
Denis Vlasenko5014dad2008-02-27 11:54:59 +000044lib-y += getpty.o
Denys Vlasenko40e7d252010-02-01 23:48:27 +010045lib-y += get_volsize.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000046lib-y += herror_msg.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000047lib-y += human_readable.o
48lib-y += inet_common.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000049lib-y += inode_hash.o
50lib-y += isdirectory.o
51lib-y += kernel_version.o
52lib-y += last_char_is.o
Denis Vlasenko5d89fba2008-04-22 00:08:27 +000053lib-y += lineedit.o lineedit_ptr_hack.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000054lib-y += llist.o
55lib-y += login.o
56lib-y += make_directory.o
57lib-y += makedev.o
Denys Vlasenkob5aa1d92010-10-18 13:47:47 +020058lib-y += hash_md5_sha.o
Denys Vlasenko05fd13e2022-01-03 01:57:29 +010059lib-y += hash_md5_sha_x86-64.o
Denys Vlasenko711e20e2022-01-07 00:43:59 +010060lib-y += hash_md5_sha_x86-64_shaNI.o
Denys Vlasenkoa96ccbe2022-01-07 01:32:13 +010061lib-y += hash_md5_sha_x86-32_shaNI.o
Denys Vlasenko6472ac92022-02-03 14:15:20 +010062lib-y += hash_md5_sha256_x86-64_shaNI.o
63lib-y += hash_md5_sha256_x86-32_shaNI.o
Denys Vlasenkob5aa1d92010-10-18 13:47:47 +020064# Alternative (disabled) MD5 implementation
Denys Vlasenko06f719f2010-10-18 10:38:18 +020065#lib-y += hash_md5prime.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000066lib-y += messages.o
67lib-y += mode_string.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000068lib-y += parse_mode.o
69lib-y += perror_msg.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000070lib-y += perror_nomsg.o
71lib-y += perror_nomsg_and_die.o
Denis Vlasenko10457b92007-03-27 22:01:31 +000072lib-y += pidfile.o
Dan Fandrich21a542d2009-10-27 11:05:00 +010073lib-y += platform.o
Denis Vlasenkod3c042f2007-12-30 01:59:53 +000074lib-y += printable.o
Denys Vlasenkod8528b82010-01-31 05:15:38 +010075lib-y += printable_string.o
Denis Vlasenko53354ac2008-06-07 15:10:29 +000076lib-y += print_flags.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000077lib-y += process_escape_sequence.o
78lib-y += procps.o
Magnus Dammf5914992009-11-08 16:34:43 +010079lib-y += progress.o
Denis Vlasenko574f2f42008-02-27 18:41:59 +000080lib-y += ptr_to_globals.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000081lib-y += read.o
Denys Vlasenko19ced5c2010-06-06 21:53:09 +020082lib-y += read_printf.o
Denis Vlasenko0112ff52008-10-25 23:23:00 +000083lib-y += read_key.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000084lib-y += recursive_action.o
85lib-y += remove_file.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000086lib-y += run_shell.o
Denis Vlasenko6f1713f2008-02-25 23:23:58 +000087lib-y += safe_gethostname.o
Denis Vlasenko5d61e712007-09-27 10:09:59 +000088lib-y += safe_poll.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000089lib-y += safe_strncpy.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000090lib-y += safe_write.o
Kaarle Ritvanen517a82c2016-01-02 00:20:39 +020091lib-y += securetty.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000092lib-y += setup_environment.o
Denis Vlasenko25591c32008-02-16 22:58:56 +000093lib-y += signals.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000094lib-y += simplify_path.o
Denys Vlasenkoe992bae2009-11-28 15:18:53 +010095lib-y += single_argv.o
Denis Vlasenko0b354702006-11-24 14:54:27 +000096lib-y += skip_whitespace.o
97lib-y += speed_table.o
Bernhard Reutner-Fischer7e8a53a2007-04-10 09:37:29 +000098lib-y += str_tolower.o
Bernhard Reutner-Fischer17282292008-05-28 14:19:27 +000099lib-y += strrstr.o
Denys Vlasenkof92f1d02014-06-22 13:54:40 +0200100lib-y += sysconf.o
Denis Vlasenko459be352007-06-17 19:09:05 +0000101lib-y += time.o
Denis Vlasenko0b354702006-11-24 14:54:27 +0000102lib-y += trim.o
103lib-y += u_signal_names.o
104lib-y += uuencode.o
Denis Vlasenko0b354702006-11-24 14:54:27 +0000105lib-y += verror_msg.o
106lib-y += vfork_daemon_rexec.o
Denis Vlasenko0b354702006-11-24 14:54:27 +0000107lib-y += warn_ignoring_args.o
108lib-y += wfopen.o
109lib-y += wfopen_input.o
Bernhard Reutner-Fischerae4342c2008-05-19 08:18:50 +0000110lib-y += write.o
Denis Vlasenkoed836cd2006-11-25 14:44:13 +0000111lib-y += xatonum.o
Denis Vlasenko0b354702006-11-24 14:54:27 +0000112lib-y += xconnect.o
113lib-y += xfuncs.o
Denis Vlasenkob12b1c82008-04-09 00:33:23 +0000114lib-y += xfuncs_printf.o
Denis Vlasenko468aea22008-04-01 14:47:57 +0000115lib-y += xfunc_die.o
Denis Vlasenko0b354702006-11-24 14:54:27 +0000116lib-y += xgetcwd.o
117lib-y += xgethostbyname.o
Denis Vlasenko0b354702006-11-24 14:54:27 +0000118lib-y += xreadlink.o
Denis Vlasenkodeeed592008-07-08 05:14:36 +0000119lib-y += xrealloc_vector.o
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000120
Ron Yorston5c69ad02020-08-04 08:24:19 +0100121lib-$(CONFIG_MOUNT) += match_fstype.o
122lib-$(CONFIG_UMOUNT) += match_fstype.o
Chris Rees6b1ce452011-01-24 17:10:02 +0100123
Denys Vlasenko37f5bef2010-04-05 03:18:40 +0200124lib-$(CONFIG_FEATURE_UTMP) += utmp.o
125
Denys Vlasenko7dd0ce42009-07-15 18:27:47 +0200126# A mix of optimizations (why build stuff we know won't be used)
127# and objects which may fail to build (SELinux on selinux-less system)
128lib-$(CONFIG_SELINUX) += selinux_common.o
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000129lib-$(CONFIG_FEATURE_MTAB_SUPPORT) += mtab.o
Denys Vlasenko19158a82010-03-26 14:06:56 +0100130lib-$(CONFIG_UNICODE_SUPPORT) += unicode.o
Denys Vlasenko7dd0ce42009-07-15 18:27:47 +0200131lib-$(CONFIG_FEATURE_CHECK_NAMES) += die_if_bad_username.o
132
Denys Vlasenko4dc35fb2011-07-08 04:41:38 +0200133lib-$(CONFIG_NC) += udp_io.o
Denys Vlasenko82d1c1f2017-12-31 17:30:02 +0100134lib-$(CONFIG_NETCAT) += udp_io.o
Denys Vlasenko4dc35fb2011-07-08 04:41:38 +0200135lib-$(CONFIG_DNSD) += udp_io.o
136lib-$(CONFIG_NTPD) += udp_io.o
137lib-$(CONFIG_TFTP) += udp_io.o
138lib-$(CONFIG_TFTPD) += udp_io.o
139lib-$(CONFIG_TCPSVD) += udp_io.o
140lib-$(CONFIG_UDPSVD) += udp_io.o
141lib-$(CONFIG_TRACEROUTE) += udp_io.o
Denys Vlasenko548620c2016-12-08 12:24:48 +0100142lib-$(CONFIG_TRACEROUTE6) += udp_io.o
Denys Vlasenko4dc35fb2011-07-08 04:41:38 +0200143
Denys Vlasenko7dd0ce42009-07-15 18:27:47 +0200144lib-$(CONFIG_LOSETUP) += loop.o
145lib-$(CONFIG_FEATURE_MOUNT_LOOP) += loop.o
146
Denis Vlasenko829bbd32009-04-14 00:51:05 +0000147lib-$(CONFIG_ADDGROUP) += update_passwd.o
148lib-$(CONFIG_ADDUSER) += update_passwd.o
Denis Vlasenko5dcb43a2009-04-15 02:13:14 +0000149lib-$(CONFIG_DELGROUP) += update_passwd.o
Denis Vlasenko829bbd32009-04-14 00:51:05 +0000150lib-$(CONFIG_DELUSER) += update_passwd.o
Denys Vlasenko7dd0ce42009-07-15 18:27:47 +0200151
Denys Vlasenkoac5d3242016-12-10 20:57:00 +0100152lib-$(CONFIG_FTPD) += pw_encrypt.o correct_password.o
Denys Vlasenko7367a942018-01-04 15:21:25 +0100153lib-$(CONFIG_PASSWD) += pw_encrypt.o update_passwd.o
154lib-$(CONFIG_FEATURE_PASSWD_WEAK_CHECK) += obscure.o
Denis Vlasenkod1a84a22008-12-07 01:16:34 +0000155lib-$(CONFIG_CHPASSWD) += pw_encrypt.o update_passwd.o
156lib-$(CONFIG_CRYPTPW) += pw_encrypt.o
Denys Vlasenkobb0bf282016-06-19 21:54:04 +0200157lib-$(CONFIG_MKPASSWD) += pw_encrypt.o
Denys Vlasenko198b02f2013-12-31 23:22:36 +0100158lib-$(CONFIG_SULOGIN) += pw_encrypt.o correct_password.o
Denis Vlasenkocc3f20b2008-06-23 22:31:52 +0000159lib-$(CONFIG_VLOCK) += pw_encrypt.o correct_password.o
160lib-$(CONFIG_SU) += pw_encrypt.o correct_password.o
161lib-$(CONFIG_LOGIN) += pw_encrypt.o correct_password.o
Denys Vlasenko7dd0ce42009-07-15 18:27:47 +0200162lib-$(CONFIG_FEATURE_HTTPD_AUTH_MD5) += pw_encrypt.o
Morten Kvistgaardfeac9b62014-08-05 21:57:18 +0200163lib-$(CONFIG_FEATURE_FTP_AUTHENTICATION) += pw_encrypt.o
Denys Vlasenko7dd0ce42009-07-15 18:27:47 +0200164
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000165lib-$(CONFIG_DF) += find_mount_point.o
Denis Vlasenko6a5dc5d2006-12-30 18:42:29 +0000166lib-$(CONFIG_MKFS_MINIX) += find_mount_point.o
Denys Vlasenko31e2e7b2009-12-12 02:42:35 +0100167lib-$(CONFIG_MKFS_EXT2) += find_mount_point.o
Denys Vlasenko548620c2016-12-08 12:24:48 +0100168lib-$(CONFIG_MKE2FS) += find_mount_point.o
Denys Vlasenko31e2e7b2009-12-12 02:42:35 +0100169lib-$(CONFIG_MKFS_REISER) += find_mount_point.o
Denys Vlasenko7dd0ce42009-07-15 18:27:47 +0200170lib-$(CONFIG_FSCK_MINIX) += find_mount_point.o
Denys Vlasenko1315c302009-12-11 15:01:54 +0100171lib-$(CONFIG_MOUNT) += find_mount_point.o
Denys Vlasenko7dd0ce42009-07-15 18:27:47 +0200172
Mike Frysinger6b160e42008-02-15 02:27:19 +0000173lib-$(CONFIG_HWCLOCK) += rtc.o
174lib-$(CONFIG_RTCWAKE) += rtc.o
Denys Vlasenko42a8fd02009-07-11 21:36:13 +0200175
Denys Vlasenkoc9b97502010-08-16 02:49:21 +0200176lib-$(CONFIG_IOSTAT) += get_cpu_count.o
177lib-$(CONFIG_MPSTAT) += get_cpu_count.o
Denys Vlasenko26777aa2010-11-22 23:49:10 +0100178lib-$(CONFIG_POWERTOP) += get_cpu_count.o
Denys Vlasenkoc9b97502010-08-16 02:49:21 +0200179
Baruch Siache8f36332011-09-07 17:52:37 +0200180lib-$(CONFIG_PING) += inet_cksum.o
Denys Vlasenko548620c2016-12-08 12:24:48 +0100181lib-$(CONFIG_PING6) += inet_cksum.o
Baruch Siache8f36332011-09-07 17:52:37 +0200182lib-$(CONFIG_TRACEROUTE) += inet_cksum.o
183lib-$(CONFIG_TRACEROUTE6) += inet_cksum.o
184lib-$(CONFIG_UDHCPC) += inet_cksum.o
Denys Vlasenko8cab6672012-04-20 14:48:00 +0200185lib-$(CONFIG_UDHCPC6) += inet_cksum.o
Baruch Siache8f36332011-09-07 17:52:37 +0200186lib-$(CONFIG_UDHCPD) += inet_cksum.o
Denys Vlasenko9cc3d3a2016-12-23 02:42:26 +0100187lib-$(CONFIG_DHCPRELAY) += inet_cksum.o
Baruch Siache8f36332011-09-07 17:52:37 +0200188
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000189# We shouldn't build xregcomp.c if we don't need it - this ensures we don't
190# require regex.h to be in the include dir even if we don't need it thereby
191# allowing us to build busybox even if uclibc regex support is disabled.
192
193lib-$(CONFIG_AWK) += xregcomp.o
194lib-$(CONFIG_SED) += xregcomp.o
Denis Vlasenko666da5e2006-12-26 18:17:42 +0000195lib-$(CONFIG_GREP) += xregcomp.o
Denys Vlasenko548620c2016-12-08 12:24:48 +0100196lib-$(CONFIG_EGREP) += xregcomp.o
197lib-$(CONFIG_FGREP) += xregcomp.o
Denis Vlasenkod46e6d12007-05-17 12:58:30 +0000198lib-$(CONFIG_EXPR) += xregcomp.o
Denis Vlasenko666da5e2006-12-26 18:17:42 +0000199lib-$(CONFIG_MDEV) += xregcomp.o
Denis Vlasenko4a64c332006-12-30 22:03:02 +0000200lib-$(CONFIG_LESS) += xregcomp.o
Denis Vlasenkoaff3a302007-10-16 23:00:50 +0000201lib-$(CONFIG_PGREP) += xregcomp.o
Denis Vlasenko16e74b72007-10-17 09:59:01 +0000202lib-$(CONFIG_PKILL) += xregcomp.o
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000203lib-$(CONFIG_DEVFSD) += xregcomp.o
Denis Vlasenko4b9b0ce2007-07-01 17:35:17 +0000204lib-$(CONFIG_FEATURE_FIND_REGEX) += xregcomp.o
Denys Vlasenko99e22d22022-01-24 07:07:17 +0100205lib-$(CONFIG_FEATURE_CUT_REGEX) += xregcomp.o
Michel Stamd3fabf82014-11-04 12:19:04 +0100206
207# Add the experimental logging functionality, only used by zcip
208lib-$(CONFIG_ZCIP) += logenv.o