Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Makefile for uClibc's pthread library
  2. #
  3. # Copyright (C) 2002 Erik Andersen <andersen@uclibc.org>
  4. #
  5. # This program is free software; you can redistribute it and/or modify it under
  6. # the terms of the GNU Library General Public License as published by the Free
  7. # Software Foundation; either version 2 of the License, or (at your option) any
  8. # later version.
  9. #
  10. # This program is distributed in the hope that it will be useful, but WITHOUT
  11. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  12. # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Library General Public License
  16. # along with this program; if not, write to the Free Software Foundation, Inc.,
  17. # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. TOPDIR=../
  19. include $(TOPDIR)Rules.mak
  20. ALL_SUBDIRS = linuxthreads linuxthreads_db
  21. DIRS=linuxthreads
  22. ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
  23. DIRS+=linuxthreads_db
  24. endif
  25. all: subdirs
  26. headers:
  27. ifeq ($(strip $(UCLIBC_HAS_THREADS_NATIVE)),y)
  28. $(LN) -sf $(TOPDIR)libpthread/nptl/sysdeps/pthread/pthread.h $(TOPDIR)include/
  29. $(LN) -sf $(TOPDIR)libpthread/nptl/semaphore.h $(TOPDIR)include/
  30. $(LN) -sf ../$(TOPDIR)libpthread/nptl/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/semaphore.h $(TOPDIR)include/bits/
  31. $(LN) -sf ../$(TOPDIR)libpthread/nptl/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/pthreadtypes.h $(TOPDIR)include/bits/
  32. $(LN) -sf ../$(TOPDIR)libpthread/nptl/sysdeps/pthread/bits/libc-lock.h $(TOPDIR)include/bits/
  33. $(LN) -sf ../$(TOPDIR)libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h $(TOPDIR)include/bits/
  34. ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
  35. $(LN) -sf $(TOPDIR)libpthread/nptl_db/thread_db.h $(TOPDIR)include/
  36. endif
  37. else
  38. $(LN) -sf $(TOPDIR)libpthread/linuxthreads/sysdeps/pthread/pthread.h $(TOPDIR)include/
  39. $(LN) -sf $(TOPDIR)libpthread/linuxthreads/semaphore.h $(TOPDIR)include/
  40. $(LN) -sf ../$(TOPDIR)libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h $(TOPDIR)include/bits/
  41. ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
  42. $(LN) -sf $(TOPDIR)libpthread/linuxthreads_db/thread_db.h $(TOPDIR)include/
  43. endif
  44. endif
  45. tags:
  46. ctags -R
  47. subdirs: $(patsubst %, _dir_%, $(DIRS))
  48. subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
  49. $(patsubst %, _dir_%, $(DIRS)) : dummy
  50. $(MAKE) -C $(patsubst _dir_%, %, $@)
  51. $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
  52. $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
  53. clean: subdirs_clean
  54. $(RM) $(TOPDIR)include/pthread.h $(TOPDIR)include/semaphore.h \
  55. $(TOPDIR)include/thread_db.h \
  56. $(TOPDIR)include/bits/pthreadtypes.h $(TOPDIR)include/bits/semaphore.h \
  57. $(TOPDIR)include/bits/libc-lock.h $(TOPDIR)include/bits/stdio-lock
  58. .PHONY: dummy