Makefile 750 B

1234567891011121314151617181920212223242526272829303132
  1. TOPDIR=../../
  2. include $(TOPDIR)/ld.so-1/Rules.mak
  3. CFLAGS += -DNO_UNDERSCORE -DVERBOSE_DLINKER -DUSE_CACHE
  4. CFLAGS += #-fPIC -D__PIC__ #-funroll-loops
  5. CSRC= dlib.c
  6. COBJS=$(patsubst %.c,%.o, $(CSRC))
  7. OBJS=$(COBJS)
  8. all: lib
  9. $(COBJS): %.o : %.c
  10. $(CC) -I../d-link -I../d-link/$(TARGET_ARCH) $(CFLAGS) -c $< -o $@
  11. $(STRIPTOOL) -x -R .note -R .comment $*.o
  12. ELF_LDFLAGS=--shared -nostartfiles -nostdlib # using GNU ld
  13. #ELF_LDFLAGS=-G # with SVr4 ld
  14. lib:: $(OBJS)
  15. $(CC) $(ELF_LDFLAGS) \
  16. -o $(LIBDL).$(LDSO_VMAJOR) -Wl,-soname -Wl,$(LIBDL).$(LDSO_VMAJOR) \
  17. *.o $(TOPDIR)$(SHARED_FULLNAME)
  18. obj: $(OBJS)
  19. realclean::
  20. $(RM) -f .depend $(LIBDL) core *.o *.a *.s *.i tmp_make foo *~
  21. clean::
  22. $(RM) -f $(LIBDL)* core *.o *.a *.s *.i tmp_make foo *~