OSDN Git Service

10496c477fccea9e66cb4869e8f98c29d40d0bc2
[pf3gnuchains/gcc-fork.git] / gcc / objc / Make-lang.in
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.
4
5 #This file is part of GCC.
6
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.
11
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.
16
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, 59 Temple Place - Suite 330,
20 #Boston, MA 02111-1307, USA.
21
22 # This file provides the language dependent support in the main Makefile.
23 # Each language makefile fragment must provide the following targets:
24 #
25 # foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap,
26 # foo.install-normal, foo.install-common, foo.install-man,
27 # foo.uninstall,
28 # foo.mostlyclean, foo.clean, foo.distclean,
29 # foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
30 #
31 # where `foo' is the name of the language.
32 #
33 # It should also provide rules for:
34 #
35 # - making any compiler driver (eg: g++)
36 # - the compiler proper (eg: cc1plus)
37 # - define the names for selecting the language in LANGUAGES.
38
39 #\f
40 # Define the names for selecting Objective-C in LANGUAGES.
41 OBJC objc: cc1obj$(exeext)
42 OBJECTIVE-C objective-c: cc1obj$(exeext)
43
44 # Tell GNU make to ignore these if they exist.
45 .PHONY: objective-c objc ObjC
46
47 # Use maximal warnings for this front end.
48 objc-warn = $(STRICT_WARN)
49
50 # Language-specific object files for Objective C.
51 OBJC_OBJS = objc/objc-lang.o objc/objc-act.o
52
53 cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) $(BACKEND) $(LIBDEPS)
54         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
55                 $(OBJC_OBJS) $(C_AND_OBJC_OBJS) $(BACKEND) $(LIBS)
56
57 # Objective C language specific files.
58
59 objc/objc-lang.o : objc/objc-lang.c \
60    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
61    $(C_TREE_H) $(C_PRETTY_PRINT_H) $(DIAGNOSTIC_H) \
62    $(GGC_H) langhooks.h $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-objc.h \
63    c-objc-common.h objc/objc-act.h tree-gimple.h
64
65 objc/objc-act.o : objc/objc-act.c \
66    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) \
67    $(EXPR_H) $(TARGET_H) $(C_TREE_H) diagnostic.h toplev.h flags.h \
68    objc/objc-act.h input.h function.h output.h debug.h langhooks.h \
69    $(LANGHOOKS_DEF_H) $(HASHTAB_H) c-pragma.h gt-objc-objc-act.h tree-gimple.h
70
71 objc.srcextra:
72
73 gtype-objc.h : s-gtype ; @true
74 gt-objc-objc-act.h : s-gtype ; @true
75
76 #\f
77 # Build hooks:
78
79 objc.all.build:
80 objc.all.cross:
81 objc.start.encap:
82 objc.rest.encap:
83 objc.info:
84 objc.man:
85 objc.srcinfo:
86 objc.srcman:
87
88 objc.tags: force
89         cd $(srcdir)/objc; etags -o TAGS.sub *.c *.h; \
90         etags --include TAGS.sub --include ../TAGS.sub
91
92 lang_checks += check-objc
93
94 #\f
95 # Install hooks:
96 # cc1obj is installed elsewhere as part of $(COMPILERS).
97
98 objc.install-normal:
99
100 objc.install-common:
101
102 objc.install-man:
103
104 objc.uninstall:
105 #\f
106 # Clean hooks:
107 # A lot of the ancillary files are deleted by the main makefile.
108 # We just have to delete files specific to us.
109 objc.mostlyclean:
110         -rm -f objc/*$(objext) objc/xforward objc/fflags
111         -rm -f objc/*$(coverageexts)
112 objc.clean: objc.mostlyclean
113         -rm -rf objc-headers
114 objc.distclean:
115         -rm -f objc/Makefile objc/Make-host objc/Make-target
116         -rm -f objc/config.status objc/config.cache
117 objc.maintainer-clean:
118
119 #\f
120 # Stage hooks:
121
122 objc.stage1: stage1-start
123         -mv objc/*$(objext) stage1/objc
124 objc.stage2: stage2-start
125         -mv objc/*$(objext) stage2/objc
126 objc.stage3: stage3-start
127         -mv objc/*$(objext) stage3/objc
128 objc.stage4: stage4-start
129         -mv objc/*$(objext) stage4/objc
130 objc.stageprofile: stageprofile-start
131         -mv objc/*$(objext) stageprofile/objc
132 objc.stagefeedback: stagefeedback-start
133         -mv objc/*$(objext) stagefeedback/objc