annotate libcc1/Makefile.am @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ## Copyright (C) 2014-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 ## This file is part of GCC.
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 ## GCC is free software; you can redistribute it and/or modify it under
kono
parents:
diff changeset
6 ## the terms of the GNU General Public License as published by the Free
kono
parents:
diff changeset
7 ## Software Foundation; either version 3, or (at your option) any later
kono
parents:
diff changeset
8 ## version.
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 ## GCC is distributed in the hope that it will be useful, but WITHOUT ANY
kono
parents:
diff changeset
11 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
kono
parents:
diff changeset
12 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kono
parents:
diff changeset
13 ## for more details.
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
16 ## along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
17 ## <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 ACLOCAL_AMFLAGS = -I .. -I ../config
kono
parents:
diff changeset
20 gcc_build_dir = ../gcc
kono
parents:
diff changeset
21 AM_CPPFLAGS = -I $(srcdir)/../include -I $(srcdir)/../libgcc \
kono
parents:
diff changeset
22 -I $(gcc_build_dir) -I$(srcdir)/../gcc $($@_CPPFLAGS) $(GMPINC)
kono
parents:
diff changeset
23 CPPFLAGS_FOR_C_FAMILY = -I $(srcdir)/../gcc/c-family \
kono
parents:
diff changeset
24 -I $(srcdir)/../libcpp/include
kono
parents:
diff changeset
25 CPPFLAGS_FOR_C = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/c
kono
parents:
diff changeset
26 CPPFLAGS_FOR_CXX = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/cp
kono
parents:
diff changeset
27 AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility)
kono
parents:
diff changeset
28 override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS))
kono
parents:
diff changeset
29 override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))
kono
parents:
diff changeset
30 # Can be simplified when libiberty becomes a normal convenience library.
kono
parents:
diff changeset
31 libiberty_normal = ../libiberty/libiberty.a
kono
parents:
diff changeset
32 libiberty_noasan = ../libiberty/noasan/libiberty.a
kono
parents:
diff changeset
33 libiberty_pic = ../libiberty/pic/libiberty.a
kono
parents:
diff changeset
34 Wc=-Wc,
kono
parents:
diff changeset
35 libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
kono
parents:
diff changeset
36 $(if $(wildcard $(libiberty_pic)),$(Wc)$(libiberty_pic), \
kono
parents:
diff changeset
37 $(Wc)$(libiberty_normal)))
kono
parents:
diff changeset
38 libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
kono
parents:
diff changeset
41 cc1libdir = $(libdir)/$(libsuffix)
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 if ENABLE_PLUGIN
kono
parents:
diff changeset
44 plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la
kono
parents:
diff changeset
45 cc1lib_LTLIBRARIES = libcc1.la
kono
parents:
diff changeset
46 endif
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 BUILT_SOURCES = c-compiler-name.h cp-compiler-name.h
kono
parents:
diff changeset
49 MOSTLYCLEANFILES = c-compiler-name.h cp-compiler-name.h
kono
parents:
diff changeset
50
kono
parents:
diff changeset
51 # Put this in a header so we don't run sed for each compilation. This
kono
parents:
diff changeset
52 # is also simpler to debug as one can easily see the constant.
kono
parents:
diff changeset
53 # FIXME: compute it in configure.ac and output it in config.status, or
kono
parents:
diff changeset
54 # introduce timestamp files for some indirection to avoid rebuilding it
kono
parents:
diff changeset
55 # every time.
kono
parents:
diff changeset
56 c-compiler-name.h: Makefile
kono
parents:
diff changeset
57 -rm -f $@T
kono
parents:
diff changeset
58 echo "#define C_COMPILER_NAME \"`echo gcc | sed '$(transform)'`\"" > $@T
kono
parents:
diff changeset
59 mv $@T $@ # $(SHELL) $(srcdir)/../move-if-change $@T $@
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 cp-compiler-name.h: Makefile
kono
parents:
diff changeset
62 -rm -f $@T
kono
parents:
diff changeset
63 echo "#define CP_COMPILER_NAME \"`echo g++ | sed '$(transform)'`\"" > $@T
kono
parents:
diff changeset
64 mv $@T $@ # $(SHELL) $(srcdir)/../move-if-change $@T $@
kono
parents:
diff changeset
65
kono
parents:
diff changeset
66 shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
kono
parents:
diff changeset
67 marshall.cc marshall.hh rpc.hh status.hh
kono
parents:
diff changeset
68
kono
parents:
diff changeset
69 marshall_c_source = marshall-c.hh
kono
parents:
diff changeset
70 marshall_cxx_source = marshall-cp.hh
kono
parents:
diff changeset
71
kono
parents:
diff changeset
72 libcc1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1plugin.sym
kono
parents:
diff changeset
73 libcc1plugin_la_SOURCES = libcc1plugin.cc $(shared_source) $(marshall_c_source)
kono
parents:
diff changeset
74 libcc1plugin.lo_CPPFLAGS = $(CPPFLAGS_FOR_C)
kono
parents:
diff changeset
75 libcc1plugin_la_LIBADD = $(libiberty)
kono
parents:
diff changeset
76 libcc1plugin_la_DEPENDENCIES = $(libiberty_dep)
kono
parents:
diff changeset
77 libcc1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
kono
parents:
diff changeset
78 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
kono
parents:
diff changeset
79 $(CXXFLAGS) $(libcc1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
kono
parents:
diff changeset
80
kono
parents:
diff changeset
81 libcp1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcp1plugin.sym
kono
parents:
diff changeset
82 libcp1plugin_la_SOURCES = libcp1plugin.cc $(shared_source) $(marshall_cxx_source)
kono
parents:
diff changeset
83 libcp1plugin.lo_CPPFLAGS = $(CPPFLAGS_FOR_CXX)
kono
parents:
diff changeset
84 libcp1plugin_la_LIBADD = $(libiberty)
kono
parents:
diff changeset
85 libcp1plugin_la_DEPENDENCIES = $(libiberty_dep)
kono
parents:
diff changeset
86 libcp1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
kono
parents:
diff changeset
87 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
kono
parents:
diff changeset
88 $(CXXFLAGS) $(libcp1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
kono
parents:
diff changeset
89
kono
parents:
diff changeset
90 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
kono
parents:
diff changeset
91 libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym
kono
parents:
diff changeset
92 libcc1_la_SOURCES = findcomp.cc libcc1.cc libcp1.cc \
kono
parents:
diff changeset
93 names.cc names.hh $(shared_source) \
kono
parents:
diff changeset
94 $(marshall_c_source) $(marshall_cxx_source)
kono
parents:
diff changeset
95 libcc1_la_LIBADD = $(libiberty)
kono
parents:
diff changeset
96 libcc1_la_DEPENDENCIES = $(libiberty_dep)
kono
parents:
diff changeset
97 libcc1_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
kono
parents:
diff changeset
98 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
kono
parents:
diff changeset
99 $(CXXFLAGS) $(libcc1_la_LDFLAGS) $(LTLDFLAGS) -o $@