Improve NetBSD support: Allow VMA determination with fewer system calls.
[libsigsegv/ericb.git] / src / Makefile.am
blob32cddfd963af673137df4bdec1a6c05264456220
1 ## Makefile for libsigsegv/src.
2 ## Copyright (C) 2002-2006, 2008-2011 Bruno Haible <bruno@clisp.org>
3 ##
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
7 ## any later version.
8 ##
9 ## This program 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
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program; if not, write to the Free Software
16 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17 ## USA.
19 ## Process this file with automake to produce Makefile.in.
21 AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
23 RM = rm -f
25 lib_LTLIBRARIES = libsigsegv.la
27 noinst_HEADERS = \
28   fault.h fault-aix3.h fault-aix3-powerpc.h fault-aix5.h fault-aix5-powerpc.h \
29   fault-beos.h fault-beos-i386.h \
30   fault-cygwin-old.h \
31   fault-bsd.h fault-freebsd-i386.h \
32   fault-hpux.h fault-hpux-hppa.h fault-hurd.h fault-irix.h fault-irix-mips.h \
33   fault-linux.h fault-linux-alpha.h fault-linux-alpha-old.h \
34   fault-linux-arm.h fault-linux-arm-old.h \
35   fault-linux-cris.h fault-linux-cris-old.h \
36   fault-linux-hppa.h fault-linux-hppa-old.h \
37   fault-linux-i386.h fault-linux-i386-old.h fault-linux-i386-oldold.h \
38   fault-linux-ia64.h fault-linux-ia64-old.h \
39   fault-linux-m68k.h fault-linux-m68k-old.h fault-linux-m68k-old.c \
40   fault-linux-mips.h fault-linux-mips-old.h \
41   fault-linux-powerpc.h fault-linux-powerpc-old.h \
42   fault-linux-s390.h fault-linux-s390-old.h \
43   fault-linux-sh.h fault-linux-sh-old.h \
44   fault-linux-sparc.h fault-linux-sparc-old.h \
45   fault-linux-x86_64-old.h \
46   fault-macos-i386.h \
47   fault-macosdarwin5-powerpc.h fault-macosdarwin5-powerpc.c \
48   fault-macosdarwin7-powerpc.h fault-macosdarwin7-powerpc.c \
49   fault-netbsd.h fault-netbsd-alpha.h fault-netbsd-alpha.c \
50   fault-none.h \
51   fault-openbsd.h fault-openbsd-alpha.h fault-openbsd-arm.h \
52   fault-openbsd-hppa.h fault-openbsd-i386.h fault-openbsd-m68k.h \
53   fault-openbsd-m88k.h fault-openbsd-mips.h fault-openbsd-powerpc.h \
54   fault-openbsd-sh.h fault-openbsd-sparc.h fault-openbsd-vax.h \
55   fault-osf.h fault-osf-alpha.h \
56   fault-posix.h fault-posix-ucontext.h \
57   fault-solaris.h fault-solaris-i386.h fault-solaris-sparc.h \
58   machfault.h machfault-macos.h \
59   signals.h signals-bsd.h signals-hpux.h signals-hurd.h signals-macos.h \
60   leave.h \
61   stackvma.h
63 EXTRA_DIST = \
64   handler-none.c handler-unix.c handler-macos.c handler-win32.c \
65   stackvma-none.c stackvma-simple.c stackvma-linux.c stackvma-freebsd.c \
66   stackvma-netbsd.c stackvma-procfs.c stackvma-beos.c stackvma-mach.c \
67   stackvma-mincore.c stackvma-rofile.c \
68   leave-none.c leave-nop.c leave-sigaltstack.c leave-setcontext.c \
69   sigsegv.h.msvc
71 INCLUDES = -I. -I$(srcdir)
72 DEFS = @DEFS@
74 libsigsegv_la_SOURCES = handler.c stackvma.c leave.c dispatcher.c version.c
76 libsigsegv_la_LDFLAGS = \
77   -rpath $(libdir) \
78   -version-info $(LIBSIGSEGV_VERSION_INFO) \
79   -lc -no-undefined
81 # Before making a release, change this according to the libtool documentation,
82 # section "Library interface versions".
83 LIBSIGSEGV_VERSION_INFO = 2:2:0
85 # Dependencies.
86 handler.$(OBJEXT) : ../config.h sigsegv.h @CFG_HANDLER@ $(noinst_HEADERS) 
87 stackvma.$(OBJEXT) : ../config.h @CFG_STACKVMA@ stackvma.h
88 leave.$(OBJEXT) : ../config.h @CFG_LEAVE@
89 dispatcher.$(OBJEXT) : sigsegv.h
92 # Special rules for installing sigsegv.h.
94 install-data-local:
95         $(mkinstalldirs) $(DESTDIR)$(includedir)
96         $(INSTALL_DATA) sigsegv.h $(DESTDIR)$(includedir)/sigsegv.h
98 installdirs-local:
99         $(mkinstalldirs) $(DESTDIR)$(includedir)
101 uninstall-local:
102         $(RM) $(DESTDIR)$(includedir)/sigsegv.h
105 DISTCLEANFILES = sigsegv.h
108 # Rules for "make dist".
110 sigsegv.h.msvc : sigsegv.h.in
111         sed -e 's/@''FAULT_CONTEXT_INCLUDE''@/#include <windows.h>/' \
112             -e 's/@''FAULT_CONTEXT''@/CONTEXT/' \
113             -e 's/@''HAVE_SIGSEGV_RECOVERY''@/1/' \
114             -e 's/@''HAVE_STACK_OVERFLOW_RECOVERY''@/1/' \
115             < $(srcdir)/sigsegv.h.in > $@