]>
Commit | Line | Data |
---|---|---|
8e8f6434 | 1 | ## Copyright (C) 2014-2018 Free Software Foundation, Inc. |
ab103e33 | 2 | |
3 | ## This file is part of GCC. | |
4 | ||
5 | ## GCC is free software; you can redistribute it and/or modify it under | |
6 | ## the terms of the GNU General Public License as published by the Free | |
7 | ## Software Foundation; either version 3, or (at your option) any later | |
8 | ## version. | |
9 | ||
10 | ## GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
11 | ## WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 | ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 | ## for more details. | |
14 | ||
15 | ## You should have received a copy of the GNU General Public License | |
16 | ## along with GCC; see the file COPYING3. If not see | |
17 | ## <http://www.gnu.org/licenses/>. | |
18 | ||
19 | ACLOCAL_AMFLAGS = -I .. -I ../config | |
61d3674f | 20 | gcc_build_dir = ../gcc |
ab103e33 | 21 | AM_CPPFLAGS = -I $(srcdir)/../include -I $(srcdir)/../libgcc \ |
37af486a | 22 | -I $(gcc_build_dir) -I$(srcdir)/../gcc $($@_CPPFLAGS) $(GMPINC) |
23 | CPPFLAGS_FOR_C_FAMILY = -I $(srcdir)/../gcc/c-family \ | |
24 | -I $(srcdir)/../libcpp/include | |
25 | CPPFLAGS_FOR_C = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/c | |
26 | CPPFLAGS_FOR_CXX = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/cp | |
ced11600 | 27 | AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility) |
6b01e63b | 28 | override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS)) |
29 | override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS)) | |
30 | # Can be simplified when libiberty becomes a normal convenience library. | |
31 | libiberty_normal = ../libiberty/libiberty.a | |
32 | libiberty_noasan = ../libiberty/noasan/libiberty.a | |
33 | libiberty_pic = ../libiberty/pic/libiberty.a | |
34 | Wc=-Wc, | |
35 | libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ | |
36 | $(if $(wildcard $(libiberty_pic)),$(Wc)$(libiberty_pic), \ | |
37 | $(Wc)$(libiberty_normal))) | |
38 | libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) | |
ab103e33 | 39 | |
40 | plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin | |
41 | cc1libdir = $(libdir)/$(libsuffix) | |
42 | ||
43 | if ENABLE_PLUGIN | |
37af486a | 44 | plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la |
ab103e33 | 45 | cc1lib_LTLIBRARIES = libcc1.la |
46 | endif | |
47 | ||
ab103e33 | 48 | shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \ |
49 | marshall.cc marshall.hh rpc.hh status.hh | |
50 | ||
37af486a | 51 | marshall_c_source = marshall-c.hh |
52 | marshall_cxx_source = marshall-cp.hh | |
53 | ||
ab103e33 | 54 | libcc1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1plugin.sym |
37af486a | 55 | libcc1plugin_la_SOURCES = libcc1plugin.cc $(shared_source) $(marshall_c_source) |
56 | libcc1plugin.lo_CPPFLAGS = $(CPPFLAGS_FOR_C) | |
ab103e33 | 57 | libcc1plugin_la_LIBADD = $(libiberty) |
6b01e63b | 58 | libcc1plugin_la_DEPENDENCIES = $(libiberty_dep) |
59 | libcc1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ | |
60 | $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ | |
61 | $(CXXFLAGS) $(libcc1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@ | |
ab103e33 | 62 | |
37af486a | 63 | libcp1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcp1plugin.sym |
64 | libcp1plugin_la_SOURCES = libcp1plugin.cc $(shared_source) $(marshall_cxx_source) | |
65 | libcp1plugin.lo_CPPFLAGS = $(CPPFLAGS_FOR_CXX) | |
66 | libcp1plugin_la_LIBADD = $(libiberty) | |
67 | libcp1plugin_la_DEPENDENCIES = $(libiberty_dep) | |
68 | libcp1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ | |
69 | $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ | |
70 | $(CXXFLAGS) $(libcp1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@ | |
71 | ||
6b01e63b | 72 | LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) |
ab103e33 | 73 | libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym |
37af486a | 74 | libcc1_la_SOURCES = findcomp.cc libcc1.cc libcp1.cc \ |
75 | names.cc names.hh $(shared_source) \ | |
76 | $(marshall_c_source) $(marshall_cxx_source) | |
ab103e33 | 77 | libcc1_la_LIBADD = $(libiberty) |
6b01e63b | 78 | libcc1_la_DEPENDENCIES = $(libiberty_dep) |
79 | libcc1_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ | |
80 | $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ | |
81 | $(CXXFLAGS) $(libcc1_la_LDFLAGS) $(LTLDFLAGS) -o $@ |