xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/objc/Make-lang.in (revision d909946ca08dceb44d7d0f22ec9488679695d976)
1# Top level -*- makefile -*- fragment for GNU Objective-C
2#   Copyright (C) 1997-2013 Free Software Foundation, Inc.
3
4#This file is part of GCC.
5
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.
10
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.
15
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/>.
19
20
21# This file provides the language dependent support in the main Makefile.
22# Each language makefile fragment must provide the following targets:
23#
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
29#
30# where `foo' is the name of the language.
31#
32# It should also provide rules for:
33#
34# - making any compiler driver (eg: g++)
35# - the compiler proper (eg: cc1plus)
36# - define the names for selecting the language in LANGUAGES.
37
38#
39# Define the names for selecting Objective-C in LANGUAGES.
40objc: cc1obj$(exeext)
41
42# Tell GNU make to ignore these if they exist.
43.PHONY: objc
44
45START_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
47
48# Use maximal warnings for this front end.
49objc-warn = $(STRICT_WARN)
50
51# Language-specific object files for Objective C.
52OBJC_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
59
60objc_OBJS = $(OBJC_OBJS) cc1obj-checksum.o
61
62cc1obj-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	$(SHELL) $(srcdir)/../move-if-change cc1obj-checksum.c.tmp cc1obj-checksum.c
67
68cc1obj-checksum.o : cc1obj-checksum.c $(CONFIG_H) $(SYSTEM_H)
69
70cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o $(BACKEND) $(LIBDEPS)
71	+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
72	      $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o \
73	      $(BACKEND) $(LIBS) $(BACKENDLIBS)
74
75# Objective C language specific files.
76
77# When editing, please keep the objc/ header dependencies in
78# alphabetical order, and try to use a similar logical order for the
79# other files between the different targets.
80
81objc/objc-lang.o : objc/objc-lang.c \
82   $(START_HDRS) \
83   $(GGC_H) \
84   $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-objc.h \
85   c/c-objc-common.h
86
87objc/objc-runtime-shared-support.o : objc/objc-runtime-shared-support.c \
88   gt-objc-objc-runtime-shared-support.h \
89   $(START_HDRS) \
90   $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
91   objc/objc-encoding.h \
92   objc/objc-next-metadata-tags.h \
93   objc/objc-runtime-shared-support.h
94
95objc/objc-gnu-runtime-abi-01.o: objc/objc-gnu-runtime-abi-01.c \
96   gt-objc-objc-gnu-runtime-abi-01.h \
97   $(START_HDRS) \
98   $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
99   toplev.h \
100   objc/objc-encoding.h \
101   objc/objc-runtime-hooks.h \
102   objc/objc-runtime-shared-support.h
103
104objc/objc-next-runtime-abi-01.o: objc/objc-next-runtime-abi-01.c \
105   gt-objc-objc-next-runtime-abi-01.h \
106   $(START_HDRS) \
107   $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
108   $(TARGET_H) \
109   objc/objc-encoding.h \
110   objc/objc-next-metadata-tags.h \
111   objc/objc-runtime-hooks.h \
112   objc/objc-runtime-shared-support.h
113
114objc/objc-next-runtime-abi-02.o: objc/objc-next-runtime-abi-02.c \
115   gt-objc-objc-next-runtime-abi-02.h \
116   $(START_HDRS) \
117   $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
118   $(TARGET_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
124objc/objc-act.o : objc/objc-act.c \
125   gt-objc-objc-act.h \
126   $(START_HDRS) \
127   $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
128   toplev.h $(FUNCTION_H) debug.h $(LANGHOOKS_DEF_H) \
129   $(HASH_TABLE_H) $(GIMPLE_H) \
130   $(C_PRAGMA_H) $(C_TARGET_H) \
131   objc/objc-encoding.h \
132   objc/objc-map.h \
133   objc/objc-runtime-hooks.h \
134   objc/objc-runtime-shared-support.h
135
136objc/objc-encoding.o : objc/objc-encoding.c \
137   $(START_HDRS) \
138   $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
139   $(OBSTACK_H) \
140   objc/objc-encoding.h \
141   objc/objc-runtime-shared-support.h
142
143objc/objc-map.o : objc/objc-map.c \
144   $(START_HDRS) \
145   $(GGC_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) input.h \
146   $(OBSTACK_H) \
147   objc/objc-map.h
148
149objc.srcextra:
150
151#
152# Build hooks:
153
154objc.all.cross:
155objc.start.encap:
156objc.rest.encap:
157objc.info:
158objc.install-info:
159objc.dvi:
160objc.pdf:
161objc.install-pdf:
162objc.html:
163objc.install-html:
164objc.man:
165objc.srcinfo:
166objc.srcman:
167objc.install-plugin:
168
169objc.tags: force
170	cd $(srcdir)/objc; etags -o TAGS.sub *.c *.h; \
171	etags --include TAGS.sub --include ../TAGS.sub
172
173lang_checks += check-objc
174
175# The following allows you to do 'make check-objc -j2'.  The
176# execute.exp tests will be run in parallel with all the other ones.
177lang_checks_parallelized += check-objc
178check_objc_parallelize = gnu-encoding.exp execute.exp exceptions.exp
179
180#
181# Install hooks:
182# cc1obj is installed elsewhere as part of $(COMPILERS).
183
184objc.install-common:
185
186objc.install-man:
187
188objc.uninstall:
189#
190# Clean hooks:
191# A lot of the ancillary files are deleted by the main makefile.
192# We just have to delete files specific to us.
193objc.mostlyclean:
194	-rm -f objc/*$(objext) objc/xforward objc/fflags
195	-rm -f objc/*$(coverageexts)
196objc.clean: objc.mostlyclean
197	-rm -rf objc-headers
198objc.distclean:
199	-rm -f objc/Makefile objc/Make-host objc/Make-target
200	-rm -f objc/config.status objc/config.cache
201objc.maintainer-clean:
202
203#
204# Stage hooks:
205
206objc.stage1: stage1-start
207	-mv objc/*$(objext) stage1/objc
208objc.stage2: stage2-start
209	-mv objc/*$(objext) stage2/objc
210objc.stage3: stage3-start
211	-mv objc/*$(objext) stage3/objc
212objc.stage4: stage4-start
213	-mv objc/*$(objext) stage4/objc
214objc.stageprofile: stageprofile-start
215	-mv objc/*$(objext) stageprofile/objc
216objc.stagefeedback: stagefeedback-start
217	-mv objc/*$(objext) stagefeedback/objc
218