malloc: add malloc_usable_size()
[uclibc-ng.git] / libpthread / nptl_db / Makefile.in
blob5a493d8b752c82687d82abd7371a31e233106ba6
1 # Makefile for uClibc
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 subdirs += libpthread/nptl_db
10 # Get the thread include dependencies and shared object name
11 CFLAGS-libpthread/nptl_db := -DNOT_IN_libc \
12 -DLIBPTHREAD_SO="\"libpthread.so.$(ABI_VERSION)\"" \
13 -std=gnu99 -D_GNU_SOURCE \
14 -I$(top_srcdir)libpthread/nptl \
15 -I$(top_srcdir)ldso/include
17 LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(if $(call check_ld,--warn-unresolved-symbols),-Wl$(comma)--warn-unresolved-symbols)
18 LIBS-libthread_db.so := $(LIBS)
20 libthread_db_FULL_NAME := libthread_db-$(VERSION).so
22 libthread_db_DIR := $(top_srcdir)libpthread/nptl_db
23 libthread_db_OUT := $(top_builddir)libpthread/nptl_db
25 libthread_db_SRC := $(notdir $(wildcard $(libthread_db_DIR)/td_*.c) \
26 $(libthread_db_DIR)/fetch-value.c)
27 ifeq ($(UCLIBC_SUSV4_LEGACY),)
28 libthread_db_SRC := $(filter-out td_ta_setconcurrency.c,$(libthread_db_SRC))
29 endif
31 libthread_db_OBJ := $(addprefix $(libthread_db_OUT)/,$(libthread_db_SRC:.c=.o))
33 libthread_db-so-y := $(libthread_db_OBJ:.o=.oS)
34 ifeq ($(DOPIC),y)
35 libthread_db-a-y := $(libthread_db-so-y)
36 else
37 libthread_db-a-y := $(libthread_db_OBJ)
38 endif
40 libthread_db-multi-y := $(addprefix $(libthread_db_DIR)/,$(libthread_db_SRC))
42 lib-a-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.a
43 lib-so-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.so
44 objclean-y += CLEAN_libpthread/nptl_db
45 headers-$(PTHREADS_DEBUG_SUPPORT) += $(nptl_db_headers)
46 headers_clean-y += HEADERCLEAN_libpthread/nptl_db
48 ifeq ($(DOPIC),y)
49 $(top_builddir)lib/libthread_db.so: $(top_builddir)lib/libthread_db.a $(libc.depend)
50 else
51 $(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a $(libc.depend)
52 endif
53 $(call link.so,$(libthread_db_FULL_NAME),1)
55 $(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
56 $(Q)$(RM) $@
57 $(do_strip)
58 $(do_ar)
60 $(top_builddir)lib/libthread_db.a: $(libthread_db-a-y) | $(top_builddir)lib
61 $(Q)$(RM) $@
62 $(do_strip)
63 $(do_ar)
65 $(top_builddir)include/thread_db.h:
66 $(do_ln) $(call rel_srcdir)$(PTDIR)_db/$(@F) $@
68 nptl_db_headers:= $(top_builddir)include/thread_db.h
70 HEADERCLEAN_libpthread/nptl_db:
71 $(do_rm) $(nptl_db_headers)
73 CLEAN_libpthread/nptl_db:
74 $(do_rm) $(addprefix $(libthread_db_OUT)/*., o oS a)