Makefile.in 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  4. #
  5. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. #
  7. ifeq ($(UCLIBC_HAS_THREADS),y)
  8. ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
  9. DIRS:= $(PTNAME) $(PTNAME)_db
  10. libs: subdirs
  11. else
  12. # both do not work at once
  13. include $(PTDIR)/Makefile.in
  14. #include $(PTDIR)_db/Makefile.in
  15. endif
  16. headers-y+=threads_headers
  17. # NPTL does not have a generic pthreadtypes.h
  18. # and each arch has to have both semaphore.h/pthreadtypes.h ?
  19. threads_headers:
  20. $(LN) -sf $(PTDIR)/sysdeps/pthread/pthread.h $(top_builddir)include/
  21. $(LN) -sf $(PTDIR)/semaphore.h $(top_builddir)include/
  22. ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
  23. $(LN) -sf $(PTDIR)_db/thread_db.h $(top_builddir)include/
  24. endif
  25. ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  26. $(LN) -sf ../$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/semaphore.h $(top_builddir)include/bits/
  27. $(LN) -sf ../$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/pthreadtypes.h $(top_builddir)include/bits/
  28. $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/libc-lock.h $(top_builddir)include/bits/
  29. $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/stdio-lock.h $(top_builddir)include/bits/
  30. else
  31. $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/pthreadtypes.h $(top_builddir)include/bits/
  32. endif
  33. endif
  34. headers_clean-y+=threads_headers_clean
  35. threads_headers_clean:
  36. $(RM) $(top_builddir)include/pthread.h $(top_builddir)include/semaphore.h \
  37. $(top_builddir)include/thread_db.h \
  38. $(top_builddir)include/bits/pthreadtypes.h $(top_builddir)include/bits/semaphore.h \
  39. $(top_builddir)include/bits/libc-lock.h $(top_builddir)include/bits/stdio-lock
  40. # note to sjhill: the clean target shouldn't depend on PTNAME/PTDIR
  41. ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  42. $(RM) $(PTNAME)/version.h $(PTDIR)/banner.h \
  43. $(PTDIR)/sysdeps/unix/sysv/linux/rtld-libc-lowlevellock.c
  44. endif
  45. objclean-y+=libpthread_gen_clean
  46. libpthread_gen_clean:
  47. $(RM) $(top_builddir)libpthread/*/*.{o,os,a}
  48. ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
  49. subdirs: $(patsubst %, _dir_%, $(DIRS))
  50. $(patsubst %, _dir_%, $(DIRS)):
  51. $(MAKE) -C $(patsubst _dir_%, %, $@)
  52. endif