1 # Makefile for uClibc's pthread library
3 # Copyright (C) 2002 Erik Andersen <andersen@uclibc.org>
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
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
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
20 include $(TOPDIR)Rules.mak
22 ALL_SUBDIRS = linuxthreads linuxthreads_db
25 ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
32 ifeq ($(strip $(UCLIBC_HAS_THREADS_NATIVE)),y)
33 $(LN) -sf $(TOPDIR)libpthread/nptl/sysdeps/pthread/pthread.h $(TOPDIR)include/
34 $(LN) -sf $(TOPDIR)libpthread/nptl/semaphore.h $(TOPDIR)include/
35 $(LN) -sf ../$(TOPDIR)libpthread/nptl/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/semaphore.h $(TOPDIR)include/bits/
36 $(LN) -sf ../$(TOPDIR)libpthread/nptl/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/pthreadtypes.h $(TOPDIR)include/bits/
37 $(LN) -sf ../$(TOPDIR)libpthread/nptl/sysdeps/pthread/bits/libc-lock.h $(TOPDIR)include/bits/
38 $(LN) -sf ../$(TOPDIR)libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h $(TOPDIR)include/bits/
39 ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
40 $(LN) -sf $(TOPDIR)libpthread/nptl_db/thread_db.h $(TOPDIR)include/
43 $(LN) -sf $(TOPDIR)libpthread/linuxthreads/sysdeps/pthread/pthread.h $(TOPDIR)include/
44 $(LN) -sf $(TOPDIR)libpthread/linuxthreads/semaphore.h $(TOPDIR)include/
45 $(LN) -sf ../$(TOPDIR)libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h $(TOPDIR)include/bits/
46 ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
47 $(LN) -sf $(TOPDIR)libpthread/linuxthreads_db/thread_db.h $(TOPDIR)include/
54 subdirs: $(patsubst %, _dir_%, $(DIRS))
55 subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
57 $(patsubst %, _dir_%, $(DIRS)) : dummy
58 $(MAKE) -C $(patsubst _dir_%, %, $@)
60 $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
61 $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
64 $(RM) $(TOPDIR)include/pthread.h $(TOPDIR)include/semaphore.h \
65 $(TOPDIR)include/thread_db.h \
66 $(TOPDIR)include/bits/pthreadtypes.h $(TOPDIR)include/bits/semaphore.h \
67 $(TOPDIR)include/bits/libc-lock.h $(TOPDIR)include/bits/stdio-lock