mips: sync with GNU libc, fix mips64r6 n32 compilation
[uclibc-ng.git] / libpthread / linuxthreads_db / Makefile.in
blobd3ce6f2eedaf1556375d1125a94717a6febd543b
1 # Makefile for uClibc
3 # Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
5 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 subdirs += libpthread/linuxthreads_db
10 # Get the thread include dependencies and shared object name
11 CFLAGS-libpthread/linuxthreads_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(ABI_VERSION)\""
13 LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(if $(call check_ld,--warn-unresolved-symbols),-Wl$(comma)--warn-unresolved-symbols)
14 ifeq ($(DOSTRIP),y)
15 LDFLAGS-libthread_db.so += -Wl,-s
16 endif
18 LIBS-libthread_db.so := $(LIBS)
20 libthread_db_FULL_NAME := libthread_db-$(VERSION).so
22 libthread_db_DIR := $(top_srcdir)libpthread/linuxthreads_db
23 libthread_db_OUT := $(top_builddir)libpthread/linuxthreads_db
25 libthread_db_SRC := $(wildcard $(libthread_db_DIR)/*.c)
27 libthread_db_OBJ := $(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC))
29 libthread_db-so-y := $(libthread_db_OBJ:.o=.os)
30 ifeq ($(DOPIC),y)
31 libthread_db-a-y := $(libthread_db-so-y)
32 else
33 libthread_db-a-y := $(libthread_db_OBJ)
34 endif
36 lib-a-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.a
37 lib-so-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.so
39 ifeq ($(DOPIC),y)
40 $(top_builddir)lib/libthread_db.so: $(top_builddir)lib/libthread_db.a $(libc.depend)
41 else
42 $(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a $(libc.depend)
43 endif
44 $(call link.so,$(libthread_db_FULL_NAME),1)
46 $(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
47 $(Q)$(RM) $@
48 $(do_ar)
50 $(libthread_db_OUT)/libthread_db.oS: $(libthread_db_SRC)
51 $(Q)$(RM) $@
52 $(compile-m)
54 $(top_builddir)lib/libthread_db.a: $(libthread_db-a-y)
55 $(Q)$(INSTALL) -d $(dir $@)
56 $(Q)$(RM) $@
57 $(do_ar)
59 $(top_builddir)include/thread_db.h:
60 $(do_ln) $(call rel_srcdir)$(PTDIR)_db/$(@F) $@
62 linuxthreads_db_headers := $(top_builddir)include/thread_db.h
63 $(linuxthreads_db_headers): $(wildcard $(addprefix $(top_builddir)include/config/linuxthreads/,old.h new.h))
64 headers-$(PTHREADS_DEBUG_SUPPORT) += $(linuxthreads_db_headers)
66 objclean-y += CLEAN_libpthread/linuxthreads_db
67 headers_clean-y += HEADERCLEAN_libpthread/linuxthreads_db
69 HEADERCLEAN_libpthread/linuxthreads_db:
70 $(do_rm) $(linuxthreads_db_headers)
72 CLEAN_libpthread/linuxthreads_db:
73 $(do_rm) $(addprefix $(libthread_db_OUT)/*., o os oS a)