Rewrite by Manuel Novoa III, very compact implimentation.
[oweals/busybox.git] / Makefile
index 58e397cfd619c1967e8d07f48728058a3014781d..36fc4118ff00b00793c733665baabb730bd2eac3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,7 @@ all: busybox busybox.links #doc
 -include .config.cmd
 include $(patsubst %,%/Makefile.in, $(DIRS))
 
-busybox: depend $(libraries-y)
+busybox: .depend $(libraries-y)
        $(CC) $(LDFLAGS) -o $@ $(libraries-y) $(LIBRARIES)
        $(STRIPCMD) $@
 
@@ -203,22 +203,23 @@ check: busybox
 
 clean:
        - $(MAKE) -C tests clean
-       - $(MAKE) -C scripts/config clean
        - rm -f docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \
            docs/busybox.net/BusyBox.html
        - rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \
            docs/busybox.pdf docs/busybox.pod docs/busybox.net/busybox.html \
            docs/busybox _install pod2htm* *.gdb *.elf *~ core
        - rm -f busybox busybox.links libbb/loop.h .config.old .hdepend
-       - rm -f scripts/split-include scripts/mkdep .*config.log
-       - rm -rf include/config include/config.h
+       - rm -f .*config.log
        - find . -name .\*.flags -exec rm -f {} \;   
-       - find . -name .depend -exec rm -f {} \;
        - find . -name \*.o -exec rm -f {} \;
        - find . -name \*.a -exec rm -f {} \;
 
 distclean: clean
+       - rm -f scripts/split-include scripts/mkdep
+       - rm -rf include/config include/config.h
+       - find . -name .depend -exec rm -f {} \;
        rm -f .config .config.old .config.cmd
+       - $(MAKE) -C scripts/config clean
 
 release: distclean #doc
        cd ..;                                  \