2006-03-15 Paul Brook <paul@codesourcery.com>
[official-gcc.git] / gcc / objc / Make-lang.in
blob330298f6e95f75f4ca181e9a1ab1297e05605f7b
1 # Top level -*- makefile -*- fragment for GNU Objective-C
2 #   Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005
3 #   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 2, 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 COPYING.  If not, write to
19 #the Free Software Foundation, 51 Franklin Street, Fifth Floor,
20 #Boston, MA 02110-1301, USA.
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.dvi,
27 # 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 # Use maximal warnings for this front end.
47 objc-warn = $(STRICT_WARN)
49 # Language-specific object files for Objective C.
50 OBJC_OBJS = objc/objc-lang.o objc/objc-act.o
52 cc1obj-dummy$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) dummy-checksum.o $(BACKEND) $(LIBDEPS)
53         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
54               $(OBJC_OBJS) $(C_AND_OBJC_OBJS) dummy-checksum.o \
55               $(BACKEND) $(LIBS)
57 cc1obj-checksum.c : cc1obj-dummy$(exeext) build/genchecksum$(build_exeext)
58         build/genchecksum$(build_exeext) cc1obj-dummy$(exeext) > $@
60 cc1obj-checksum.o : cc1obj-checksum.c
62 cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o $(BACKEND) $(LIBDEPS)
63         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
64               $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o \
65               $(BACKEND) $(LIBS)
67 # Objective C language specific files.
69 objc/objc-lang.o : objc/objc-lang.c \
70    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
71    $(C_TREE_H) $(DIAGNOSTIC_H) \
72    $(GGC_H) langhooks.h $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-objc.h \
73    c-objc-common.h objc/objc-act.h tree-gimple.h
75 objc/objc-act.o : objc/objc-act.c \
76    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) \
77    $(EXPR_H) $(TARGET_H) $(C_TREE_H) diagnostic.h toplev.h flags.h \
78    objc/objc-act.h input.h function.h output.h debug.h langhooks.h \
79    $(LANGHOOKS_DEF_H) $(HASHTAB_H) c-pragma.h gt-objc-objc-act.h tree-gimple.h
81 objc.srcextra:
83 #\f
84 # Build hooks:
86 objc.all.cross:
87 objc.start.encap:
88 objc.rest.encap:
89 objc.info:
90 objc.install-info:
91 objc.dvi:
92 objc.html:
93 objc.man:
94 objc.srcinfo:
95 objc.srcman:
97 objc.tags: force
98         cd $(srcdir)/objc; etags -o TAGS.sub *.c *.h; \
99         etags --include TAGS.sub --include ../TAGS.sub
101 lang_checks += check-objc
104 # Install hooks:
105 # cc1obj is installed elsewhere as part of $(COMPILERS).
107 objc.install-common:
109 objc.install-man:
111 objc.uninstall:
113 # Clean hooks:
114 # A lot of the ancillary files are deleted by the main makefile.
115 # We just have to delete files specific to us.
116 objc.mostlyclean:
117         -rm -f objc/*$(objext) objc/xforward objc/fflags
118         -rm -f objc/*$(coverageexts)
119 objc.clean: objc.mostlyclean
120         -rm -rf objc-headers
121 objc.distclean:
122         -rm -f objc/Makefile objc/Make-host objc/Make-target
123         -rm -f objc/config.status objc/config.cache
124 objc.maintainer-clean:
127 # Stage hooks:
129 objc.stage1: stage1-start
130         -mv objc/*$(objext) stage1/objc
131 objc.stage2: stage2-start
132         -mv objc/*$(objext) stage2/objc
133 objc.stage3: stage3-start
134         -mv objc/*$(objext) stage3/objc
135 objc.stage4: stage4-start
136         -mv objc/*$(objext) stage4/objc
137 objc.stageprofile: stageprofile-start
138         -mv objc/*$(objext) stageprofile/objc
139 objc.stagefeedback: stagefeedback-start
140         -mv objc/*$(objext) stagefeedback/objc