new solution for empty lib dir (old one had some problems)
[musl] / Makefile
index 13a24e3..56bfb40 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -54,6 +54,7 @@ clean:
        rm -f include/bits
 
 include/bits:
+       @test "$(ARCH)" || { echo "Please set ARCH in config.mak before running make." ; exit 1 ; }
        ln -sf ../arch/$(ARCH)/bits $@
 
 include/bits/alltypes.h.sh: include/bits
@@ -83,6 +84,7 @@ lib/libc.a: $(OBJS)
        $(RANLIB) $@
 
 $(EMPTY_LIBS):
+       rm -f $@
        $(AR) rc $@
 
 lib/%.o: crt/%.o