Makefile.in 1.7 KB

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