aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-08-05 00:41:39 +0000
committerRob Landley <rob@landley.net>2006-08-05 00:41:39 +0000
commitaffb7a61a6576194b5c87635ad87d3b3b9e6575b (patch)
tree6d6c9b3d87542a474ea00a8cd06a20704d69c817
parent59fe8b90890a07c87ec9c2943bae515d5c6d959d (diff)
downloadbusybox-w32-affb7a61a6576194b5c87635ad87d3b3b9e6575b.tar.gz
busybox-w32-affb7a61a6576194b5c87635ad87d3b3b9e6575b.tar.bz2
busybox-w32-affb7a61a6576194b5c87635ad87d3b3b9e6575b.zip
scripts/individual now builds 171 applets. Some of them may even work. :)
-rw-r--r--applets/individual.c1
-rw-r--r--include/applets.h2
-rw-r--r--networking/ether-wake.c2
-rwxr-xr-xscripts/individual30
4 files changed, 31 insertions, 4 deletions
diff --git a/applets/individual.c b/applets/individual.c
index 0af256c6c..c6d263b47 100644
--- a/applets/individual.c
+++ b/applets/individual.c
@@ -9,6 +9,7 @@ const char *bb_applet_name;
9 9
10#include <stdio.h> 10#include <stdio.h>
11#include <stdlib.h> 11#include <stdlib.h>
12#include "bb_config.h"
12#include "usage.h" 13#include "usage.h"
13 14
14int main(int argc, char *argv[]) 15int main(int argc, char *argv[])
diff --git a/include/applets.h b/include/applets.h
index 07f9aabf2..42758a58f 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -105,7 +105,7 @@ USE_ED(APPLET(ed, _BB_DIR_BIN, _BB_SUID_NEVER))
105USE_FEATURE_GREP_EGREP_ALIAS(APPLET_NOUSAGE(egrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER)) 105USE_FEATURE_GREP_EGREP_ALIAS(APPLET_NOUSAGE(egrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER))
106USE_EJECT(APPLET(eject, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 106USE_EJECT(APPLET(eject, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
107USE_ENV(APPLET(env, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 107USE_ENV(APPLET(env, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
108USE_ETHER_WAKE(APPLET_ODDNAME(ether-wake, etherwake, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ether_wake)) 108USE_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ether_wake))
109USE_EXPR(APPLET(expr, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 109USE_EXPR(APPLET(expr, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
110USE_FAKEIDENTD(APPLET(fakeidentd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 110USE_FAKEIDENTD(APPLET(fakeidentd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
111USE_FALSE(APPLET(false, _BB_DIR_BIN, _BB_SUID_NEVER)) 111USE_FALSE(APPLET(false, _BB_DIR_BIN, _BB_SUID_NEVER))
diff --git a/networking/ether-wake.c b/networking/ether-wake.c
index 75f065cdc..f4ca889fa 100644
--- a/networking/ether-wake.c
+++ b/networking/ether-wake.c
@@ -105,7 +105,7 @@ static inline void get_dest_addr(const char *arg, struct ether_addr *eaddr);
105static inline int get_fill(unsigned char *pkt, struct ether_addr *eaddr, int broadcast); 105static inline int get_fill(unsigned char *pkt, struct ether_addr *eaddr, int broadcast);
106static inline int get_wol_pw(const char *ethoptarg, unsigned char *wol_passwd); 106static inline int get_wol_pw(const char *ethoptarg, unsigned char *wol_passwd);
107 107
108int etherwake_main(int argc, char *argv[]) 108int ether_wake_main(int argc, char *argv[])
109{ 109{
110 char *ifname = "eth0", *pass = NULL; 110 char *ifname = "eth0", *pass = NULL;
111 unsigned long flags; 111 unsigned long flags;
diff --git a/scripts/individual b/scripts/individual
index a4e433ca8..8815e1e14 100755
--- a/scripts/individual
+++ b/scripts/individual
@@ -12,21 +12,47 @@ cd libbb
12make 12make
13cd .. 13cd ..
14 14
15cd archival/libunarchive
16make
17cd ../..
18
19# 146 applets build without any extra stuff. The applet is one C file with
20# the same name as the corresponding applet, and all it needs to link against
21# is libbb.a. However, 104 of them need more than that.
22
23# dpkg_deb gzip
24function extra_libraries()
25{
26 archival="ar bunzip2 unlzma cpio dpkg gunzip rpm2cpio rpm tar uncompress unzip dpkg_deb gzip "
27 if [ "${archival/$1 //}" != "${archival}" ]
28 then
29 echo "archival/libunarchive/libunarchive.a"
30 fi
31}
32
33
34
15# Here are a few that build in a standard way. Others are easy to get to 35# Here are a few that build in a standard way. Others are easy to get to
16# build, for example miscutils/dc needs -lm and most of loginutils/* needs 36# build, for example miscutils/dc needs -lm and most of loginutils/* needs
17# -lcrypt... 37# -lcrypt...
18 38
19rm -rf build 39rm -rf build
20mkdir build 40mkdir build
41
21for APPLET in `sed 's .*/ ' busybox.links` 42for APPLET in `sed 's .*/ ' busybox.links`
22do 43do
23 j=`find . -name "$APPLET.c"` 44 APPFILT=${APPLET/-/_}
45 j=`find . -name "${APPLET/-/?}.c"` # Because ether-wake.c is broken.
24 if [ -z "$j" ] 46 if [ -z "$j" ]
25 then 47 then
26 echo no file for $APPLET 48 echo no file for $APPLET
27 else 49 else
28 echo "Building $APPLET..." 50 echo "Building $APPLET..."
29 gcc -Os -o build/$APPLET applets/individual.c $j libbb/libbb.a -Iinclude -DAPPLET_main=${APPLET}_main -DAPPLET_full_usage=${APPLET}_full_usage 51 gcc -Os -o build/$APPLET applets/individual.c $j \
52 `extra_libraries $APPFILT` libbb/libbb.a -Iinclude \
53 -DBUILD_INDIVIDUAL \
54 "-Drun_applet_by_name(...)" "-Dfind_applet_by_name(...) 0" \
55 -DAPPLET_main=${APPFILT}_main -DAPPLET_full_usage=${APPFILT}_full_usage
30 if [ $? -ne 0 ]; 56 if [ $? -ne 0 ];
31 then 57 then
32 echo "Failed." 58 echo "Failed."