Clean up some minor white space issues in trans-decl.c and trans-expr.c
[official-gcc.git] / libcc1 / Makefile.am
blob7a274b3470cf4ee132e73f7ee2639e3a2d96cf5e
1 ## Copyright (C) 2014 Free Software Foundation, Inc.
3 ## This file is part of GCC.
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.
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.
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/>.
19 ACLOCAL_AMFLAGS = -I .. -I ../config
20 gcc_build_dir = ../gcc
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 \
24         -I $(srcdir)/../libcpp/include $(GMPINC)
25 AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility)
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))
38 plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
39 cc1libdir = $(libdir)/$(libsuffix)
41 if ENABLE_PLUGIN
42 plugin_LTLIBRARIES = libcc1plugin.la
43 cc1lib_LTLIBRARIES = libcc1.la
44 endif
46 BUILT_SOURCES = compiler-name.h
48 # Put this in a header so we don't run sed for each compilation.  This
49 # is also simpler to debug as one can easily see the constant.
50 compiler-name.h: Makefile
51         echo "#define COMPILER_NAME \"`echo gcc | sed '$(transform)'`\"" > compiler-name.h
54 shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
55     marshall.cc marshall.hh rpc.hh status.hh
57 libcc1plugin_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1plugin.sym
58 libcc1plugin_la_SOURCES = plugin.cc $(shared_source)
59 libcc1plugin_la_LIBADD = $(libiberty)
60 libcc1plugin_la_DEPENDENCIES = $(libiberty_dep)
61 libcc1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
62         $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
63         $(CXXFLAGS) $(libcc1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
65 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
66 libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym
67 libcc1_la_SOURCES = findcomp.cc libcc1.cc names.cc names.hh $(shared_source)
68 libcc1_la_LIBADD = $(libiberty)
69 libcc1_la_DEPENDENCIES = $(libiberty_dep)
70 libcc1_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
71         $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
72         $(CXXFLAGS) $(libcc1_la_LDFLAGS) $(LTLDFLAGS) -o $@