fwprop: Fix single_use_p calculation
[official-gcc.git] / gcc / objcp / Make-lang.in
blobdfa4d230eacc6ce67bebc8b152f1120bbbc3b9b8
1 # Top level -*- makefile -*- fragment for GNU Objective-C++
2 #   Copyright (C) 2005-2021 Free Software Foundation, Inc.
3 #   Contributed by Ziemowit Laski  <zlaski@apple.com>
5 #This file is part of GCC.
7 #GCC is free software; you can redistribute it and/or modify
8 #it under the terms of the GNU General Public License as published by
9 #the Free Software Foundation; either version 3, or (at your option)
10 #any later version.
12 #GCC is distributed in the hope that it will be useful,
13 #but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 #GNU General Public License for more details.
17 #You should have received a copy of the GNU General Public License
18 #along with GCC; see the file COPYING3.  If not see
19 #<http://www.gnu.org/licenses/>.
22 # This file provides the language dependent support in the main Makefile.
23 # Each language makefile fragment must provide the following targets:
25 # foo.all.cross, foo.start.encap, foo.rest.encap,
26 # foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
27 # foo.install-html, foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
28 # foo.mostlyclean, foo.clean, foo.distclean,
29 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
31 # where `foo' is the name of the language.
33 # It should also provide rules for:
35 # - making any compiler driver (eg: g++)
36 # - the compiler proper (eg: cc1plus)
37 # - define the names for selecting the language in LANGUAGES.
39 #\f
40 # Define the names for selecting Objective-C++ in LANGUAGES.
41 obj-c++: cc1objplus$(exeext)
42 obj-c++.serial = cc1objplus$(exeext)
44 # Tell GNU make to ignore these if they exist.
45 .PHONY: obj-c++
47 # Use maximal warnings for this front end.  Also, make ObjC and C++
48 # headers accessible.
49 objcp-warn = $(STRICT_WARN) -DOBJCPLUS -I$(srcdir)/objc -I$(srcdir)/cp
51 # Language-specific object files for Objective C++.
52 OBJCXX_OBJS = objcp/objcp-act.o objcp/objcp-lang.o objcp/objcp-decl.o \
53    objcp/objc-runtime-shared-support.o \
54    objcp/objc-gnu-runtime-abi-01.o \
55    objcp/objc-next-runtime-abi-01.o \
56    objcp/objc-next-runtime-abi-02.o \
57    objcp/objc-encoding.o \
58    objcp/objc-map.o \
59    $(CXX_AND_OBJCXX_OBJS)
61 obj-c++_OBJS = $(OBJCXX_OBJS) cc1objplus-checksum.o
63 cc1objplus-checksum.c : build/genchecksum$(build_exeext) checksum-options \
64         $(OBJCXX_OBJS) $(BACKEND) $(CODYLIB) $(LIBDEPS)
65         build/genchecksum$(build_exeext) $(OBJCXX_OBJS) $(BACKEND) $(CODYLIB) \
66                 $(LIBDEPS) checksum-options > cc1objplus-checksum.c.tmp && \
67         $(srcdir)/../move-if-change cc1objplus-checksum.c.tmp \
68         cc1objplus-checksum.c
70 cc1objplus$(exeext): $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) \
71                      $(CODYLIB) $(LIBDEPS) $(obj-c++.prev)
72         @$(call LINK_PROGRESS,$(INDEX.obj-c++),start)
73         +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
74                 $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) \
75                   $(CODYLIB) $(NETLIBS) $(LIBS) $(BACKENDLIBS)
76         @$(call LINK_PROGRESS,$(INDEX.obj-c++),end)
78 # Objective C++ language specific files.
80 objcp/objc-runtime-shared-support.o: objc/objc-runtime-shared-support.c
81         $(COMPILE) $<
82         $(POSTCOMPILE)
84 objcp/objc-gnu-runtime-abi-01.o: objc/objc-gnu-runtime-abi-01.c
85         $(COMPILE) $<
86         $(POSTCOMPILE)
88 objcp/objc-next-runtime-abi-01.o: objc/objc-next-runtime-abi-01.c
89         $(COMPILE) $<
90         $(POSTCOMPILE)
92 objcp/objc-next-runtime-abi-02.o: objc/objc-next-runtime-abi-02.c
93         $(COMPILE) $<
94         $(POSTCOMPILE)
96 objcp/objcp-act.o: objc/objc-act.c
97         $(COMPILE) $<
98         $(POSTCOMPILE)
100 objcp/objc-encoding.o: objc/objc-encoding.c
101         $(COMPILE) $<
102         $(POSTCOMPILE)
104 objcp/objc-map.o: objc/objc-map.c
105         $(COMPILE) $<
106         $(POSTCOMPILE)
108 po-generated:
111 # Build hooks:
113 obj-c++.all.cross:
114 obj-c++.start.encap:
115 obj-c++.rest.encap:
116 obj-c++.info:
117 obj-c++.install-info:
118 obj-c++.dvi:
119 obj-c++.pdf:
120 obj-c++.install-pdf:
121 obj-c++.html:
122 obj-c++.install-html:
123 obj-c++.srcinfo:
124 obj-c++.srcextra:
125 obj-c++.man:
126 obj-c++.install-plugin:
128 obj-c++.tags: force
129         cd $(srcdir)/objcp; etags -o TAGS.sub *.c *.h; \
130         etags --include TAGS.sub --include ../TAGS.sub
132 lang_checks += check-obj-c++
134 # No objc-c++-specific selftests
135 selftest-obj-c++:
138 # Install hooks:
139 # cc1objplus is installed elsewhere as part of $(COMPILERS).
141 obj-c++.install-common:
143 obj-c++.install-man:
145 obj-c++.uninstall:
147 # Clean hooks:
148 # A lot of the ancillary files are deleted by the main makefile.
149 # We just have to delete files specific to us.
150 obj-c++.mostlyclean:
151         -rm -f objcp/*$(objext)
152         -rm -f objcp/*$(coverageexts)
153         -rm -f cc1objplus$(exeext)
154 obj-c++.clean: obj-c++.mostlyclean
155 obj-c++.distclean:
156         -rm -f objcp/config.status objcp/Makefile
157 obj-c++.maintainer-clean:
160 # Stage hooks:
162 obj-c++.stage1: stage1-start
163         -mv objcp/*$(objext) stage1/objcp
164 obj-c++.stage2: stage2-start
165         -mv objcp/*$(objext) stage2/objcp
166 obj-c++.stage3: stage3-start
167         -mv objcp/*$(objext) stage3/objcp
168 obj-c++.stage4: stage4-start
169         -mv objcp/*$(objext) stage4/objcp
170 obj-c++.stageprofile: stageprofile-start
171         -mv objcp/*$(objext) stageprofile/objcp
172 obj-c++.stagefeedback: stagefeedback-start
173         -mv objcp/*$(objext) stagefeedback/objcp