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