Makefile.arch 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. nptl_arch_headers: $(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" $< > $(PTHREAD_ARCH_OUT)/tcb-offsets.h
  46. nptl_arch_headers_clean:
  47. $(RM) $(PTHREAD_ARCH_OUT)/tcb-offsets.c \
  48. $(PTHREAD_ARCH_OUT)/tcb-offsets.s \
  49. $(PTHREAD_ARCH_OUT)/tcb-offsets.h
  50. nptl_arch_objclean:
  51. $(RM) $(PTHREAD_ARCH_OUT)/*.{o,os,oS}