Makefile.in 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 += librt
  8. CFLAGS-librt := -DNOT_IN_libc -DIS_IN_librt $(SSP_ALL_CFLAGS)
  9. LDFLAGS-librt.so := $(LDFLAGS)
  10. LIBS-librt.so := $(LIBS)
  11. ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  12. LIBS-librt.so += $(top_builddir)lib/libdl.so $(top_builddir)lib/libpthread.so
  13. endif
  14. librt_FULL_NAME := librt-$(VERSION).so
  15. librt_DIR := $(top_srcdir)librt
  16. librt_OUT := $(top_builddir)librt
  17. ifeq ($(UCLIBC_HAS_REALTIME),y)
  18. ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  19. librt_CSRC := $(filter-out mq_notify.c timer_create.c timer_delete.c \
  20. timer_getoverr.c timer_gettime.c timer_settime.c, \
  21. $(notdir $(wildcard $(librt_DIR)/*.c)))
  22. librt_SSRC := $(wildcard $(librt_DIR)/*.S)
  23. librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_CSRC))
  24. librt_OBJ += $(patsubst $(librt_DIR)/%.S,$(librt_OUT)/%.o,$(librt_SSRC))
  25. else
  26. librt_SRC := $(filter-out clock_nanosleep.c clock_getcpuclockid.c clock_gettime.c, \
  27. $(notdir $(wildcard $(librt_DIR)/*.c)))
  28. librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_SRC))
  29. endif
  30. ASFLAGS-mq_timedreceive.S = -D_LIBC_REENTRANT
  31. ASFLAGS-mq_timedsend.S = -D_LIBC_REENTRANT
  32. ifeq ($(DOPIC),y)
  33. librt-a-y += $(librt_OBJ:.o=.os)
  34. else
  35. librt-a-y += $(librt_OBJ)
  36. endif
  37. librt-so-y += $(librt_OBJ:.o=.oS)
  38. lib-a-y += $(top_builddir)lib/librt.a
  39. lib-so-y += $(top_builddir)lib/librt.so
  40. endif
  41. ifeq ($(DOPIC)$(UCLIBC_HAS_THREADS_NATIVE),yn)
  42. $(top_builddir)lib/librt.so: $(top_builddir)lib/librt.a $(libc.depend)
  43. else
  44. $(top_builddir)lib/librt.so: $(librt_OUT)/librt_so.a $(libc.depend) $(libpthread.depend) $(libdl.depend)
  45. endif
  46. $(call link.so,$(librt_FULL_NAME),$(ABI_VERSION))
  47. $(librt_OUT)/librt_so.a: $(librt-so-y)
  48. $(Q)$(RM) $@
  49. $(do_ar)
  50. $(top_builddir)lib/librt.a: $(librt-a-y) | $(top_builddir)lib
  51. $(Q)$(RM) $@
  52. $(do_ar)
  53. objclean-y += CLEAN_librt
  54. CLEAN_librt:
  55. $(do_rm) $(addprefix $(librt_OUT)/*., o os oS a)