Makefile.in 2.0 KB

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