Makefile.in 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 += libutil
  8. CFLAGS-libutil := -DNOT_IN_libc -DIS_IN_libutil $(SSP_ALL_CFLAGS)
  9. LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-libutil.so := -Wl,--dsbt-index=8
  10. LDFLAGS-libutil.so := $(LDFLAGS)
  11. LIBS-libutil.so := $(LIBS)
  12. libutil_FULL_NAME := libutil-$(VERSION).so
  13. libutil_DIR := $(top_srcdir)libutil
  14. libutil_OUT := $(top_builddir)libutil
  15. libutil_SRC := $(wildcard $(libutil_DIR)/*.c)
  16. ifneq ($(ARCH_USE_MMU),y)
  17. libutil_SRC := $(filter-out $(libutil_DIR)/forkpty.c,$(libutil_SRC))
  18. endif
  19. ifneq ($(UCLIBC_HAS_PTY),y)
  20. libutil_SRC := $(filter-out $(libutil_DIR)/openpty.c $(libutil_DIR)/forkpty.c \
  21. ,$(libutil_SRC))
  22. endif
  23. libutil_OBJ := $(patsubst $(libutil_DIR)/%.c,$(libutil_OUT)/%.o,$(libutil_SRC))
  24. ifeq ($(DOPIC),y)
  25. libutil-a-y := $(libutil_OBJ:.o=.os)
  26. else
  27. libutil-a-y := $(libutil_OBJ)
  28. endif
  29. libutil-so-y := $(libutil_OBJ:.o=.os)
  30. lib-a-$(UCLIBC_HAS_LIBUTIL) += $(top_builddir)lib/libutil.a
  31. lib-so-$(UCLIBC_HAS_LIBUTIL) += $(top_builddir)lib/libutil.so
  32. objclean-y += CLEAN_libutil
  33. ifeq ($(DOMULTI),n)
  34. ifeq ($(DOPIC),y)
  35. $(top_builddir)lib/libutil.so: $(top_builddir)lib/libutil.a $(libc.depend)
  36. else
  37. $(top_builddir)lib/libutil.so: $(libutil_OUT)/libutil_so.a $(libc.depend)
  38. endif
  39. $(call link.so,$(libutil_FULL_NAME),$(ABI_VERSION))
  40. else
  41. $(top_builddir)lib/libutil.so: $(libutil_OUT)/libutil.oS | $(libc.depend)
  42. $(call linkm.so,$(libutil_FULL_NAME),$(ABI_VERSION))
  43. endif
  44. $(libutil_OUT)/libutil_so.a: $(libutil-so-y)
  45. $(Q)$(RM) $@
  46. $(do_ar)
  47. $(libutil_OUT)/libutil.oS: $(libutil_SRC)
  48. $(Q)$(RM) $@
  49. $(compile-m)
  50. $(top_builddir)lib/libutil.a: $(libutil-a-y)
  51. $(Q)$(INSTALL) -d $(dir $@)
  52. $(Q)$(RM) $@
  53. $(do_ar)
  54. CLEAN_libutil:
  55. $(do_rm) $(addprefix $(libutil_OUT)/*., o os oS a)