Makefile.in 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
  4. #
  5. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. #
  7. subdirs += libc/misc/internals
  8. CSRC-y := tempname.c errno.c h_errno.c __errno_location.c __h_errno_location.c \
  9. parse_config.c version.c
  10. MISC_INTERNALS_DIR := $(top_srcdir)libc/misc/internals
  11. MISC_INTERNALS_OUT := $(top_builddir)libc/misc/internals
  12. MISC_INTERNALS_SRC := $(patsubst %.c,$(MISC_INTERNALS_DIR)/%.c,$(CSRC-y))
  13. MISC_INTERNALS_OBJ := $(patsubst %.c,$(MISC_INTERNALS_OUT)/%.o,$(CSRC-y))
  14. CFLAGS-__uClibc_main.c := $(SSP_DISABLE_FLAGS)
  15. CFLAGS-reloc_static_pie.c := $(SSP_DISABLE_FLAGS) -DL_rcrt1
  16. libc-y += $(MISC_INTERNALS_OBJ)
  17. ifneq ($(UCLIBC_FORMAT_SHARED_FLAT),y)
  18. libc-shared-y += $(MISC_INTERNALS_OUT)/__uClibc_main.oS
  19. else
  20. libc-shared-y += $(MISC_INTERNALS_OUT)/__uClibc_main.os
  21. endif
  22. # link order is important to not pull in pthread functions, when
  23. # a single threaded application is statically linked
  24. libc-static-y := $(MISC_INTERNALS_OUT)/__uClibc_main.o $(libc-static-y)
  25. libc-static-$(UCLIBC_FORMAT_FLAT_SEP_DATA) += \
  26. $(MISC_INTERNALS_OUT)/shared_flat_initfini.o \
  27. $(MISC_INTERNALS_OUT)/shared_flat_add_library.o
  28. libc-static-$(UCLIBC_FORMAT_SHARED_FLAT) += \
  29. $(MISC_INTERNALS_OUT)/shared_flat_initfini.o \
  30. $(MISC_INTERNALS_OUT)/shared_flat_add_library.o
  31. libc-static-$(STATIC_PIE) += $(MISC_INTERNALS_OUT)/reloc_static_pie.o
  32. libc-shared-$(UCLIBC_FORMAT_SHARED_FLAT) += \
  33. $(MISC_INTERNALS_OUT)/shared_flat_initfini.os \
  34. $(MISC_INTERNALS_OUT)/shared_flat_add_library.os
  35. libc-nomulti-y += $(MISC_INTERNALS_OUT)/__uClibc_main.o
  36. objclean-y += CLEAN_libc/misc/internals
  37. CLEAN_libc/misc/internals:
  38. $(do_rm) $(addprefix $(MISC_INTERNALS_OUT)/*., o os oS)