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