re PR lto/48086 (bootstrap-lto creates c-common.s with too many sections on x86_64...
[official-gcc.git] / gcc / objc / Make-lang.in
blob182ebf40c33f4b47a43cbbdb3a3be72c59e21247
1 # Top level -*- makefile -*- fragment for GNU Objective-C
2 #   Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
3 #   2008, 2009, 2010, 2011 Free Software Foundation, Inc.
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 objc: cc1obj$(exeext)
43 # Tell GNU make to ignore these if they exist.
44 .PHONY: objc
46 START_HDRS = $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \
47   c-lang.h langhooks.h c-family/c-objc.h objc/objc-act.h
49 # Use maximal warnings for this front end.
50 objc-warn = $(STRICT_WARN)
52 # Language-specific object files for Objective C.
53 OBJC_OBJS = objc/objc-lang.o objc/objc-act.o \
54    objc/objc-runtime-shared-support.o \
55    objc/objc-gnu-runtime-abi-01.o \
56    objc/objc-next-runtime-abi-01.o \
57    objc/objc-next-runtime-abi-02.o \
59 objc_OBJS = $(OBJC_OBJS) cc1obj-checksum.o
61 cc1obj-checksum.c : build/genchecksum$(build_exeext) checksum-options \
62         $(OBJC_OBJS) $(C_AND_OBJC_OBJS) $(BACKEND) $(LIBDEPS)
63         build/genchecksum$(build_exeext) $(OBJC_OBJS) $(C_AND_OBJC_OBJS) \
64         $(BACKEND) $(LIBDEPS) checksum-options > cc1obj-checksum.c.tmp && \
65         $(srcdir)/../move-if-change cc1obj-checksum.c.tmp cc1obj-checksum.c
67 cc1obj-checksum.o : cc1obj-checksum.c $(CONFIG_H) $(SYSTEM_H)
69 cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o $(BACKEND) $(LIBDEPS)
70         +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
71               $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o \
72               $(BACKEND) $(LIBS) $(BACKENDLIBS)
74 # Objective C language specific files.
76 objc/objc-lang.o : objc/objc-lang.c $(START_HDRS) \
77    $(GGC_H) $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-objc.h \
78    c-objc-common.h
80 objc/objc-runtime-shared-support.o : objc/objc-runtime-shared-support.c \
81    $(START_HDRS) objc/objc-runtime-shared-support.h $(OBSTACK_H) \
82    objc/objc-next-metadata-tags.h gt-objc-objc-runtime-shared-support.h
84 objc/objc-gnu-runtime-abi-01.o: objc/objc-gnu-runtime-abi-01.c $(START_HDRS) \
85    objc/objc-runtime-hooks.h $(GGC_H) \
86    objc/objc-runtime-shared-support.h gt-objc-objc-gnu-runtime-abi-01.h toplev.h
88 objc/objc-next-runtime-abi-01.o: objc/objc-next-runtime-abi-01.c $(START_HDRS) \
89    $(GGC_H) objc/objc-runtime-hooks.h \
90    objc/objc-next-metadata-tags.h gt-objc-objc-next-runtime-abi-01.h output.h \
91    objc/objc-runtime-shared-support.h $(TARGET_H)
93 objc/objc-next-runtime-abi-02.o: objc/objc-next-runtime-abi-02.c $(START_HDRS) \
94    $(GGC_H) objc/objc-runtime-hooks.h \
95    objc/objc-next-metadata-tags.h gt-objc-objc-next-runtime-abi-02.h $(TARGET_H) \
96    objc/objc-runtime-shared-support.h $(OBSTACK_H) 
98 objc/objc-act.o : objc/objc-act.c $(START_HDRS) $(GGC_H) \
99    $(DIAGNOSTIC_CORE_H) toplev.h $(FLAGS_H) input.h $(FUNCTION_H) output.h debug.h \
100    $(LANGHOOKS_DEF_H) $(HASHTAB_H) $(C_PRAGMA_H) gt-objc-objc-act.h $(OBSTACK_H) \
101    $(GIMPLE_H) objc/objc-runtime-shared-support.h objc/objc-runtime-hooks.h \
102    $(C_TARGET_H)
104 objc.srcextra:
107 # Build hooks:
109 objc.all.cross:
110 objc.start.encap:
111 objc.rest.encap:
112 objc.info:
113 objc.install-info:
114 objc.dvi:
115 objc.pdf:
116 objc.install-pdf:
117 objc.html:
118 objc.install-html:
119 objc.man:
120 objc.srcinfo:
121 objc.srcman:
122 objc.install-plugin:
124 objc.tags: force
125         cd $(srcdir)/objc; etags -o TAGS.sub *.c *.h; \
126         etags --include TAGS.sub --include ../TAGS.sub
128 lang_checks += check-objc
130 # The following allows you to do 'make check-objc -j2'.  The
131 # execute.exp tests will be run in parallel with all the other ones.
132 lang_checks_parallelized += check-objc
133 check_objc_parallelize = gnu-encoding.exp execute.exp exceptions.exp
136 # Install hooks:
137 # cc1obj is installed elsewhere as part of $(COMPILERS).
139 objc.install-common:
141 objc.install-man:
143 objc.uninstall:
145 # Clean hooks:
146 # A lot of the ancillary files are deleted by the main makefile.
147 # We just have to delete files specific to us.
148 objc.mostlyclean:
149         -rm -f objc/*$(objext) objc/xforward objc/fflags
150         -rm -f objc/*$(coverageexts)
151 objc.clean: objc.mostlyclean
152         -rm -rf objc-headers
153 objc.distclean:
154         -rm -f objc/Makefile objc/Make-host objc/Make-target
155         -rm -f objc/config.status objc/config.cache
156 objc.maintainer-clean:
159 # Stage hooks:
161 objc.stage1: stage1-start
162         -mv objc/*$(objext) stage1/objc
163 objc.stage2: stage2-start
164         -mv objc/*$(objext) stage2/objc
165 objc.stage3: stage3-start
166         -mv objc/*$(objext) stage3/objc
167 objc.stage4: stage4-start
168         -mv objc/*$(objext) stage4/objc
169 objc.stageprofile: stageprofile-start
170         -mv objc/*$(objext) stageprofile/objc
171 objc.stagefeedback: stagefeedback-start
172         -mv objc/*$(objext) stagefeedback/objc