Whitespace / formatting / bracket cleanup.
[oweals/busybox.git] / Makefile
index 81048972380ab67a9e3cb6f5e3503dcacd747974..239f3cf0284eeed8fe56de6119a6ab530fbd23a6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -88,7 +88,17 @@ STRIPTOOL = $(CROSS)strip
 
 # To compile vs some other alternative libc, you may need to use/adjust
 # the following lines to meet your needs...
+#
+# 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)/lib/libc.a -lgcc
 #CROSS_CFLAGS+=-nostdinc -I$(LIBCDIR)/include -I$(GCCINCDIR)
@@ -202,7 +212,6 @@ ifneq ($(strip $(USE_SYSTEM_PWD_GRP)),true)
     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
@@ -280,7 +289,7 @@ docs/busybox/busyboxdocumentation.html: docs/busybox.sgml
 
 
 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"
@@ -297,8 +306,8 @@ $(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
 
@@ -317,7 +326,7 @@ clean:
        - 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 -exec rm -f {} \;