Makefile.in 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 ($(PTHREADS_DEBUG_SUPPORT),y)
  8. DIRS:= $(PTNAME) $(PTNAME)_db
  9. libs: subdirs
  10. else
  11. # both do not work at once
  12. include $(PTDIR)/Makefile.in
  13. #include $(PTDIR)_db/Makefile.in
  14. endif
  15. headers-y+=threads_headers
  16. # NPTL does not have a generic pthreadtypes.h
  17. # and each arch has to have both semaphore.h/pthreadtypes.h ?
  18. threads_headers:
  19. $(LN) -sf $(PTDIR)/sysdeps/pthread/pthread.h $(top_builddir)include/
  20. $(LN) -sf $(PTDIR)/semaphore.h $(top_builddir)include/
  21. ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
  22. $(LN) -sf $(PTDIR)_db/thread_db.h $(top_builddir)include/
  23. endif
  24. ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  25. $(LN) -sf ../$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/semaphore.h $(top_builddir)include/bits/
  26. $(LN) -sf ../$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/pthreadtypes.h $(top_builddir)include/bits/
  27. $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/libc-lock.h $(top_builddir)include/bits/
  28. $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/stdio-lock.h $(top_builddir)include/bits/
  29. else
  30. $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/pthreadtypes.h $(top_builddir)include/bits/
  31. endif
  32. headers_clean-y+=threads_headers_clean
  33. threads_headers_clean:
  34. $(RM) $(top_builddir)include/pthread.h $(top_builddir)include/semaphore.h \
  35. $(top_builddir)include/thread_db.h \
  36. $(top_builddir)include/bits/pthreadtypes.h $(top_builddir)include/bits/semaphore.h \
  37. $(top_builddir)include/bits/libc-lock.h $(top_builddir)include/bits/stdio-lock
  38. ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  39. $(RM) $(PTNAME)/version.h $(PTDIR)/banner.h \
  40. $(PTDIR)/sysdeps/unix/sysv/linux/rtld-libc-lowlevellock.c
  41. endif
  42. objclean-y+=libpthread_gen_clean
  43. libpthread_gen_clean:
  44. $(RM) $(top_builddir)libpthread/*/*.{o,os,a}
  45. ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
  46. subdirs: $(patsubst %, _dir_%, $(DIRS))
  47. $(patsubst %, _dir_%, $(DIRS)):
  48. $(MAKE) -C $(patsubst _dir_%, %, $@)
  49. endif