]> git.ipfire.org Git - thirdparty/gcc.git/blame - c++tools/Makefile.in
x86: Extend AVX512 Vectorization for Popcount in Various Modes
[thirdparty/gcc.git] / c++tools / Makefile.in
CommitLineData
35fc243f 1# Makefile for c++tools
a945c346 2# Copyright (C) 2020-2024 Free Software Foundation, Inc.
35fc243f
NS
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
18srcdir := @srcdir@
19prefix := @prefix@
20bindir := @bindir@
21libexecdir := @libexecdir@
22target_noncanonical := @target_noncanonical@
4e7e7c13
JJ
23gcc_version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
24libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
79d1e0b2 25INSTALL := @INSTALL@
3f78c8cb
NS
26INSTALL_PROGRAM := @INSTALL_PROGRAM@
27INSTALL_STRIP_PROGRAM := $(srcdir)/../install-sh -c -s
35fc243f
NS
28AUTOCONF := @AUTOCONF@
29AUTOHEADER := @AUTOHEADER@
30CXX := @CXX@
31CXXFLAGS := @CXXFLAGS@
b6cb10af
MP
32PICFLAG := @PICFLAG@
33LD_PICFLAG := @LD_PICFLAG@
34CXXOPTS := $(CXXFLAGS) $(PICFLAG) -fno-exceptions -fno-rtti
544f4775 35LDFLAGS := @LDFLAGS@
e4043c63 36exeext := @EXEEXT@
35fc243f
NS
37LIBIBERTY := ../libiberty/libiberty.a
38VERSION.O := ../gcc/version.o
39
40all::
41
42mostlyclean::
43 rm -f $(MAPPER.O)
44
79d1e0b2 45clean:: mostlyclean
4d8476b0 46 rm -f g++-mapper-server$(exeext)
35fc243f 47
79d1e0b2
JW
48distclean:: clean
49 rm -f config.log config.status config.h config.cache Makefile
50 rm -f $(MAPPER.O:%.o=%.d)
35fc243f 51
79d1e0b2 52maintainer-clean:: distclean
35fc243f
NS
53
54install::
55
3f78c8cb
NS
56check::
57installcheck::
58dvi::
59pdf::
60html::
61info::
62install-info::
63install-pdf::
c3e80a16 64install-dvi::
3f78c8cb
NS
65install-man::
66install-html::
67
68install-strip: override INSTALL_PROGRAM = $(INSTALL_STRIP_PROGRAM)
69ifneq ($(STRIP),)
70install-strip: STRIPPROG = $(STRIP)
71export STRIPPROG
72endif
73install-strip: install
35fc243f
NS
74
75vpath %.cc $(srcdir)
76vpath %.in $(srcdir)
77.SUFFIXES:
78.SUFFIXES: .cc .o
79
80# Per-source & per-directory compile flags (warning: recursive)
81SRC_CXXFLAGS = $(CXXFLAGS$(patsubst $(srcdir)%,%,$1)) \
82 $(if $(filter-out $(srcdir)/,$1),\
83 $(call $0,$(dir $(patsubst %/,%,$1))))
84
85%.o: %.cc
86 $(CXX) $(strip $(CXXOPTS) $(call SRC_CXXFLAGS,$<) $(CXXINC)) \
87 -MMD -MP -MF ${@:.o=.d} -c -o $@ $<
88
89ifeq (@CXX_AUX_TOOLS@,yes)
90
91all::g++-mapper-server$(exeext)
92
b6cb10af
MP
93ifneq ($(PICFLAG),)
94override LIBIBERTY := ../libiberty/pic/libiberty.a
95endif
96
35fc243f
NS
97MAPPER.O := server.o resolver.o
98CODYLIB = ../libcody/libcody.a
e3a682f4 99CXXINC += -I$(srcdir)/../libcody -I$(srcdir)/../include -I$(srcdir)/../gcc -I. -I../gcc
35fc243f 100g++-mapper-server$(exeext): $(MAPPER.O) $(CODYLIB)
f68e90a0 101 +$(CXX) $(LDFLAGS) $(PICFLAG) $(LD_PICFLAG) -o $@ $^ $(LIBIBERTY)
35fc243f
NS
102
103# copy to gcc dir so tests there can run
104all::../gcc/g++-mapper-server$(exeext)
105
106../gcc/g++-mapper-server$(exeext): g++-mapper-server$(exeext)
4d8476b0 107 $(INSTALL) $< $@
35fc243f
NS
108
109install::
4d8476b0 110 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(libexecsubdir)
3f78c8cb 111 $(INSTALL_PROGRAM) g++-mapper-server$(exeext) $(DESTDIR)$(libexecsubdir)
35fc243f
NS
112endif
113
114ifneq ($(MAINTAINER),)
115override MAINTAINER += $1
116endif
117ifeq (@MAINTAINER@,yes)
118MAINTAINER = $2
119else
120MAINTAINER = \# --enable-maintainer-mode to rebuild $1, or make MAINTAINER=touch
121endif
122
123all:: Makefile
124
125Makefile: $(srcdir)/Makefile.in config.status
126 $(SHELL) ./config.status Makefile
127
128$(srcdir)/configure: $(srcdir)/configure.ac
129 $(call MAINTAINER,$@,cd $(@D) && $(AUTOCONF) -W all,error)
130
131$(srcdir)/config.h.in: $(srcdir)/configure.ac
132 $(call MAINTAINER,$@,cd $(@D) && $(AUTOHEADER) -f -W all,error)
133
134config.h: config.status config.h.in
135 ./$< --header=$@
136 touch $@
137
138config.status: $(srcdir)/configure $(srcdir)/config.h.in
139 if test -x $@; then ./$@ -recheck; else $< @configure_args@; fi
140
79d1e0b2 141.PHONY: all check mostlyclean clean distclean maintainer-clean
35fc243f
NS
142
143-include $(MAPPER.O:.o=.d)