STRIPTOOL = $(CROSS)strip
# To compile vs uClibc, just use the compiler wrapper built by uClibc...
-# Isn't that easy? Right now, uClibc needs BB_FEATURE_NFSMOUNT disabled
-# since uClibc's nfs support isn't ready yet.
+# This make things very easy? Everything should compile and work as
+# expected these days...
#CC = ../uClibc/extra/gcc-uClibc/gcc-uClibc-i386
# To compile vs some other alternative libc, you may need to use/adjust
# the following lines to meet your needs...
-#LIBCDIR=/usr/i486-linuxlibc1/
+#
+# If you are using Red Hat 6.x with the compatible RPMs (for developing under
+# Red Hat 5.x and glibc 2.0) uncomment the following. Be sure to read about
+# using the compatible RPMs (compat-*) at http://www.redhat.com !
+#LIBCDIR=/usr/i386-glibc20-linux
+#
+# The following is used for libc5 (if you install altgcc and libc5-altdev
+# on a Debian system).
+#LIBCDIR=/usr/i486-linuxlibc1
+#
+# For other libraries, you are on your own...
#LDFLAGS+=-nostdlib
-#LIBRARIES = $(LIBCDIR)/libc.a -lgcc
+#LIBRARIES = $(LIBCDIR)/lib/libc.a -lgcc
#CROSS_CFLAGS+=-nostdinc -I$(LIBCDIR)/include -I$(GCCINCDIR)
#GCCINCDIR = $(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
PWD_GRP = pwd_grp
PWD_GRP_DIR = $(BB_SRC_DIR)$(PWD_GRP)
PWD_LIB = libpwd.a
- LIBRARIES += $(PWD_LIB)
PWD_CSRC=__getpwent.c pwent.c getpwnam.c getpwuid.c putpwent.c getpw.c \
fgetpwent.c __getgrent.c grent.c getgrnam.c getgrgid.c fgetgrent.c \
initgroups.c setgroups.c
busybox: $(PWD_LIB) $(OBJECTS)
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBRARIES)
+ $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBRARIES) $(PWD_LIB)
$(STRIP)
# Without VPATH, rule expands to "/bin/sh busybox.mkll Config.h applets.h"
nfsmount.o cmdedit.o: %.o: %.h
$(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile
- $(CC) $(CFLAGS) -I- -I. $(patsubst %,-I%,$(subst :, ,$(BB_SRC_DIR))) -c $< -o $*.o
+ $(CC) -I- $(CFLAGS) -I. $(patsubst %,-I%,$(subst :, ,$(BB_SRC_DIR))) -c $< -o $*.o
$(PWD_OBJS): %.o: %.c Config.h busybox.h applets.h Makefile
- mkdir -p $(PWD_GRP)
$(CC) $(CFLAGS) $(PWD_CFLAGS) -c $< -o $*.o
-$(PWD_LIB): $(PWD_OBJS)
- $(AR) $(ARFLAGS) $(PWD_LIB) $^
+libpwd.a: $(PWD_OBJS)
+ $(AR) $(ARFLAGS) $@ $^
usage.o: usage.h
- rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \
docs/busybox.pdf docs/busybox.lineo.com/busybox.html
- rm -f multibuild.log Config.h.orig
- - rm -rf docs/busybox _install $(PWD_LIB)
+ - rm -rf docs/busybox _install libpwd.a
- rm -f busybox.links loop.h *~ slist.mk core applet_source_list
- - find -name *.o | xargs rm -f;
+ - find -name \*.o -exec rm -f {} \;
distclean: clean
- rm -f busybox
find busybox-$(VERSION)/ -type d \
-name CVS \
-print \
- | xargs rm -rf; \
+ -exec rm -rf {} \; \
\
find busybox-$(VERSION)/ -type f \
-name .cvsignore \
-print \
- | xargs rm -f; \
+ -exec rm -f {} \; \
\
find busybox-$(VERSION)/ -type f \
-name .\#* \
-print \
- | xargs rm -f; \
+ -exec rm -f {} \; \
\
tar -cvzf busybox-$(VERSION).tar.gz busybox-$(VERSION)/;