]>
Commit | Line | Data |
---|---|---|
6f8b1fff | 1 | ## Copyright (C) 2014-2016 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 \ |
22 | -I $(gcc_build_dir) -I$(srcdir)/../gcc \ | |
23 | -I $(srcdir)/../gcc/c -I $(srcdir)/../gcc/c-family \ | |
ced11600 | 24 | -I $(srcdir)/../libcpp/include $(GMPINC) |
25 | AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility) | |
6b01e63b | 26 | override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS)) |
27 | override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS)) | |
28 | # Can be simplified when libiberty becomes a normal convenience library. | |
29 | libiberty_normal = ../libiberty/libiberty.a | |
30 | libiberty_noasan = ../libiberty/noasan/libiberty.a | |
31 | libiberty_pic = ../libiberty/pic/libiberty.a | |
32 | Wc=-Wc, | |
33 | libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ | |
34 | $(if $(wildcard $(libiberty_pic)),$(Wc)$(libiberty_pic), \ | |
35 | $(Wc)$(libiberty_normal))) | |
36 | libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) | |
ab103e33 | 37 | |
38 | plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin | |
39 | cc1libdir = $(libdir)/$(libsuffix) | |
40 | ||
41 | if ENABLE_PLUGIN | |
42 | plugin_LTLIBRARIES = libcc1plugin.la | |
43 | cc1lib_LTLIBRARIES = libcc1.la | |
44 | endif | |
45 | ||
46 | BUILT_SOURCES = compiler-name.h | |
537e38b3 | 47 | MOSTLYCLEANFILES = compiler-name.h |
ab103e33 | 48 | |
49 | # Put this in a header so we don't run sed for each compilation. This | |
50 | # is also simpler to debug as one can easily see the constant. | |
51 | compiler-name.h: Makefile | |
537e38b3 | 52 | echo "#define COMPILER_NAME \"`echo gcc | sed '$(transform)'`\"" > $@ |
ab103e33 | 53 | |
54 | ||
55 | shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \ | |
56 | marshall.cc marshall.hh rpc.hh status.hh | |
57 | ||
58 | libcc1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1plugin.sym | |
59 | libcc1plugin_la_SOURCES = plugin.cc $(shared_source) | |
60 | libcc1plugin_la_LIBADD = $(libiberty) | |
6b01e63b | 61 | libcc1plugin_la_DEPENDENCIES = $(libiberty_dep) |
62 | libcc1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ | |
63 | $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ | |
64 | $(CXXFLAGS) $(libcc1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@ | |
ab103e33 | 65 | |
6b01e63b | 66 | LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) |
ab103e33 | 67 | libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym |
68 | libcc1_la_SOURCES = findcomp.cc libcc1.cc names.cc names.hh $(shared_source) | |
69 | libcc1_la_LIBADD = $(libiberty) | |
6b01e63b | 70 | libcc1_la_DEPENDENCIES = $(libiberty_dep) |
71 | libcc1_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ | |
72 | $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ | |
73 | $(CXXFLAGS) $(libcc1_la_LDFLAGS) $(LTLDFLAGS) -o $@ |