new solution for empty lib dir (old one had some problems)

This commit is contained in:
Rich Felker 2011-02-17 17:12:52 -05:00
parent a36164c474
commit 4fd159568a
2 changed files with 5 additions and 7 deletions

View File

@ -74,22 +74,20 @@ include/bits/alltypes.h: include/bits/alltypes.h.sh
%.lo: %.c $(GENH) %.lo: %.c $(GENH)
$(CC) $(CFLAGS) $(INC) $(PIC) -c -o $@ $< $(CC) $(CFLAGS) $(INC) $(PIC) -c -o $@ $<
lib: lib/libc.so: $(LOBJS)
mkdir -p lib
lib/libc.so: $(LOBJS) lib
$(CC) $(LDFLAGS) -o $@ $(LOBJS) -lgcc $(CC) $(LDFLAGS) -o $@ $(LOBJS) -lgcc
$(OBJCOPY) --weaken $@ $(OBJCOPY) --weaken $@
lib/libc.a: $(OBJS) lib lib/libc.a: $(OBJS)
rm -f $@ rm -f $@
$(AR) rc $@ $(OBJS) $(AR) rc $@ $(OBJS)
$(RANLIB) $@ $(RANLIB) $@
$(EMPTY_LIBS): lib $(EMPTY_LIBS):
rm -f $@
$(AR) rc $@ $(AR) rc $@
lib/%.o: crt/%.o lib lib/%.o: crt/%.o
cp $< $@ cp $< $@
tools/musl-gcc: tools/gen-musl-gcc.sh config.mak tools/musl-gcc: tools/gen-musl-gcc.sh config.mak

0
lib/empty Normal file
View File