blob: a4e433ca837be3d58907019ed902f0ba5839a5f2 [file] [log] [blame]
Rob Landleycb376ee2006-08-04 21:05:33 +00001#!/bin/sh
2
3# Make our prerequisites.
4
5make busybox.links include/bb_config.h
6
7# Adding "libbb/libbb.a" to the previous line doesn't work, nor does going
8# "make libbb.a" in the libb directory. The busybox makefile has layers and
9# layers of overcomplicated brokenness...
10
11cd libbb
12make
13cd ..
14
15# 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
17# -lcrypt...
18
19rm -rf build
20mkdir build
21for APPLET in `sed 's .*/ ' busybox.links`
22do
23 j=`find . -name "$APPLET.c"`
24 if [ -z "$j" ]
25 then
26 echo no file for $APPLET
27 else
28 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
30 if [ $? -ne 0 ];
31 then
32 echo "Failed."
33 fi
34 fi
35done
36
37strip build/*