3 # Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
5 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
9 DIRS:= $(PTNAME) $(PTNAME)_db
12 # both do not work at once
13 include $(PTDIR)/Makefile.in
14 #include $(PTDIR)_db/Makefile.in
17 headers-y+=threads_headers
19 # NPTL does not have a generic pthreadtypes.h
20 # and each arch has to have both semaphore.h/pthreadtypes.h ?
22 $(LN) -sf $(PTDIR)/sysdeps/pthread/pthread.h $(top_builddir)include/
23 $(LN) -sf $(PTDIR)/semaphore.h $(top_builddir)include/
24 ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
25 $(LN) -sf $(PTDIR)_db/thread_db.h $(top_builddir)include/
27 ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
28 $(LN) -sf ../$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/semaphore.h $(top_builddir)include/bits/
29 $(LN) -sf ../$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/pthreadtypes.h $(top_builddir)include/bits/
30 $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/libc-lock.h $(top_builddir)include/bits/
31 $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/stdio-lock.h $(top_builddir)include/bits/
33 $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/pthreadtypes.h $(top_builddir)include/bits/
36 headers_clean-y+=threads_headers_clean
38 threads_headers_clean:
39 $(RM) $(top_builddir)include/pthread.h $(top_builddir)include/semaphore.h \
40 $(top_builddir)include/thread_db.h \
41 $(top_builddir)include/bits/pthreadtypes.h $(top_builddir)include/bits/semaphore.h \
42 $(top_builddir)include/bits/libc-lock.h $(top_builddir)include/bits/stdio-lock
43 ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
44 $(RM) $(PTNAME)/version.h $(PTDIR)/banner.h \
45 $(PTDIR)/sysdeps/unix/sysv/linux/rtld-libc-lowlevellock.c
48 objclean-y+=libpthread_gen_clean
51 $(RM) $(top_builddir)libpthread/*/*.{o,os,a}
53 ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
54 subdirs: $(patsubst %, _dir_%, $(DIRS))
55 $(patsubst %, _dir_%, $(DIRS)):
56 $(MAKE) -C $(patsubst _dir_%, %, $@)