]> git.ipfire.org Git - thirdparty/glibc.git/blame - debug/Makefile
Update.
[thirdparty/glibc.git] / debug / Makefile
CommitLineData
639c3248 1# Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
2de7874e
UD
2# This file is part of the GNU C Library.
3
4# The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5# modify it under the terms of the GNU Lesser General Public
6# License as published by the Free Software Foundation; either
7# version 2.1 of the License, or (at your option) any later version.
2de7874e
UD
8
9# The GNU C Library is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12# Lesser General Public License for more details.
2de7874e 13
41bdb6e2
AJ
14# You should have received a copy of the GNU Lesser General Public
15# License along with the GNU C Library; if not, write to the Free
16# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17# 02111-1307 USA.
2de7874e
UD
18
19#
20# Sub-makefile for debug portion of the library.
21#
22subdir := debug
23
24headers := execinfo.h
01cfd4b7 25distribute = sigcontextinfo.h register-dump.h frame.h
2de7874e 26
87843f15 27routines := backtrace backtracesyms backtracesymsfd noophooks
2de7874e
UD
28
29CFLAGS-backtrace.c = -fno-omit-frame-pointer
30
31tests = backtrace-tst
32
87843f15 33extra-libs = libSegFault libpcprofile
107f8131
UD
34extra-libs-others = $(extra-libs)
35
36libSegFault-routines = segfault
37libSegFault-inhibit-o = $(filter-out .os,$(object-suffixes))
38
87843f15
UD
39libpcprofile-routines = pcprofile
40libpcprofile-inhibit-o = $(filter-out .os,$(object-suffixes))
41
08920a50 42others = pcprofiledump
6c3ebebd
UD
43install-bin = pcprofiledump
44install-bin-script = xtrace
cab30d75 45
ce85d65b
UD
46include ../Makeconfig
47
40c4c9b5 48distribute += catchsegv.sh xtrace.sh
ce85d65b 49ifeq ($(elf),yes)
bfe1b528 50ifeq ($(build-shared),yes)
6c3ebebd 51install-bin-script += catchsegv
ce85d65b 52endif
bfe1b528 53endif
cd33623e 54generated = catchsegv xtrace
6ce7ab19 55
2de7874e 56include ../Rules
107f8131 57
6ce7ab19
UD
58$(objpfx)catchsegv: catchsegv.sh $(common-objpfx)soversions.mk \
59 $(common-objpfx)config.make
052b6a6c 60 sed -e 's|@VERSION@|$(version)|' -e 's|@SLIB@|$(slibdir)|' $< > $@.new
6ce7ab19
UD
61 chmod 555 $@.new
62 mv -f $@.new $@
63
cab30d75 64$(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o
cab30d75
UD
65
66$(objpfx)xtrace: xtrace.sh
67 rm -f $@.new
68 sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \
3ebab9ee 69 -e 's|@SLIBDIR@|$(slibdir)|' -e 's|@BINDIR@|$(bindir)|' $^ > $@.new \
cab30d75
UD
70 && rm -f $@ && mv $@.new $@ && chmod +x $@
71
107f8131
UD
72# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
73# This ensures they will load libc.so for needed symbols if loaded by
74# a statically-linked program that hasn't already loaded it.
639c3248
UD
75$(objpfx)libSegFault.so: $(common-objpfx)libc.so \
76 $(common-objpfx)libc_nonshared.a \
ad10cac8 77 $(elf-objpfx)$(rtld-installed-name)
639c3248
UD
78$(objpfx)libpcprofile.so: $(common-objpfx)libc.so \
79 $(common-objpfx)libc_nonshared.a \
ad10cac8 80 $(elf-objpfx)$(rtld-installed-name)