Makefile 711 B

123456789101112131415161718192021222324252627282930
  1. TOPDIR=../../
  2. include $(TOPDIR)/ld.so-1/Rules.mak
  3. DIRS = $(TARGET_ARCH)
  4. CFLAGS += -DNO_UNDERSCORE -DVERBOSE_DLINKER
  5. CFLAGS += -DUSE_CACHE -fPIC -D__PIC__ #-funroll-loops
  6. CSRC= boot1.c hash.c readelflib1.c vsprintf.c
  7. COBJS=$(patsubst %.c,%.o, $(CSRC))
  8. OBJS=$(COBJS)
  9. ELF_LDFLAGS=--shared # using GNU ld
  10. all: lib
  11. lib:: $(OBJS)
  12. $(LD) -e _dl_boot $(ELF_LDFLAGS) -o $(DLINKER).$(LDSO_VMAJOR) \
  13. -soname $(DLINKER).$(LDSO_VMAJOR) *.o
  14. $(COBJS): %.o : %.c
  15. $(CC) -I. -I./$(TARGET_ARCH) -I../libdl $(CFLAGS) -c $< -o $@
  16. $(STRIPTOOL) -x -R .note -R .comment $*.o
  17. realclean::
  18. $(RM) -f .depend $(DLINKER) core *.o *.a *.s *.i tmp_make foo *~
  19. clean::
  20. $(RM) -f $(DLINKER)* core *.o *.a *.s *.i tmp_make foo *~