summaryrefslogtreecommitdiff
path: root/libpthread
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-08-17 19:17:00 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-08-17 19:17:00 +0200
commit49d8a0e9c6e32701c7eca91a1204237d3a334e38 (patch)
tree500e0c09a66970494dffbfe3a36f958762d22f99 /libpthread
parent7f779e7937cca133ea5f2d18c154c6564516fd9f (diff)
support building out-of-tree
Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libpthread')
-rw-r--r--libpthread/Makefile.in4
-rw-r--r--libpthread/linuxthreads.old/Makefile.in25
-rw-r--r--libpthread/linuxthreads.old_db/Makefile.in12
-rw-r--r--libpthread/linuxthreads/Makefile.in27
-rw-r--r--libpthread/linuxthreads_db/Makefile.in12
5 files changed, 46 insertions, 34 deletions
diff --git a/libpthread/Makefile.in b/libpthread/Makefile.in
index bda935b5b..d1f8528a9 100644
--- a/libpthread/Makefile.in
+++ b/libpthread/Makefile.in
@@ -6,6 +6,6 @@
#
ifneq ($(PTNAME),)
-include $(PTDIR)/Makefile.in
-include $(PTDIR)_db/Makefile.in
+include $(top_srcdir)$(PTDIR)/Makefile.in
+include $(top_srcdir)$(PTDIR)_db/Makefile.in
endif
diff --git a/libpthread/linuxthreads.old/Makefile.in b/libpthread/linuxthreads.old/Makefile.in
index d504b9999..2fed1dafd 100644
--- a/libpthread/linuxthreads.old/Makefile.in
+++ b/libpthread/linuxthreads.old/Makefile.in
@@ -6,6 +6,8 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
+subdirs += libpthread/linuxthreads.old
+
CFLAGS-dir_linuxthreads.old := -DNOT_IN_libc -DIS_IN_libpthread
CFLAGS-linuxthreads.old := $(CFLAGS-dir_linuxthreads.old) $(SSP_ALL_CFLAGS)
@@ -102,22 +104,23 @@ $(top_builddir)lib/libpthread.a: $(libpthread-a-y)
$(Q)$(RM) $@
$(do_ar)
-include/pthread.h:
- $(do_ln) ../$(PTDIR)/sysdeps/pthread/$(@F) $(top_builddir)$@
-include/semaphore.h:
- $(do_ln) ../$(PTDIR)/$(@F) $(top_builddir)$@
-include/bits/pthreadtypes.h: | include/bits
- $(do_ln) ../../$(PTDIR)/sysdeps/pthread/bits/$(@F) $(top_builddir)$@
-
-linuxthreads_headers := include/pthread.h include/semaphore.h \
- include/bits/pthreadtypes.h
-$(linuxthreads_headers): $(wildcard $(addprefix include/config/linuxthreads/,old.h new.h))
+$(top_builddir)include/pthread.h:
+ $(do_ln) $(call rel_srcdir)$(PTDIR)/sysdeps/pthread/$(@F) $@
+$(top_builddir)include/semaphore.h:
+ $(do_ln) $(call rel_srcdir)$(PTDIR)/$(@F) $@
+$(top_builddir)include/bits/pthreadtypes.h: | $(top_builddir)include/bits
+ $(do_ln) $(call rel_srcdir)$(PTDIR)/sysdeps/pthread/bits/$(@F) $@
+
+linuxthreads_headers := $(top_builddir)include/pthread.h \
+ $(top_builddir)include/semaphore.h \
+ $(top_builddir)include/bits/pthreadtypes.h
+$(linuxthreads_headers): $(wildcard $(addprefix $(top_builddir)include/config/linuxthreads/,old.h new.h))
headers-$(UCLIBC_HAS_THREADS) += $(linuxthreads_headers)
objclean-y += libpthread_clean
headers_clean-y += linuxthreads_headers_clean
linuxthreads_headers_clean:
- $(do_rm) $(addprefix $(top_builddir),$(linuxthreads_headers))
+ $(do_rm) $(linuxthreads_headers)
libpthread_clean:
$(do_rm) $(addprefix $(libpthread_OUT)/*., o os oS a)
diff --git a/libpthread/linuxthreads.old_db/Makefile.in b/libpthread/linuxthreads.old_db/Makefile.in
index 1c89a9f0e..2f9077905 100644
--- a/libpthread/linuxthreads.old_db/Makefile.in
+++ b/libpthread/linuxthreads.old_db/Makefile.in
@@ -5,6 +5,8 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
+subdirs += libpthread/linuxthreads.old_db
+
# Get the thread include dependencies and shared object name
CFLAGS-linuxthreads.old_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
@@ -59,18 +61,18 @@ $(top_builddir)lib/libthread_db.a: $(libthread_db-a-y)
$(Q)$(RM) $@
$(do_ar)
-include/thread_db.h:
- $(do_ln) ../$(PTDIR)_db/$(@F) $(top_builddir)$@
+$(top_builddir)include/thread_db.h:
+ $(do_ln) $(call rel_srcdir)$(PTDIR)_db/$(@F) $@
-linuxthreads_db_headers := include/thread_db.h
-$(linuxthreads_db_headers): $(wildcard $(addprefix include/config/linuxthreads/,old.h new.h))
+linuxthreads_db_headers := $(top_builddir)include/thread_db.h
+$(linuxthreads_db_headers): $(wildcard $(addprefix $(top_builddir)include/config/linuxthreads/,old.h new.h))
headers-$(PTHREADS_DEBUG_SUPPORT) += $(linuxthreads_db_headers)
objclean-y += libthread_db_clean
headers_clean-y += linuxthreads_db_headers_clean
linuxthreads_db_headers_clean:
- $(do_rm) $(top_builddir)include/thread_db.h
+ $(do_rm) $(linuxthreads_db_headers)
libthread_db_clean:
$(do_rm) $(addprefix $(libthread_db_OUT)/*., o os oS a)
diff --git a/libpthread/linuxthreads/Makefile.in b/libpthread/linuxthreads/Makefile.in
index 947dea917..7ed3ec510 100644
--- a/libpthread/linuxthreads/Makefile.in
+++ b/libpthread/linuxthreads/Makefile.in
@@ -6,6 +6,10 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
+subdirs += libpthread/linuxthreads/sysdeps/$(TARGET_ARCH)
+subdirs += libpthread/linuxthreads/sysdeps/unix/sysv/linux
+subdirs += libpthread/linuxthreads/sysdeps/pthread
+
CFLAGS-dir_linuxthreads := -DNOT_IN_libc -DIS_IN_libpthread
CFLAGS-linuxthreads := $(CFLAGS-dir_linuxthreads) $(SSP_ALL_CFLAGS)
@@ -115,22 +119,23 @@ $(top_builddir)lib/libpthread.a: $(libpthread-a-y)
$(Q)$(RM) $@
$(do_ar)
-include/pthread.h:
- $(do_ln) ../$(PTDIR)/sysdeps/pthread/$(@F) $(top_builddir)$@
-include/semaphore.h:
- $(do_ln) ../$(PTDIR)/$(@F) $(top_builddir)$@
-include/bits/pthreadtypes.h: | include/bits
- $(do_ln) ../../$(PTDIR)/sysdeps/pthread/bits/$(@F) $(top_builddir)$@
-
-linuxthreads_headers := include/pthread.h include/semaphore.h \
- include/bits/pthreadtypes.h
-$(linuxthreads_headers): $(wildcard $(addprefix include/config/linuxthreads/,old.h new.h))
+$(top_builddir)include/pthread.h:
+ $(do_ln) $(call rel_srcdir)$(PTDIR)/sysdeps/pthread/$(@F) $@
+$(top_builddir)include/semaphore.h:
+ $(do_ln) $(call rel_srcdir)$(PTDIR)/$(@F) $@
+$(top_builddir)include/bits/pthreadtypes.h: | $(top_builddir)include/bits
+ $(do_ln) $(call rel_srcdir)$(PTDIR)/sysdeps/pthread/bits/$(@F) $@
+
+linuxthreads_headers := $(top_builddir)include/pthread.h \
+ $(top_builddir)include/semaphore.h \
+ $(top_builddir)include/bits/pthreadtypes.h
+$(linuxthreads_headers): $(wildcard $(addprefix $(top_builddir)include/config/linuxthreads/,old.h new.h))
headers-$(UCLIBC_HAS_THREADS) += $(linuxthreads_headers)
objclean-y += libpthread_clean
headers_clean-y += linuxthreads_headers_clean
linuxthreads_headers_clean:
- $(do_rm) $(addprefix $(top_builddir),$(linuxthreads_headers))
+ $(do_rm) $(linuxthreads_headers)
libpthread_clean:
$(do_rm) $(addprefix $(libpthread_OUT)/,$(foreach e, o os oS a,$(foreach d, *. */*. */*/*. */*/*/*.,$(d)$(e))))
diff --git a/libpthread/linuxthreads_db/Makefile.in b/libpthread/linuxthreads_db/Makefile.in
index a57cb8461..5804922de 100644
--- a/libpthread/linuxthreads_db/Makefile.in
+++ b/libpthread/linuxthreads_db/Makefile.in
@@ -5,6 +5,8 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
+subdirs += libpthread/linuxthreads_db
+
# Get the thread include dependencies and shared object name
CFLAGS-linuxthreads_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
@@ -59,18 +61,18 @@ $(top_builddir)lib/libthread_db.a: $(libthread_db-a-y)
$(Q)$(RM) $@
$(do_ar)
-include/thread_db.h:
- $(do_ln) ../$(PTDIR)_db/$(@F) $(top_builddir)$@
+$(top_builddir)include/thread_db.h:
+ $(do_ln) $(call rel_srcdir)$(PTDIR)_db/$(@F) $@
-linuxthreads_db_headers := include/thread_db.h
-$(linuxthreads_db_headers): $(wildcard $(addprefix include/config/linuxthreads/,old.h new.h))
+linuxthreads_db_headers := $(top_builddir)include/thread_db.h
+$(linuxthreads_db_headers): $(wildcard $(addprefix $(top_builddir)include/config/linuxthreads/,old.h new.h))
headers-$(PTHREADS_DEBUG_SUPPORT) += $(linuxthreads_db_headers)
objclean-y += libthread_db_clean
headers_clean-y += linuxthreads_db_headers_clean
linuxthreads_db_headers_clean:
- $(do_rm) $(top_builddir)include/thread_db.h
+ $(do_rm) $(linuxthreads_db_headers)
libthread_db_clean:
$(do_rm) $(addprefix $(libthread_db_OUT)/*., o os oS a)