Merge trunk version 195164 into gupc branch.
[official-gcc.git] / gcc / objc / Make-lang.in
blob8ece414d64a38bce5568b244be4dd30c34c04ae8
1 # Top level -*- makefile -*- fragment for GNU Objective-C
2 #   Copyright (C) 1997-2013 Free Software Foundation, Inc.
4 #This file is part of GCC.
6 #GCC is free software; you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation; either version 3, or (at your option)
9 #any later version.
11 #GCC is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 #GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with GCC; see the file COPYING3.  If not see
18 # <http://www.gnu.org/licenses/>.
21 # This file provides the language dependent support in the main Makefile.
22 # Each language makefile fragment must provide the following targets:
24 # foo.all.cross, foo.start.encap, foo.rest.encap,
25 # foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
26 # foo.install-html, foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
27 # foo.mostlyclean, foo.clean, foo.distclean,
28 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
30 # where `foo' is the name of the language.
32 # It should also provide rules for:
34 # - making any compiler driver (eg: g++)
35 # - the compiler proper (eg: cc1plus)
36 # - define the names for selecting the language in LANGUAGES.
38 #\f
39 # Define the names for selecting Objective-C in LANGUAGES.
40 objc: cc1obj$(exeext)
42 # Tell GNU make to ignore these if they exist.
43 .PHONY: objc
45 START_HDRS = $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \
46   c/c-lang.h langhooks.h c-family/c-objc.h objc/objc-act.h
48 # Use maximal warnings for this front end.
49 objc-warn = $(STRICT_WARN)
51 # Language-specific object files for Objective C.
52 OBJC_OBJS = objc/objc-lang.o objc/objc-act.o hash-table.o \
53    objc/objc-runtime-shared-support.o \
54    objc/objc-gnu-runtime-abi-01.o \
55    objc/objc-next-runtime-abi-01.o \
56    objc/objc-next-runtime-abi-02.o \
57    objc/objc-encoding.o \
58    objc/objc-map.o
60 objc_OBJS = $(OBJC_OBJS) cc1obj-checksum.o
62 cc1obj-checksum.c : build/genchecksum$(build_exeext) checksum-options \
63         $(OBJC_OBJS) $(C_AND_OBJC_OBJS) $(BACKEND) $(LIBDEPS)
64         build/genchecksum$(build_exeext) $(OBJC_OBJS) $(C_AND_OBJC_OBJS) \
65         $(BACKEND) $(LIBDEPS) checksum-options > cc1obj-checksum.c.tmp && \
66         $(srcdir)/../move-if-change cc1obj-checksum.c.tmp cc1obj-checksum.c
68 cc1obj-checksum.o : cc1obj-checksum.c $(CONFIG_H) $(SYSTEM_H)
70 cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) \
71                  c-family/stub-upc.o cc1obj-checksum.o \
72                  $(BACKEND) $(LIBDEPS)
73         +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
74               $(OBJC_OBJS) $(C_AND_OBJC_OBJS) \
75               c-family/stub-upc.o cc1obj-checksum.o \
76               $(BACKEND) $(LIBS) $(BACKENDLIBS)
78 # Objective C language specific files.
80 # When editing, please keep the objc/ header dependencies in
81 # alphabetical order, and try to use a similar logical order for the
82 # other files between the different targets.
84 objc/objc-lang.o : objc/objc-lang.c \
85    $(START_HDRS) \
86    $(GGC_H) \
87    $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-objc.h \
88    c/c-objc-common.h
90 objc/objc-runtime-shared-support.o : objc/objc-runtime-shared-support.c \
91    gt-objc-objc-runtime-shared-support.h \
92    $(START_HDRS) \
93    $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
94    objc/objc-encoding.h \
95    objc/objc-next-metadata-tags.h \
96    objc/objc-runtime-shared-support.h
98 objc/objc-gnu-runtime-abi-01.o: objc/objc-gnu-runtime-abi-01.c \
99    gt-objc-objc-gnu-runtime-abi-01.h \
100    $(START_HDRS) \
101    $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
102    toplev.h \
103    objc/objc-encoding.h \
104    objc/objc-runtime-hooks.h \
105    objc/objc-runtime-shared-support.h
107 objc/objc-next-runtime-abi-01.o: objc/objc-next-runtime-abi-01.c \
108    gt-objc-objc-next-runtime-abi-01.h \
109    $(START_HDRS) \
110    $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
111    $(TARGET_H) \
112    objc/objc-encoding.h \
113    objc/objc-next-metadata-tags.h \
114    objc/objc-runtime-hooks.h \
115    objc/objc-runtime-shared-support.h
117 objc/objc-next-runtime-abi-02.o: objc/objc-next-runtime-abi-02.c \
118    gt-objc-objc-next-runtime-abi-02.h \
119    $(START_HDRS) \
120    $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
121    $(TARGET_H) \
122    objc/objc-encoding.h \
123    objc/objc-next-metadata-tags.h \
124    objc/objc-runtime-hooks.h \
125    objc/objc-runtime-shared-support.h
127 objc/objc-act.o : objc/objc-act.c \
128    gt-objc-objc-act.h \
129    $(START_HDRS) \
130    $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
131    toplev.h $(FUNCTION_H) debug.h $(LANGHOOKS_DEF_H) \
132    $(HASH_TABLE_H) $(GIMPLE_H) \
133    $(C_PRAGMA_H) $(C_TARGET_H) \
134    objc/objc-encoding.h \
135    objc/objc-map.h \
136    objc/objc-runtime-hooks.h \
137    objc/objc-runtime-shared-support.h
139 objc/objc-encoding.o : objc/objc-encoding.c \
140    $(START_HDRS) \
141    $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
142    $(OBSTACK_H) \
143    objc/objc-encoding.h \
144    objc/objc-runtime-shared-support.h
146 objc/objc-map.o : objc/objc-map.c \
147    $(START_HDRS) \
148    $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
149    $(OBSTACK_H) \
150    objc/objc-map.h
152 objc.srcextra:
155 # Build hooks:
157 objc.all.cross:
158 objc.start.encap:
159 objc.rest.encap:
160 objc.info:
161 objc.install-info:
162 objc.dvi:
163 objc.pdf:
164 objc.install-pdf:
165 objc.html:
166 objc.install-html:
167 objc.man:
168 objc.srcinfo:
169 objc.srcman:
170 objc.install-plugin:
172 objc.tags: force
173         cd $(srcdir)/objc; etags -o TAGS.sub *.c *.h; \
174         etags --include TAGS.sub --include ../TAGS.sub
176 lang_checks += check-objc
178 # The following allows you to do 'make check-objc -j2'.  The
179 # execute.exp tests will be run in parallel with all the other ones.
180 lang_checks_parallelized += check-objc
181 check_objc_parallelize = gnu-encoding.exp execute.exp exceptions.exp
184 # Install hooks:
185 # cc1obj is installed elsewhere as part of $(COMPILERS).
187 objc.install-common:
189 objc.install-man:
191 objc.uninstall:
193 # Clean hooks:
194 # A lot of the ancillary files are deleted by the main makefile.
195 # We just have to delete files specific to us.
196 objc.mostlyclean:
197         -rm -f objc/*$(objext) objc/xforward objc/fflags
198         -rm -f objc/*$(coverageexts)
199 objc.clean: objc.mostlyclean
200         -rm -rf objc-headers
201 objc.distclean:
202         -rm -f objc/Makefile objc/Make-host objc/Make-target
203         -rm -f objc/config.status objc/config.cache
204 objc.maintainer-clean:
207 # Stage hooks:
209 objc.stage1: stage1-start
210         -mv objc/*$(objext) stage1/objc
211 objc.stage2: stage2-start
212         -mv objc/*$(objext) stage2/objc
213 objc.stage3: stage3-start
214         -mv objc/*$(objext) stage3/objc
215 objc.stage4: stage4-start
216         -mv objc/*$(objext) stage4/objc
217 objc.stageprofile: stageprofile-start
218         -mv objc/*$(objext) stageprofile/objc
219 objc.stagefeedback: stagefeedback-start
220         -mv objc/*$(objext) stagefeedback/objc