Makefile.in 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Makefile for uClibc
  2. #
  3. # Licensed under LGPL v2.1, see the file COPYING.LIB in this tarball for details.
  4. #
  5. LIB_NAME:=ld-uClibc
  6. # psm: I do not know if the order of includes is relevant
  7. # to be sure I have put them first
  8. CFLAGS:=-I$(top_srcdir)ldso/include -I. $(CFLAGS) $(PICFLAG) $(SSP_DISABLE_FLAGS)
  9. CFLAGS+=-DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\"
  10. ifeq ($(SUPPORT_LD_DEBUG),y)
  11. CFLAGS+=-D__SUPPORT_LD_DEBUG__
  12. endif
  13. ifeq ($(SUPPORT_LD_DEBUG_EARLY),y)
  14. CFLAGS+=-D__SUPPORT_LD_DEBUG_EARLY__
  15. endif
  16. ifeq ($(DODEBUG),y)
  17. # Not really much point in including debugging info, since gdb
  18. # can't really debug ldso, since gdb requires help from ldso to
  19. # debug things....
  20. # psm: keep this in sync w/ Rules.mak
  21. CFLAGS:=$(CFLAGS:-O0 -g3=-Os -g)
  22. endif
  23. # BEWARE!!! At least mips* will die if -O0 is used!!!
  24. ifeq ($(TARGET_ARCH),mips)
  25. CFLAGS:=$(CFLAGS:-O0=-O1)
  26. endif
  27. # This stuff will not work with -fomit-frame-pointer
  28. CFLAGS:=$(CFLAGS:-fomit-frame-pointer=)
  29. ifeq ($(SUPPORT_LD_DEBUG),y)
  30. LDFLAGS:=$(LDFLAGS_NOSTRIP)
  31. endif
  32. srcdir=$(top_srcdir)ldso/ldso
  33. $(LIB_NAME)_DIR:=$(top_builddir)ldso/ldso
  34. $(LIB_NAME)_SRC:=$(srcdir)/ldso.c
  35. $(LIB_NAME)_SSRC:=$(wildcard $(srcdir)/$(TARGET_ARCH)/*.S)
  36. $(LIB_NAME)_SOBJ:=$(patsubst $(srcdir)/$(TARGET_ARCH)/%.S,$($(LIB_NAME)_DIR)/$(TARGET_ARCH)/%.o,$($(LIB_NAME)_SSRC))
  37. EXTRA_LINK_OPTS:=-e _start -z now -Bsymbolic --export-dynamic --sort-common --discard-locals --discard-all --no-undefined
  38. EXTRA_LINK_LIBS:=$(LIBGCC) # $(LDADD_LIBFLOAT)
  39. libso-$(HAVE_SHARED)+=$(top_builddir)lib/$(LIB_NAME).so
  40. libclean-y+=$(LIB_NAME)_clean $(LIB_NAME)_arch_clean
  41. $(LIB_NAME)_arch_clean:
  42. $(RM) $($(LIB_NAME)_DIR)/*/*.{o,os}
  43. include $(top_srcdir)Makefile.libs