Makefile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. TOPDIR=../../
  2. include $(TOPDIR)Rules.mak
  3. all: ldconfig ldd readelf
  4. readsoname.o: readsoname.c readsoname2.c
  5. $(TARGET_CC) $(TARGET_CFLAGS) -c $< -o $@
  6. $(STRIPTOOL) -x -R .note -R .comment $*.o
  7. ldconfig.o: ldconfig.c
  8. $(TARGET_CC) $(TARGET_CFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \
  9. -c $< -o $@
  10. $(STRIPTOOL) -x -R .note -R .comment $*.o
  11. readelf: readelf.c
  12. $(TARGET_CC) $(TARGET_CFLAGS) -static readelf.c -o $@
  13. $(STRIPTOOL) -x -R .note -R .comment $@
  14. ifeq ($(strip $(LIBRARY_CACHE)),)
  15. ldconfig:
  16. echo "LIBRARY_CACHE disabled -- not building ldconfig"
  17. else
  18. ldconfig: ldconfig.o readsoname.o
  19. $(TARGET_CC) $(TARGET_CFLAGS) -static $^ -o $@
  20. $(STRIPTOOL) -x -R .note -R .comment $@
  21. endif
  22. ldd: ldd.c
  23. $(TARGET_CC) $(TARGET_CFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \
  24. -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \
  25. -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR); pwd)\" \
  26. -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \
  27. -static ldd.c -o $@
  28. $(STRIPTOOL) -x -R .note -R .comment $@
  29. clean:
  30. rm -f ldconfig ldd readelf *.o *~ core