1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
# Makefile for c++tools
# Copyright (C) 2020-2022 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
srcdir := @srcdir@
prefix := @prefix@
bindir := @bindir@
libexecdir := @libexecdir@
target_noncanonical := @target_noncanonical@
gcc_version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
INSTALL_PROGRAM := @INSTALL_PROGRAM@
INSTALL_STRIP_PROGRAM := $(srcdir)/../install-sh -c -s
AUTOCONF := @AUTOCONF@
AUTOHEADER := @AUTOHEADER@
CXX := @CXX@
CXXFLAGS := @CXXFLAGS@
PIEFLAG := @PIEFLAG@
CXXOPTS := $(CXXFLAGS) $(PIEFLAG) -fno-exceptions -fno-rtti
LDFLAGS := @LDFLAGS@
exeext := @EXEEXT@
LIBIBERTY := ../libiberty/libiberty.a
NETLIBS := @NETLIBS@
VERSION.O := ../gcc/version.o
all::
mostlyclean::
rm -f $(MAPPER.O)
clean::
rm -f g++-mapper-server$(exeext)
distclean::
rm -f config.log config.status config.h
maintainer-clean::
install::
check::
installcheck::
dvi::
pdf::
html::
info::
install-info::
install-pdf::
install-dvi::
install-man::
install-html::
install-strip: override INSTALL_PROGRAM = $(INSTALL_STRIP_PROGRAM)
ifneq ($(STRIP),)
install-strip: STRIPPROG = $(STRIP)
export STRIPPROG
endif
install-strip: install
vpath %.cc $(srcdir)
vpath %.in $(srcdir)
.SUFFIXES:
.SUFFIXES: .cc .o
# Per-source & per-directory compile flags (warning: recursive)
SRC_CXXFLAGS = $(CXXFLAGS$(patsubst $(srcdir)%,%,$1)) \
$(if $(filter-out $(srcdir)/,$1),\
$(call $0,$(dir $(patsubst %/,%,$1))))
%.o: %.cc
$(CXX) $(strip $(CXXOPTS) $(call SRC_CXXFLAGS,$<) $(CXXINC)) \
-MMD -MP -MF ${@:.o=.d} -c -o $@ $<
ifeq (@CXX_AUX_TOOLS@,yes)
all::g++-mapper-server$(exeext)
MAPPER.O := server.o resolver.o
CODYLIB = ../libcody/libcody.a
CXXINC += -I$(srcdir)/../libcody -I$(srcdir)/../include -I$(srcdir)/../gcc -I. -I../gcc
g++-mapper-server$(exeext): $(MAPPER.O) $(CODYLIB)
+$(CXX) $(LDFLAGS) $(PIEFLAG) -o $@ $^ $(LIBIBERTY) $(NETLIBS)
# copy to gcc dir so tests there can run
all::../gcc/g++-mapper-server$(exeext)
../gcc/g++-mapper-server$(exeext): g++-mapper-server$(exeext)
$(INSTALL) $< $@
install::
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(libexecsubdir)
$(INSTALL_PROGRAM) g++-mapper-server$(exeext) $(DESTDIR)$(libexecsubdir)
endif
ifneq ($(MAINTAINER),)
override MAINTAINER += $1
endif
ifeq (@MAINTAINER@,yes)
MAINTAINER = $2
else
MAINTAINER = \# --enable-maintainer-mode to rebuild $1, or make MAINTAINER=touch
endif
all:: Makefile
Makefile: $(srcdir)/Makefile.in config.status
$(SHELL) ./config.status Makefile
$(srcdir)/configure: $(srcdir)/configure.ac
$(call MAINTAINER,$@,cd $(@D) && $(AUTOCONF) -W all,error)
$(srcdir)/config.h.in: $(srcdir)/configure.ac
$(call MAINTAINER,$@,cd $(@D) && $(AUTOHEADER) -f -W all,error)
config.h: config.status config.h.in
./$< --header=$@
touch $@
config.status: $(srcdir)/configure $(srcdir)/config.h.in
if test -x $@; then ./$@ -recheck; else $< @configure_args@; fi
.PHONY: all check clean distclean maintainer-clean
-include $(MAPPER.O:.o=.d)
|