Makefile.in 1.7 KB

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