]> gcc.gnu.org Git - gcc.git/blob - c++tools/Makefile.in
c++tools: Fix exe suffix [PR 98409]
[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 gcc_version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
24 libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
25 INSTALL_PROGRAM := @INSTALL_PROGRAM@
26 INSTALL_STRIP_PROGRAM := $(srcdir)/../install-sh -c -s
27 AUTOCONF := @AUTOCONF@
28 AUTOHEADER := @AUTOHEADER@
29 CXX := @CXX@
30 CXXFLAGS := @CXXFLAGS@
31 CXXOPTS := $(CXXFLAGS) -fno-exceptions -fno-rtti
32 exeext := @EXEEXT@
33 LIBIBERTY := ../libiberty/libiberty.a
34 VERSION.O := ../gcc/version.o
35
36 all::
37
38 mostlyclean::
39 rm -f $(MAPPER.O)
40
41 clean::
42 rm -f g++-mapper-server$(exeext)
43
44 distclean::
45 rm -f config.log config.status config.h
46
47 maintainer-clean::
48
49 install::
50
51 check::
52 installcheck::
53 dvi::
54 pdf::
55 html::
56 info::
57 install-info::
58 install-pdf::
59 install-man::
60 install-html::
61
62 install-strip: override INSTALL_PROGRAM = $(INSTALL_STRIP_PROGRAM)
63 ifneq ($(STRIP),)
64 install-strip: STRIPPROG = $(STRIP)
65 export STRIPPROG
66 endif
67 install-strip: install
68
69 vpath %.cc $(srcdir)
70 vpath %.in $(srcdir)
71 .SUFFIXES:
72 .SUFFIXES: .cc .o
73
74 # Per-source & per-directory compile flags (warning: recursive)
75 SRC_CXXFLAGS = $(CXXFLAGS$(patsubst $(srcdir)%,%,$1)) \
76 $(if $(filter-out $(srcdir)/,$1),\
77 $(call $0,$(dir $(patsubst %/,%,$1))))
78
79 %.o: %.cc
80 $(CXX) $(strip $(CXXOPTS) $(call SRC_CXXFLAGS,$<) $(CXXINC)) \
81 -MMD -MP -MF ${@:.o=.d} -c -o $@ $<
82
83 ifeq (@CXX_AUX_TOOLS@,yes)
84
85 all::g++-mapper-server$(exeext)
86
87 MAPPER.O := server.o resolver.o
88 CODYLIB = ../libcody/libcody.a
89 CXXINC += -I$(srcdir)/../libcody -I$(srcdir)/../include -I$(srcdir)/../gcc -I.
90 g++-mapper-server$(exeext): $(MAPPER.O) $(CODYLIB)
91 +$(CXX) $(LDFLAGS) -o $@ $^ $(VERSION.O) $(LIBIBERTY)
92
93 # copy to gcc dir so tests there can run
94 all::../gcc/g++-mapper-server$(exeext)
95
96 ../gcc/g++-mapper-server$(exeext): g++-mapper-server$(exeext)
97 $(INSTALL) $< $@
98
99 install::
100 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(libexecsubdir)
101 $(INSTALL_PROGRAM) g++-mapper-server$(exeext) $(DESTDIR)$(libexecsubdir)
102 endif
103
104 ifneq ($(MAINTAINER),)
105 override MAINTAINER += $1
106 endif
107 ifeq (@MAINTAINER@,yes)
108 MAINTAINER = $2
109 else
110 MAINTAINER = \# --enable-maintainer-mode to rebuild $1, or make MAINTAINER=touch
111 endif
112
113 all:: Makefile
114
115 Makefile: $(srcdir)/Makefile.in config.status
116 $(SHELL) ./config.status Makefile
117
118 $(srcdir)/configure: $(srcdir)/configure.ac
119 $(call MAINTAINER,$@,cd $(@D) && $(AUTOCONF) -W all,error)
120
121 $(srcdir)/config.h.in: $(srcdir)/configure.ac
122 $(call MAINTAINER,$@,cd $(@D) && $(AUTOHEADER) -f -W all,error)
123
124 config.h: config.status config.h.in
125 ./$< --header=$@
126 touch $@
127
128 config.status: $(srcdir)/configure $(srcdir)/config.h.in
129 if test -x $@; then ./$@ -recheck; else $< @configure_args@; fi
130
131 .PHONY: all check clean distclean maintainer-clean
132
133 -include $(MAPPER.O:.o=.d)
This page took 0.049037 seconds and 6 git commands to generate.