OSDN Git Service

All Makefile.in's. Only arm/i386/mips/powerpc/x86_64 are done, the other archs lack...
[uclinux-h8/uClibc.git] / libpthread / Makefile.in
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
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
17 headers-y+=threads_headers
18
19 # NPTL does not have a generic pthreadtypes.h
20 # and each arch has to have both semaphore.h/pthreadtypes.h ?
21 threads_headers:
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/
26 endif
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/
32 else
33         $(LN) -sf ../$(PTDIR)/sysdeps/pthread/bits/pthreadtypes.h $(top_builddir)include/bits/
34 endif
35
36 headers_clean-y+=threads_headers_clean
37
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
46 endif
47
48 objclean-y+=libpthread_gen_clean
49
50 libpthread_gen_clean:
51         $(RM) $(top_builddir)libpthread/*/*.{o,os,a}
52
53 ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
54 subdirs: $(patsubst %, _dir_%, $(DIRS))
55 $(patsubst %, _dir_%, $(DIRS)):
56         $(MAKE) -C $(patsubst _dir_%, %, $@)
57 endif