]> git.ipfire.org Git - thirdparty/gcc.git/blame - libvtv/Makefile.am
re PR other/79046 (g++ -print-file-name=plugin uses full version number in path)
[thirdparty/gcc.git] / libvtv / Makefile.am
CommitLineData
2077db1b
CT
1## Makefile for the VTV library.
2##
2afd3180 3## Copyright (C) 2013-2017 Free Software Foundation, Inc.
2077db1b
CT
4##
5## Process this file with automake to produce Makefile.in.
6##
7## This file is part of the Vtable Verification (VTV) Library. This
8## library is free software; you can redistribute it and/or modify it
9## under the terms of the GNU General Public License as published by
10## the Free Software Foundation; either version 3, or (at your option)
11## any later version.
12
13## This library is distributed in the hope that it will be useful, but
14## WITHOUT ANY WARRANTY; without even the implied warranty of
15## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16## General Public License for more details.
17
18## You should have received a copy of the GNU General Public License
19## along with this library; see the file COPYING3. If not see
20## <http://www.gnu.org/licenses/>.
21
56fc7835
CT
22if ENABLE_VTABLE_VERIFY
23 SUBDIRS = testsuite
24else
25 SUBDIRS=
26endif
2077db1b
CT
27
28ACLOCAL_AMFLAGS = -I .. -I ../config
29
30# May be used by toolexeclibdir.
3c36aa6b 31gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
2077db1b 32
8bc16536 33DEFS = @DEFS@
2077db1b
CT
34AM_CPPFLAGS = -I$(top_srcdir)/../include
35AM_CFLAGS = $(XCFLAGS)
36AM_CCASFLAGS = $(XCFLAGS)
37AM_CXXFLAGS = $(XCFLAGS)
38AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
39AM_CXXFLAGS += -Wl,-u_vtable_map_vars_start,-u_vtable_map_vars_end
40
4344d7fa 41if ENABLE_VTABLE_VERIFY
f7f049fa 42 toolexeclib_LTLIBRARIES = libvtv.la
4344d7fa
RO
43if VTV_CYGMIN
44 toolexeclib_LTLIBRARIES += libvtv_stubs.la
45endif
f7f049fa 46endif
2077db1b
CT
47
48vtv_headers = \
49 vtv_map.h \
50 vtv_malloc.h \
51 vtv_fail.h \
52 vtv_set.h \
53 vtv_utils.h \
54 vtv_rts.h
55
56vtv_sources = \
57 vtv_start.c \
58 vtv_malloc.cc \
59 vtv_rts.cc \
60 vtv_utils.cc \
61 vtv_end.c
62
f7f049fa
CT
63vtv_stubs_sources = \
64 vtv_start.c \
65 vtv_stubs.cc \
66 vtv_end.c
67
114f3eb9 68libvtv_includedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
2077db1b
CT
69
70# Link in vtv_start and vtv_end.
71BUILT_SOURCES = vtv_start.c vtv_end.c
72vtv_start.c:
73 rm -f $@
74 $(LN_S) $(toplevel_srcdir)/libgcc/vtv_start.c $@
75
76vtv_end.c:
77 rm -f $@
78 $(LN_S) $(toplevel_srcdir)/libgcc/vtv_end.c $@
79
e5ef217c 80if VTV_NO_OBSTACK
f7f049fa
CT
81 obstack.c:
82 rm -f $@
83 $(LN_S) $(toplevel_srcdir)/libiberty/obstack.c $@
e5ef217c
RO
84 > config.h
85endif
86
87if VTV_CYGMIN
f7f049fa
CT
88 vtv_stubs.cc:
89 rm -f $@
90 $(LN_S) $(toplevel_srcdir)/libstdc++-v3/libsupc++/vtv_stubs.cc $@
91endif
92
93if VTV_CYGMIN
94 libvtv_la_LIBADD = -lpsapi
95 libvtv_la_LDFLAGS = $(lt_host_flags)
96 libvtv_stubs_la_LDFLAGS = $(lt_host_flags)
97endif
98
56fc7835 99if ENABLE_VTABLE_VERIFY
e5ef217c
RO
100 libvtv_la_SOURCES = $(vtv_sources)
101if VTV_NO_OBSTACK
102 libvtv_la_SOURCES += obstack.c
103endif
f7f049fa 104if VTV_CYGMIN
f7f049fa 105 libvtv_stubs_la_SOURCES = $(vtv_stubs_sources)
f7f049fa 106endif
56fc7835
CT
107 libvtv_include_HEADERS = $(vtv_headers)
108else
109 libvtv_la_SOURCES =
110 libvtv_include_HEADERS =
111endif
2077db1b
CT
112
113# Least ordering for dependencies mean linking w/o libstdc++ for as
114# long as the development of libvtv does not absolutely require it.
115CXXVTV=$(CC_FOR_TARGET)
f7f049fa
CT
116CXXLD=$(CC_FOR_TARGET)
117
2077db1b
CT
118LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
119 --mode=compile $(CXXVTV) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
120 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
121
122CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
123 --mode=link $(CXXVTV) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
124 $(LDFLAGS) -o $@