Makefile.in 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. ifeq ($(UCLIBC_HAS_UTMP)$(UCLIBC_HAS_UTMPX),)
  24. libutil_SRC := $(filter-out \
  25. $(libutil_DIR)/logwtmp.c \
  26. $(libutil_DIR)/login.c \
  27. $(libutil_DIR)/logout.c \
  28. ,$(libutil_SRC))
  29. endif
  30. libutil_OBJ := $(patsubst $(libutil_DIR)/%.c,$(libutil_OUT)/%.o,$(libutil_SRC))
  31. ifeq ($(DOPIC),y)
  32. libutil-a-y := $(libutil_OBJ:.o=.os)
  33. else
  34. libutil-a-y := $(libutil_OBJ)
  35. endif
  36. libutil-so-y := $(libutil_OBJ:.o=.os)
  37. lib-a-$(UCLIBC_HAS_LIBUTIL) += $(top_builddir)lib/libutil.a
  38. lib-so-$(UCLIBC_HAS_LIBUTIL) += $(top_builddir)lib/libutil.so
  39. objclean-y += CLEAN_libutil
  40. ifeq ($(DOMULTI),n)
  41. ifeq ($(DOPIC),y)
  42. $(top_builddir)lib/libutil.so: $(top_builddir)lib/libutil.a $(libc.depend)
  43. else
  44. $(top_builddir)lib/libutil.so: $(libutil_OUT)/libutil_so.a $(libc.depend)
  45. endif
  46. $(call link.so,$(libutil_FULL_NAME),$(ABI_VERSION))
  47. else
  48. $(top_builddir)lib/libutil.so: $(libutil_OUT)/libutil.oS | $(libc.depend)
  49. $(call linkm.so,$(libutil_FULL_NAME),$(ABI_VERSION))
  50. endif
  51. $(libutil_OUT)/libutil_so.a: $(libutil-so-y)
  52. $(Q)$(RM) $@
  53. $(do_ar)
  54. $(libutil_OUT)/libutil.oS: $(libutil_SRC)
  55. $(Q)$(RM) $@
  56. $(compile-m)
  57. $(top_builddir)lib/libutil.a: $(libutil-a-y)
  58. $(Q)$(INSTALL) -d $(dir $@)
  59. $(Q)$(RM) $@
  60. $(do_ar)
  61. CLEAN_libutil:
  62. $(do_rm) $(addprefix $(libutil_OUT)/*., o os oS a)