diff options
author | Rob Landley | 2006-08-05 00:41:39 +0000 |
---|---|---|
committer | Rob Landley | 2006-08-05 00:41:39 +0000 |
commit | affb7a61a6576194b5c87635ad87d3b3b9e6575b (patch) | |
tree | 6d6c9b3d87542a474ea00a8cd06a20704d69c817 /scripts/individual | |
parent | 59fe8b90890a07c87ec9c2943bae515d5c6d959d (diff) | |
download | busybox-affb7a61a6576194b5c87635ad87d3b3b9e6575b.zip busybox-affb7a61a6576194b5c87635ad87d3b3b9e6575b.tar.gz |
scripts/individual now builds 171 applets. Some of them may even work. :)
Diffstat (limited to 'scripts/individual')
-rwxr-xr-x | scripts/individual | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/scripts/individual b/scripts/individual index a4e433c..8815e1e 100755 --- a/scripts/individual +++ b/scripts/individual @@ -12,21 +12,47 @@ cd libbb make cd .. +cd archival/libunarchive +make +cd ../.. + +# 146 applets build without any extra stuff. The applet is one C file with +# the same name as the corresponding applet, and all it needs to link against +# is libbb.a. However, 104 of them need more than that. + +# dpkg_deb gzip +function extra_libraries() +{ + archival="ar bunzip2 unlzma cpio dpkg gunzip rpm2cpio rpm tar uncompress unzip dpkg_deb gzip " + if [ "${archival/$1 //}" != "${archival}" ] + then + echo "archival/libunarchive/libunarchive.a" + fi +} + + + # Here are a few that build in a standard way. Others are easy to get to # build, for example miscutils/dc needs -lm and most of loginutils/* needs # -lcrypt... rm -rf build mkdir build + for APPLET in `sed 's .*/ ' busybox.links` do - j=`find . -name "$APPLET.c"` + APPFILT=${APPLET/-/_} + j=`find . -name "${APPLET/-/?}.c"` # Because ether-wake.c is broken. if [ -z "$j" ] then echo no file for $APPLET else echo "Building $APPLET..." - gcc -Os -o build/$APPLET applets/individual.c $j libbb/libbb.a -Iinclude -DAPPLET_main=${APPLET}_main -DAPPLET_full_usage=${APPLET}_full_usage + gcc -Os -o build/$APPLET applets/individual.c $j \ + `extra_libraries $APPFILT` libbb/libbb.a -Iinclude \ + -DBUILD_INDIVIDUAL \ + "-Drun_applet_by_name(...)" "-Dfind_applet_by_name(...) 0" \ + -DAPPLET_main=${APPFILT}_main -DAPPLET_full_usage=${APPFILT}_full_usage if [ $? -ne 0 ]; then echo "Failed." |