Testcase for PR58282
[official-gcc.git] / libvtv / Makefile.am
blobc3983effb7d88e3b81ee09d411df8f9254518c2e
1 ## Makefile for the VTV library.
2 ##
3 ## Copyright (C) 2013 Free Software Foundation, Inc.
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.
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.
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/>.
22 SUBDIRS = testsuite
24 ACLOCAL_AMFLAGS = -I .. -I ../config
26 # May be used by toolexeclibdir.
27 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
29 DEFS = @DEFS@
30 AM_CPPFLAGS = -I$(top_srcdir)/../include
31 AM_CFLAGS = $(XCFLAGS)
32 AM_CCASFLAGS = $(XCFLAGS)
33 AM_CXXFLAGS = $(XCFLAGS)  
34 AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
35 AM_CXXFLAGS += -Wl,-u_vtable_map_vars_start,-u_vtable_map_vars_end
37 toolexeclib_LTLIBRARIES = libvtv.la
39 vtv_headers = \
40         vtv_map.h \
41         vtv_malloc.h \
42         vtv_fail.h \
43         vtv_set.h \
44         vtv_utils.h \
45         vtv_rts.h
47 vtv_sources = \
48         vtv_start.c \
49         vtv_malloc.cc \
50         vtv_rts.cc \
51         vtv_utils.cc \
52         vtv_end.c
54 libvtv_includedir = $(includedir)
56 # Link in vtv_start and vtv_end. 
57 BUILT_SOURCES = vtv_start.c vtv_end.c
58 vtv_start.c:
59         rm -f $@
60         $(LN_S) $(toplevel_srcdir)/libgcc/vtv_start.c $@
62 vtv_end.c:
63         rm -f $@
64         $(LN_S) $(toplevel_srcdir)/libgcc/vtv_end.c $@
66 libvtv_la_SOURCES = $(vtv_sources)
67 libvtv_include_HEADERS = $(vtv_headers)
69 # Least ordering for dependencies mean linking w/o libstdc++ for as
70 # long as the development of libvtv does not absolutely require it.
71 CXXVTV=$(CC_FOR_TARGET)
72 LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
73         --mode=compile $(CXXVTV) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
74         $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
76 CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
77         --mode=link $(CXXVTV) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
78         $(LDFLAGS) -o $@