1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
#
# Makefile for the Linux C library
#
TOPDIR=.
include $(TOPDIR)/Makeconfig
ifeq ($(NYS),true)
NYS_DIR_SUFFIX=-nys
endif
#
ifeq ($(OLD_GCC),true)
LIBGCC=gcc
endif
DEPEND_DIRS= assert bsd cvt ctype des dirent \
grp inet io libio locale login malloc math misc \
mntent netgroup posix pwd regex rpc setjmp signal stdlib \
string sysdeps time ufc libbsd \
$(LIBGCC) $(MALLOC) $(YPDIR) $(NLSDIR)
CLEAN_DIRS= assert bsd cvt ctype des dirent \
grp inet io libio locale login malloc math misc \
mntent netgroup posix pwd regex rpc setjmp signal stdlib \
string sysdeps time ufc libbsd \
$(LIBGCC) $(MALLOC) $(YPDIR) $(NLSDIR) sbin
ifeq ($(CHECKER),true)
DIRS= assert bsd cvt ctype des dirent grp inet io \
libio locale login math misc mntent netgroup posix pwd regex \
rpc setjmp signal stdlib string sysdeps termcap time ufc \
libbsd $(LIBGCC) $(MALLOC) $(YPDIR) $(NLSDIR)
else
ifeq ($(ELF),true)
DIRS= assert bsd cvt ctype des dirent grp inet io libbsd libio \
locale login \
math misc mntent netgroup posix pwd regex rpc setjmp signal \
stdlib string sysdeps time ufc malloc $(LIBGCC) $(MALLOC) \
$(YPDIR) $(NLSDIR) elf
else
ifeq ($(MATH),true)
DIRS= math sysdeps
else
DIRS= assert bsd cvt ctype des dirent grp inet io \
libio locale login malloc math misc mntent netgroup posix \
pwd regex rpc setjmp signal stdlib string sysdeps \
time ufc libbsd $(LIBGCC) $(MALLOC) $(YPDIR) $(NLSDIR)
endif
endif
endif
all: lib
doone:
set -e; $(MAKE) -C $(THEDIR) lib
lib:
set -e; for i in $(DIRS); do \
echo making $@ in $$i; \
$(MAKE) -C $$i $@; \
done
depend:
set -e; for i in $(DEPEND_DIRS); do \
echo making $@ in $$i; \
$(MAKE) -C $$i $@; \
done
clean realclean:
$(RM) -f core *.o *.s *.sa *.so.* *.a verify.out
$(RM) -rf $(OBJS_DIRS)
for i in $(CLEAN_DIRS); do \
echo making $@ in $$i; \
$(MAKE) -C $$i $@; \
done
install: install.elf
install.elf:
$(MAKE) -C elf install ELF=true
$(MAKE) install.elf.real ELF=true
install.elf.real:
if [ ! -d $(TARGET_ELF_LIB_DIR) ]; then \
$(RM) -f $(TARGET_ELF_LIB_DIR); \
$(MKDIR) $(TARGET_ELF_LIB_DIR); \
else true; fi
if [ ! -d $(TARGET_ELF_LIBEXTRA_DIR) ]; then \
$(RM) -f $(TARGET_ELF_LIBEXTRA_DIR); \
$(MKDIR) $(TARGET_ELF_LIBEXTRA_DIR); \
else true; fi
cp $(ELF_STATIC_DIR)/lib*.a $(TARGET_ELF_LIB_DIR)
for l in $(ELF_STATIC_DIR)/lib*.a; do \
$(REALRANLIB) $(TARGET_ELF_LIB_DIR)/`basename $$l`; \
done
cp $(ELF_DEBUG_DIR)/lib*.a $(ELF_PROFILE_DIR)/lib*.a \
$(ELF_PROFILE_DIR)/*.o $(TARGET_ELF_LIBEXTRA_DIR)
for l in $(ELF_DEBUG_DIR)/lib*.a $(ELF_PROFILE_DIR)/lib*.a; do \
$(REALRANLIB) $(TARGET_ELF_LIBEXTRA_DIR)/`basename $$l`; \
done
cp $(ELF_DEBUG_DIR)/libc$(NYS_DIR_SUFFIX)/mcheck-init.o \
$(TARGET_ELF_LIBEXTRA_DIR)/libmcheck.a
exit 0 || (cd $(TARGET_ELF_LIB_DIR); \
rm -f libdbm.a libcurses.a libtermcap.a; \
ln -s libncurses.a libcurses.a; \
ln -s libncurses.a libtermcap.a; \
ln -s libgdbm.a libdbm.a)
install.checker:
(cd checker; $(MAKE) install)
|