]>
Commit | Line | Data |
---|---|---|
b2e61dde | 1 | # Top level -*- makefile -*- fragment for GNU Objective-C++ |
d1e082c2 | 2 | # Copyright (C) 2005-2013 Free Software Foundation, Inc. |
b2e61dde MS |
3 | # Contributed by Ziemowit Laski <zlaski@apple.com> |
4 | ||
5 | #This file is part of GCC. | |
6 | ||
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 | |
af84f9c5 | 9 | #the Free Software Foundation; either version 3, or (at your option) |
b2e61dde MS |
10 | #any later version. |
11 | ||
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. | |
16 | ||
17 | #You should have received a copy of the GNU General Public License | |
af84f9c5 NC |
18 | #along with GCC; see the file COPYING3. If not see |
19 | #<http://www.gnu.org/licenses/>. | |
20 | ||
b2e61dde MS |
21 | |
22 | # This file provides the language dependent support in the main Makefile. | |
23 | # Each language makefile fragment must provide the following targets: | |
24 | # | |
bd97af06 | 25 | # foo.all.cross, foo.start.encap, foo.rest.encap, |
5fbc6266 | 26 | # foo.install-common, foo.install-man, foo.install-info, foo.install-pdf, |
55bcd32b | 27 | # foo.install-html, foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall, |
b2e61dde MS |
28 | # foo.mostlyclean, foo.clean, foo.distclean, |
29 | # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4 | |
30 | # | |
31 | # where `foo' is the name of the language. | |
32 | # | |
33 | # It should also provide rules for: | |
34 | # | |
35 | # - making any compiler driver (eg: g++) | |
36 | # - the compiler proper (eg: cc1plus) | |
37 | # - define the names for selecting the language in LANGUAGES. | |
38 | ||
39 | #\f | |
40 | # Define the names for selecting Objective-C++ in LANGUAGES. | |
9d29a5b7 | 41 | obj-c++: cc1objplus$(exeext) |
b2e61dde MS |
42 | |
43 | # Tell GNU make to ignore these if they exist. | |
9d29a5b7 | 44 | .PHONY: obj-c++ |
b2e61dde | 45 | |
d764a8e6 | 46 | START_HDRS = $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) \ |
7e84ad0b | 47 | $(CXX_PARSER_H) $(CXX_PRETTY_PRINT_H) langhooks.h c-family/c-objc.h objc/objc-act.h |
d764a8e6 | 48 | |
b2e61dde MS |
49 | # Use maximal warnings for this front end. Also, make ObjC and C++ |
50 | # headers accessible. | |
51 | objcp-warn = $(STRICT_WARN) -DOBJCPLUS -I$(srcdir)/objc -I$(srcdir)/cp | |
52 | ||
53 | # Language-specific object files for Objective C++. | |
54 | OBJCXX_OBJS = objcp/objcp-act.o objcp/objcp-lang.o objcp/objcp-decl.o \ | |
d764a8e6 IS |
55 | objcp/objc-runtime-shared-support.o \ |
56 | objcp/objc-gnu-runtime-abi-01.o \ | |
57 | objcp/objc-next-runtime-abi-01.o \ | |
58 | objcp/objc-next-runtime-abi-02.o \ | |
f027ee7c | 59 | objcp/objc-encoding.o \ |
3cc2dd4b | 60 | objcp/objc-map.o \ |
b2e61dde MS |
61 | $(CXX_AND_OBJCXX_OBJS) |
62 | ||
6cba282a TT |
63 | obj-c++_OBJS = $(OBJCXX_OBJS) cc1objplus-checksum.o |
64 | ||
d6d5951a AK |
65 | cc1objplus-checksum.c : build/genchecksum$(build_exeext) checksum-options \ |
66 | $(OBJCXX_OBJS) $(BACKEND) $(LIBDEPS) | |
67 | build/genchecksum$(build_exeext) $(OBJCXX_OBJS) $(BACKEND) \ | |
a2a997ba | 68 | $(LIBDEPS) checksum-options > cc1objplus-checksum.c.tmp && \ |
d6d5951a AK |
69 | $(srcdir)/../move-if-change cc1objplus-checksum.c.tmp \ |
70 | cc1objplus-checksum.c | |
3fd30b88 | 71 | |
6bc7bc14 | 72 | cc1objplus-checksum.o : cc1objplus-checksum.c $(CONFIG_H) $(SYSTEM_H) |
e980df8e | 73 | |
3fd30b88 | 74 | cc1objplus$(exeext): $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBDEPS) |
a90163e9 | 75 | +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ |
f773bb84 | 76 | $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS) |
b2e61dde | 77 | |
e980df8e TT |
78 | # Objective C++ language specific files. |
79 | ||
f027ee7c NP |
80 | objcp/objcp-lang.o : objcp/objcp-lang.c \ |
81 | $(START_HDRS) \ | |
82 | $(GGC_H) \ | |
d764a8e6 | 83 | $(C_COMMON_H) $(LANGHOOKS_DEF_H) cp/cp-objcp-common.h \ |
7e84ad0b | 84 | $(TARGET_H) gtype-objcp.h |
e980df8e TT |
85 | |
86 | objcp/objcp-decl.o : objcp/objcp-decl.c \ | |
245763e3 | 87 | $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(CXX_TREE_H) \ |
f027ee7c NP |
88 | objc/objc-act.h c-family/c-objc.h \ |
89 | objcp/objcp-decl.h | |
e980df8e | 90 | |
d764a8e6 | 91 | objcp/objc-runtime-shared-support.o : objc/objc-runtime-shared-support.c \ |
f027ee7c NP |
92 | gt-objc-objc-runtime-shared-support.h \ |
93 | $(START_HDRS) \ | |
94 | $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \ | |
f027ee7c NP |
95 | objc/objc-encoding.h \ |
96 | objc/objc-next-metadata-tags.h \ | |
97 | objc/objc-runtime-shared-support.h \ | |
98 | objcp/objcp-decl.h | |
d764a8e6 IS |
99 | $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \ |
100 | $(OUTPUT_OPTION) | |
101 | ||
f027ee7c NP |
102 | objcp/objc-gnu-runtime-abi-01.o: objc/objc-gnu-runtime-abi-01.c \ |
103 | gt-objc-objc-gnu-runtime-abi-01.h \ | |
104 | $(START_HDRS) \ | |
105 | $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \ | |
f027ee7c NP |
106 | toplev.h \ |
107 | objc/objc-encoding.h \ | |
108 | objc/objc-runtime-hooks.h \ | |
109 | objc/objc-runtime-shared-support.h \ | |
110 | objcp/objcp-decl.h | |
d764a8e6 IS |
111 | $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \ |
112 | $(OUTPUT_OPTION) | |
113 | ||
f027ee7c NP |
114 | objcp/objc-next-runtime-abi-01.o: objc/objc-next-runtime-abi-01.c \ |
115 | gt-objc-objc-next-runtime-abi-01.h \ | |
116 | $(START_HDRS) \ | |
117 | $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \ | |
f027ee7c NP |
118 | $(TARGET_H) output.h \ |
119 | objc/objc-encoding.h \ | |
120 | objc/objc-next-metadata-tags.h \ | |
121 | objc/objc-runtime-hooks.h \ | |
122 | objc/objc-runtime-shared-support.h \ | |
123 | objcp/objcp-decl.h | |
d764a8e6 IS |
124 | $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \ |
125 | $(OUTPUT_OPTION) | |
126 | ||
f027ee7c NP |
127 | objcp/objc-next-runtime-abi-02.o: objc/objc-next-runtime-abi-02.c \ |
128 | gt-objc-objc-next-runtime-abi-02.h \ | |
129 | $(START_HDRS) \ | |
130 | $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \ | |
f027ee7c NP |
131 | $(TARGET_H) \ |
132 | objc/objc-encoding.h \ | |
133 | objc/objc-next-metadata-tags.h \ | |
134 | objc/objc-runtime-hooks.h \ | |
135 | objc/objc-runtime-shared-support.h \ | |
136 | objcp/objcp-decl.h | |
d764a8e6 IS |
137 | $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \ |
138 | $(OUTPUT_OPTION) | |
139 | ||
140 | ||
e980df8e TT |
141 | # The following must be an explicit rule; please keep in sync with the implicit |
142 | # one in Makefile.in. | |
f027ee7c NP |
143 | objcp/objcp-act.o : objc/objc-act.c \ |
144 | gt-objc-objc-act.h \ | |
145 | $(START_HDRS) \ | |
146 | $(GGC_H) $(DIAGNOSTIC_H) $(FLAGS_H) input.h \ | |
f027ee7c NP |
147 | toplev.h $(FUNCTION_H) output.h debug.h $(LANGHOOKS_DEF_H) \ |
148 | $(HASHTAB_H) $(GIMPLE_H) \ | |
149 | $(RTL_H) $(EXPR_H) $(TARGET_H) \ | |
150 | objcp/objcp-decl.h \ | |
151 | objc/objc-encoding.h \ | |
3cc2dd4b | 152 | objc/objc-map.h \ |
f027ee7c NP |
153 | objc/objc-runtime-hooks.h \ |
154 | objc/objc-runtime-shared-support.h \ | |
155 | objcp/objcp-decl.h | |
156 | $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \ | |
157 | $(OUTPUT_OPTION) | |
158 | ||
159 | objcp/objc-encoding.o : objc/objc-encoding.c \ | |
160 | $(START_HDRS) \ | |
161 | $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \ | |
162 | $(OBSTACK_H) \ | |
163 | objc/objc-encoding.h \ | |
164 | objc/objc-runtime-shared-support.h \ | |
165 | objcp/objcp-decl.h | |
7980bfb8 ILT |
166 | $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \ |
167 | $(OUTPUT_OPTION) | |
e1f447a8 | 168 | |
3cc2dd4b NP |
169 | objcp/objc-map.o : objc/objc-map.c \ |
170 | $(START_HDRS) \ | |
171 | $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \ | |
172 | $(OBSTACK_H) \ | |
173 | objc/objc-map.h | |
174 | $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \ | |
175 | $(OUTPUT_OPTION) | |
176 | ||
b2e61dde MS |
177 | po-generated: |
178 | ||
b2e61dde MS |
179 | #\f |
180 | # Build hooks: | |
181 | ||
b2e61dde MS |
182 | obj-c++.all.cross: |
183 | obj-c++.start.encap: | |
184 | obj-c++.rest.encap: | |
185 | obj-c++.info: | |
dedfa466 PB |
186 | obj-c++.install-info: |
187 | obj-c++.dvi: | |
b5422ad7 | 188 | obj-c++.pdf: |
5fbc6266 | 189 | obj-c++.install-pdf: |
dedfa466 | 190 | obj-c++.html: |
55bcd32b | 191 | obj-c++.install-html: |
b2e61dde MS |
192 | obj-c++.srcinfo: |
193 | obj-c++.srcextra: | |
194 | obj-c++.man: | |
2a4c0366 | 195 | obj-c++.install-plugin: |
b2e61dde MS |
196 | |
197 | obj-c++.tags: force | |
dd2e44f0 | 198 | cd $(srcdir)/objcp; etags -o TAGS.sub *.c *.h; \ |
b2e61dde MS |
199 | etags --include TAGS.sub --include ../TAGS.sub |
200 | ||
201 | lang_checks += check-obj-c++ | |
202 | ||
203 | #\f | |
204 | # Install hooks: | |
205 | # cc1objplus is installed elsewhere as part of $(COMPILERS). | |
206 | ||
b2e61dde MS |
207 | obj-c++.install-common: |
208 | ||
209 | obj-c++.install-man: | |
210 | ||
211 | obj-c++.uninstall: | |
212 | #\f | |
213 | # Clean hooks: | |
214 | # A lot of the ancillary files are deleted by the main makefile. | |
215 | # We just have to delete files specific to us. | |
216 | obj-c++.mostlyclean: | |
217 | -rm -f objcp/*$(objext) | |
218 | -rm -f objcp/*$(coverageexts) | |
219 | obj-c++.clean: obj-c++.mostlyclean | |
220 | obj-c++.distclean: | |
221 | -rm -f objcp/config.status objcp/Makefile | |
222 | obj-c++.maintainer-clean: | |
223 | ||
224 | #\f | |
225 | # Stage hooks: | |
226 | ||
227 | obj-c++.stage1: stage1-start | |
228 | -mv objcp/*$(objext) stage1/objcp | |
229 | obj-c++.stage2: stage2-start | |
230 | -mv objcp/*$(objext) stage2/objcp | |
231 | obj-c++.stage3: stage3-start | |
232 | -mv objcp/*$(objext) stage3/objcp | |
233 | obj-c++.stage4: stage4-start | |
234 | -mv objcp/*$(objext) stage4/objcp | |
235 | obj-c++.stageprofile: stageprofile-start | |
236 | -mv objcp/*$(objext) stageprofile/objcp | |
237 | obj-c++.stagefeedback: stagefeedback-start | |
238 | -mv objcp/*$(objext) stagefeedback/objcp |