Makefile.arch 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Makefile for uClibc NPTL
  2. #
  3. # Copyright (C) 2005 Steven J. Hill <sjhill@uclibc.org>
  4. # Portions Copyright (C) 2006 CodeSourcery
  5. #
  6. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  7. #
  8. libpthread_SSRC = pthread_spin_lock.S pthread_spin_trylock.S aeabi_read_tp.S \
  9. thumb_atomics.S
  10. libpthread_CSRC = aeabi_unwind_cpp_pr1.c
  11. librt_SSRC = aeabi_read_tp.S thumb_atomics.S
  12. librt_CSRC = aeabi_unwind_cpp_pr1.c
  13. libc_a_CSRC =
  14. CFLAGS-pt-raise.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
  15. ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
  16. ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
  17. ASFLAGS-aeabi_read_tp.S = -DNOT_IN_libc=1
  18. CFLAGS-arm = $(SSP_ALL_CFLAGS)
  19. PTHREAD_ARCH_DIR := $(top_srcdir)libpthread/nptl/sysdeps/arm
  20. PTHREAD_ARCH_OUT := $(top_builddir)libpthread/nptl/sysdeps/arm
  21. PTHREAD_ARCH_OBJ := $(patsubst %.S,$(PTHREAD_ARCH_OUT)/%.o,$(libpthread_SSRC))
  22. PTHREAD_ARCH_OBJ += $(patsubst %.c,$(PTHREAD_ARCH_OUT)/%.o,$(libpthread_CSRC))
  23. LIBRT_ARCH_OBJ := $(patsubst %.S,$(PTHREAD_ARCH_OUT)/%.o,$(librt_SSRC))
  24. LIBRT_ARCH_OBJ += $(patsubst %.c,$(PTHREAD_ARCH_OUT)/%.o,$(librt_CSRC))
  25. ifeq ($(DOPIC),y)
  26. libpthread-a-y += $(PTHREAD_ARCH_OBJ:.o=.os)
  27. else
  28. libpthread-a-y += $(PTHREAD_ARCH_OBJ)
  29. endif
  30. libpthread-so-y += $(PTHREAD_ARCH_OBJ:.o=.oS)
  31. librt-a-y += $(LIBRT_ARCH_OBJ)
  32. librt-so-y += $(LIBRT_ARCH_OBJ:.o=.oS)
  33. libpthread-nomulti-y += $(PTHREAD_ARCH_OBJ)
  34. objclean-y += nptl_arch_objclean
  35. headers_clean-y += nptl_arch_headers_clean
  36. #
  37. # Create 'tcb-offsets.h' header file.
  38. #
  39. CFLAGS-tcb-offsets.c = -S
  40. $(PTHREAD_ARCH_OUT)/tcb-offsets.c: $(PTHREAD_ARCH_DIR)/tcb-offsets.sym
  41. $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@
  42. $(PTHREAD_ARCH_OUT)/tcb-offsets.s: $(PTHREAD_ARCH_OUT)/tcb-offsets.c
  43. $(compile.c)
  44. $(PTHREAD_ARCH_OUT)/tcb-offsets.h: $(PTHREAD_ARCH_OUT)/tcb-offsets.s
  45. $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@
  46. pregen-headers-$(UCLIBC_HAS_THREADS_NATIVE) += $(PTHREAD_ARCH_OUT)/tcb-offsets.h
  47. nptl_arch_headers_clean:
  48. $(RM) $(PTHREAD_ARCH_OUT)/tcb-offsets.c \
  49. $(PTHREAD_ARCH_OUT)/tcb-offsets.s \
  50. $(PTHREAD_ARCH_OUT)/tcb-offsets.h
  51. nptl_arch_objclean:
  52. $(RM) $(PTHREAD_ARCH_OUT)/*.{o,os,oS}