Makefile.arch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Makefile for uClibc NPTL
  2. #
  3. # Copyright (C) 2005 Steven J. Hill <sjhill@uclibc.org>
  4. #
  5. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. #
  7. libpthread_SSRC = pthread_spin_lock.S pthread_spin_trylock.S \
  8. nptl-sysdep.S
  9. libc_a_CSRC = libc-tls.c
  10. CFLAGS-pt-raise.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
  11. ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
  12. ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
  13. ASFLAGS-nptl-sysdep.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 \
  14. -I$(top_srcdir)libc/sysdeps/linux/mips
  15. CFLAGS-mips = $(SSP_ALL_CFLAGS)
  16. #CFLAGS:=$(CFLAGS:-O1=-O2)
  17. PTHREAD_ARCH_DIR := $(top_srcdir)libpthread/nptl/sysdeps/mips
  18. PTHREAD_ARCH_OUT := $(top_builddir)libpthread/nptl/sysdeps/mips
  19. PTHREAD_ARCH_OBJ := $(patsubst %.S,$(PTHREAD_ARCH_OUT)/%.o,$(libpthread_SSRC))
  20. ifeq ($(DOPIC),y)
  21. libpthread-a-y += $(PTHREAD_ARCH_OBJ:.o=.os)
  22. else
  23. libpthread-a-y += $(PTHREAD_ARCH_OBJ)
  24. endif
  25. libpthread-so-y += $(PTHREAD_ARCH_OBJ:.o=.oS)
  26. libpthread-nomulti-y += $(PTHREAD_ARCH_OBJ)
  27. LIBC_ARCH_OBJ := $(patsubst %.c,$(PTHREAD_ARCH_OUT)/%.o,$(libc_a_CSRC))
  28. libc-static-y += $(LIBC_ARCH_OBJ)
  29. libc-nomulti-y += $(LIBC_ARCH_OBJ)
  30. objclean-y += nptl_arch_objclean
  31. headers_clean-y += nptl_arch_headers_clean
  32. #
  33. # Create 'tcb-offsets.h' header file.
  34. #
  35. CFLAGS-tcb-offsets.c = -S
  36. $(PTHREAD_ARCH_OUT)/tcb-offsets.c: $(PTHREAD_ARCH_DIR)/tcb-offsets.sym
  37. awk -f $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@
  38. $(PTHREAD_ARCH_OUT)/tcb-offsets.s: $(PTHREAD_ARCH_OUT)/tcb-offsets.c
  39. $(compile.c)
  40. $(PTHREAD_ARCH_OUT)/tcb-offsets.h: $(PTHREAD_ARCH_OUT)/tcb-offsets.s
  41. $(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
  42. nptl_arch_headers := $(PTHREAD_ARCH_OUT)/tcb-offsets.h
  43. nptl_arch_headers_clean:
  44. $(RM) $(PTHREAD_ARCH_OUT)/tcb-offsets.c \
  45. $(PTHREAD_ARCH_OUT)/tcb-offsets.s \
  46. $(PTHREAD_ARCH_OUT)/tcb-offsets.h
  47. nptl_arch_objclean:
  48. $(RM) $(PTHREAD_ARCH_OUT)/*.{o,os,oS}